mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-22 17:47:08 +03:00
Upgrade to Django 3.2 (#3425)
* Upgrade to Django 3.2 * Set DEFAULT_AUTO_FIELD setting * Use auto AppConfig discovery for users app
This commit is contained in:
parent
23de88cc59
commit
315ead02e4
|
@ -41,7 +41,7 @@ production-ready Django projects quickly.
|
||||||
Features
|
Features
|
||||||
---------
|
---------
|
||||||
|
|
||||||
* For Django 3.1
|
* For Django 3.2
|
||||||
* Works with Python 3.9
|
* Works with Python 3.9
|
||||||
* Renders Django projects with 100% starting test coverage
|
* Renders Django projects with 100% starting test coverage
|
||||||
* Twitter Bootstrap_ v5 (`maintained Foundation fork`_ also available)
|
* Twitter Bootstrap_ v5 (`maintained Foundation fork`_ also available)
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -24,7 +24,7 @@ setup(
|
||||||
classifiers=[
|
classifiers=[
|
||||||
"Development Status :: 4 - Beta",
|
"Development Status :: 4 - Beta",
|
||||||
"Environment :: Console",
|
"Environment :: Console",
|
||||||
"Framework :: Django :: 3.1",
|
"Framework :: Django :: 3.2",
|
||||||
"Intended Audience :: Developers",
|
"Intended Audience :: Developers",
|
||||||
"Natural Language :: English",
|
"Natural Language :: English",
|
||||||
"License :: OSI Approved :: BSD License",
|
"License :: OSI Approved :: BSD License",
|
||||||
|
|
|
@ -48,6 +48,8 @@ DATABASES = {
|
||||||
}
|
}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
DATABASES["default"]["ATOMIC_REQUESTS"] = True
|
DATABASES["default"]["ATOMIC_REQUESTS"] = True
|
||||||
|
# https://docs.djangoproject.com/en/stable/ref/settings/#std:setting-DEFAULT_AUTO_FIELD
|
||||||
|
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
|
||||||
|
|
||||||
# URLS
|
# URLS
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
@ -86,7 +88,7 @@ THIRD_PARTY_APPS = [
|
||||||
]
|
]
|
||||||
|
|
||||||
LOCAL_APPS = [
|
LOCAL_APPS = [
|
||||||
"{{ cookiecutter.project_slug }}.users.apps.UsersConfig",
|
"{{ cookiecutter.project_slug }}.users",
|
||||||
# Your stuff: custom apps go here
|
# Your stuff: custom apps go here
|
||||||
]
|
]
|
||||||
# https://docs.djangoproject.com/en/dev/ref/settings/#installed-apps
|
# https://docs.djangoproject.com/en/dev/ref/settings/#installed-apps
|
||||||
|
|
|
@ -29,7 +29,7 @@ uvicorn[standard]==0.15.0 # https://github.com/encode/uvicorn
|
||||||
|
|
||||||
# Django
|
# Django
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
django==3.1.13 # pyup: < 3.2 # https://www.djangoproject.com/
|
django==3.2.9 # pyup: < 4.0 # https://www.djangoproject.com/
|
||||||
django-environ==0.8.1 # https://github.com/joke2k/django-environ
|
django-environ==0.8.1 # https://github.com/joke2k/django-environ
|
||||||
django-model-utils==4.2.0 # https://github.com/jazzband/django-model-utils
|
django-model-utils==4.2.0 # https://github.com/jazzband/django-model-utils
|
||||||
django-allauth==0.46.0 # https://github.com/pennersr/django-allauth
|
django-allauth==0.46.0 # https://github.com/pennersr/django-allauth
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# Generated by Django 3.2.9 on 2021-11-20 11:23
|
||||||
import django.contrib.auth.models
|
import django.contrib.auth.models
|
||||||
import django.contrib.auth.validators
|
import django.contrib.auth.validators
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
|
@ -8,7 +9,9 @@ class Migration(migrations.Migration):
|
||||||
|
|
||||||
initial = True
|
initial = True
|
||||||
|
|
||||||
dependencies = [("auth", "0008_alter_user_username_max_length")]
|
dependencies = [
|
||||||
|
("auth", "0012_alter_user_first_name_max_length"),
|
||||||
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
|
@ -16,7 +19,7 @@ class Migration(migrations.Migration):
|
||||||
fields=[
|
fields=[
|
||||||
(
|
(
|
||||||
"id",
|
"id",
|
||||||
models.AutoField(
|
models.BigAutoField(
|
||||||
auto_created=True,
|
auto_created=True,
|
||||||
primary_key=True,
|
primary_key=True,
|
||||||
serialize=False,
|
serialize=False,
|
||||||
|
@ -111,10 +114,12 @@ class Migration(migrations.Migration):
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
options={
|
options={
|
||||||
"verbose_name_plural": "users",
|
|
||||||
"verbose_name": "user",
|
"verbose_name": "user",
|
||||||
|
"verbose_name_plural": "users",
|
||||||
"abstract": False,
|
"abstract": False,
|
||||||
},
|
},
|
||||||
managers=[("objects", django.contrib.auth.models.UserManager())],
|
managers=[
|
||||||
)
|
("objects", django.contrib.auth.models.UserManager()),
|
||||||
|
],
|
||||||
|
),
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user