Skip to content

Commit

Permalink
Passage à Django 3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Situphen committed Jan 17, 2022
1 parent 7be4440 commit bbe481d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ django-crispy-forms==1.13.0
django-model-utils==4.2.0
django-munin==0.2.1
django-recaptcha==2.0.6
Django==2.2.25
Django==3.2.10
easy-thumbnails==2.8.0
factory-boy==3.2.1
geoip2==4.5.0
GitPython==3.1.24
homoglyphs==2.0.4
lxml==4.7.1
Pillow==8.4.0
python-memcached==1.59
pymemcache==3.5.0
requests==2.26.0
toml==0.10.2

Expand Down
2 changes: 2 additions & 0 deletions zds/settings/abstract_base/django.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,3 +322,5 @@

# Properly handle HTTPS vs HTTP
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")

DEFAULT_AUTO_FIELD = "django.db.models.AutoField"
2 changes: 1 addition & 1 deletion zds/settings/prod.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

CACHES = {
"default": {
"BACKEND": "django.core.cache.backends.memcached.MemcachedCache",
"BACKEND": "django.core.cache.backends.memcached.PyMemcacheCache",
"LOCATION": "127.0.0.1:11211",
}
}
Expand Down
2 changes: 1 addition & 1 deletion zds/utils/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ class HatRequest(models.Model):
date = models.DateTimeField(
auto_now_add=True, db_index=True, verbose_name="Date de la demande", db_column="request_date"
)
is_granted = models.NullBooleanField("Est acceptée")
is_granted = models.BooleanField("Est acceptée", null=True)
solved_at = models.DateTimeField("Date de résolution", blank=True, null=True)
moderator = models.ForeignKey(User, verbose_name="Modérateur", blank=True, null=True, on_delete=models.SET_NULL)
comment = models.TextField("Commentaire", max_length=1000, blank=True)
Expand Down
2 changes: 1 addition & 1 deletion zds/utils/templatetags/form_categories.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def order_categories(choices):
for choice in choices:
# many request but only used in "new content" page
# if someone find a better solution, please create a Pull Request
subcat = SubCategory.objects.get(pk=choice[0])
subcat = SubCategory.objects.get(pk=choice[0].value)
parent = subcat.get_parent_category()
if parent:
ch = {"choice": choice, "parent": parent.title, "order": parent.pk}
Expand Down

0 comments on commit bbe481d

Please sign in to comment.