I have been using Django-cookiecutter to create my projects.
I have then decided that there was too much that I either didn't need or
had alternatives in particular having a single settings file using
django-configurations.
The first project building from scratch worked fine so I decided to create
a template and upload it to GitHub for future use.
This is when my problems began!
This is the structure of a simple project without any apps or separating
environment variables for simplicities sake.
.
├── Pipfile
├── Pipfile.lock
├── manage.py
└── my_project
├── __init__.py
├── settings.py
├── urls.py
└── wsgi.py
I have amended the following files:
wsgi.py
os.environ.setdefault('DJANGO_SETTINGS_MODULE', '{{ my_project }}.settings')
manage.py
os.environ.setdefault('DJANGO_SETTINGS_MODULE', '{{ my_project }}.settings')
settings.py
ROOT_URLCONF = '{{ my_project }}.urls'
WSGI_APPLICATION = '{{ my_project }}.wsgi.application'
I have uploaded it to GitHub and designated it as a template.
The issue comes about when I try to use it.
I issue the following command:
django-admin.py startproject \
--template=https://github.com/my_repository/django-project-template/archive/master.zip
\
--extension=py,md,env \
project_name
When I open this project I find that the variable {{ my_project }} has not
been pick up so for example the ROOT_URLCONF just shows .urls instead of
project_name.urls and the situation is the same for the WSGI_APPLICATION
and the same is true for the items in the settings.py
I am sure that the answer is both simple and obvious but for the life of me
I cannot see the solution.
Any help or pointers would be gratefully received.
Thanks in advance
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/28b577d2-fd9f-4e24-9e4f-b383cc099fea%40googlegroups.com.