Skip to content

Commit

Permalink
Nome do projeto como variável
Browse files Browse the repository at this point in the history
  • Loading branch information
fgsamuel committed Sep 4, 2021
1 parent c74fec0 commit 6f30c2d
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'project_name.settings')
os.environ.setdefault('DJANGO_SETTINGS_MODULE', '{{ project_name }}.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
Expand Down
4 changes: 2 additions & 2 deletions project_name/asgi.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
ASGI config for project_name project.
ASGI config for {{ project_name }} project.
It exposes the ASGI callable as a module-level variable named ``application``.
Expand All @@ -11,6 +11,6 @@

from django.core.asgi import get_asgi_application

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'project_name.settings')
os.environ.setdefault('DJANGO_SETTINGS_MODULE', '{{ project_name }}.settings')

application = get_asgi_application()
2 changes: 1 addition & 1 deletion project_name/core/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

class CoreConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'project_name.core'
name = '{{ project_name }}.core'
8 changes: 4 additions & 4 deletions project_name/settings.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Django settings for project_name project.
Django settings for {{ project_name }} project.
Generated by 'django-admin startproject' using Django 3.2.7.
Expand Down Expand Up @@ -44,7 +44,7 @@
'django.contrib.staticfiles',
'django_extensions',
'debug_toolbar',
'project_name.core',
'{{ project_name }}.core',
]

MIDDLEWARE = [
Expand All @@ -59,7 +59,7 @@
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]

ROOT_URLCONF = 'project_name.urls'
ROOT_URLCONF = '{{ project_name }}.urls'

TEMPLATES = [
{
Expand All @@ -77,7 +77,7 @@
},
]

WSGI_APPLICATION = 'project_name.wsgi.application'
WSGI_APPLICATION = '{{ project_name }}.wsgi.application'


# Database
Expand Down
2 changes: 1 addition & 1 deletion project_name/urls.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""project_name URL Configuration
"""{{ project_name }} URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.2/topics/http/urls/
Expand Down
4 changes: 2 additions & 2 deletions project_name/wsgi.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
WSGI config for project_name project.
WSGI config for {{ project_name }} project.
It exposes the WSGI callable as a module-level variable named ``application``.
Expand All @@ -11,6 +11,6 @@

from django.core.wsgi import get_wsgi_application

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'project_name.settings')
os.environ.setdefault('DJANGO_SETTINGS_MODULE', '{{ project_name }}.settings')

application = get_wsgi_application()
2 changes: 1 addition & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[pytest]
DJANGO_SETTINGS_MODULE = project_name.settings
DJANGO_SETTINGS_MODULE = {{ project_name }}.settings
python_files = tests.py test_*.py *_tests.py

0 comments on commit 6f30c2d

Please sign in to comment.