File tree 6 files changed +11
-13
lines changed
example_project/regular_app 6 files changed +11
-13
lines changed Original file line number Diff line number Diff line change 1
1
exclude : " .*/vendor/.*"
2
2
repos :
3
+ - repo : https://github.com/adamchainz/django-upgrade
4
+ rev : 1.15.0
5
+ hooks :
6
+ - id : django-upgrade
7
+ args : [--target-version, "5.0"] # Replace with Django version
8
+
3
9
- repo : https://github.com/astral-sh/ruff-pre-commit
4
10
rev : v0.4.2
5
11
hooks :
@@ -10,10 +16,12 @@ repos:
10
16
rev : 5.13.2
11
17
hooks :
12
18
- id : isort
19
+
13
20
- repo : https://github.com/psf/black
14
21
rev : 24.4.2
15
22
hooks :
16
23
- id : black
24
+
17
25
- repo : https://github.com/pre-commit/pre-commit-hooks
18
26
rev : v4.6.0
19
27
hooks :
Original file line number Diff line number Diff line change 1
1
{% extends "basic/layout.html" %}
2
2
3
3
{%- block extrahead %}
4
- < link rel ="stylesheet " href ="http ://haystacksearch.org/css/front.css " media ="screen ">
4
+ < link rel ="stylesheet " href ="https ://haystacksearch.org/css/front.css " media ="screen ">
5
5
< link rel ="stylesheet " href ="_static/documentation.css " media ="screen ">
6
6
{% endblock %}
7
7
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ def full_name(self):
36
36
37
37
38
38
class Toy (models .Model ):
39
- dog = models .ForeignKey (Dog , related_name = "toys" )
39
+ dog = models .ForeignKey (Dog , on_delete = models . CASCADE , related_name = "toys" )
40
40
name = models .CharField (max_length = 60 )
41
41
42
42
def __str__ (self ):
Original file line number Diff line number Diff line change 1
1
from importlib .metadata import PackageNotFoundError , version
2
2
3
- import django
4
3
from django .conf import settings
5
4
from django .core .exceptions import ImproperlyConfigured
6
5
from packaging .version import Version
17
16
__version__ = "0.0.dev0"
18
17
version_info = Version (__version__ )
19
18
20
-
21
- if django .VERSION < (3 , 2 ):
22
- # default_app_config is deprecated since django 3.2.
23
- default_app_config = "haystack.apps.HaystackConfig"
24
-
25
-
26
19
# Help people clean up from 1.X.
27
20
if hasattr (settings , "HAYSTACK_SITECONF" ):
28
21
raise ImproperlyConfigured (
Original file line number Diff line number Diff line change 5
5
from .models import MockModel
6
6
7
7
8
+ @admin .register (MockModel )
8
9
class MockModelAdmin (SearchModelAdmin ):
9
10
haystack_connection = "solr"
10
11
date_hierarchy = "pub_date"
11
12
list_display = ("author" , "pub_date" )
12
-
13
-
14
- admin .site .register (MockModel , MockModelAdmin )
Original file line number Diff line number Diff line change 1
- default_app_config = "test_app_using_appconfig.apps.SimpleTestAppConfig"
You can’t perform that action at this time.
0 commit comments