Home >Backend Development >Python Tutorial >Detailed tutorial on using cookiecutter in Django
##Related free learning recommendations:1. Installation
pipenv install cookiecutter
pkg_resources.VersionConflict: (importlib-metadata 3.1.0 (/Users/apple/.local/share/virtualenvs/testProject-h0hp04R9/lib/python3.6/site-packages), Requirement.parse('importlib-metadata3d8ddbb6180f4931e337e27b7df4fc1d=0.12; python_version < "3.8"')).Cause and solution: This problem occurs mainly because the pipenv version is not supported. Pipenv needs to be updated. Use the command: pip3 install -U pipenv, and then re-import it. 2. Create a project
zsh: command not found: cookiecutter
Usage: cookiecutter [OPTIONS] TEMPLATE [EXTRA_CONTEXT]... Try 'cookiecutter -h' for help. Error: Missing argument 'TEMPLATE'.is missing. Find pydanny/cookiecutter in github- Django, assign the github address, write the address after the python operating environment, run again
/Users/apple/.local/sha~~~~re/virtualenvs/testProject-h0hp04R9/bin/cookiecutter https://github.com/pydanny/cookiecutter-django.gitSuccessfully enter the configuration options, and perform specific configuration3. Specific configuration
File "/Users/apple/.local/share/virtualenvs/django-pro-7n8-wfJY/lib/python3.6/site-packages/django_celery_beat/models.py", line 60, in crontab_schedule_celery_timezone choice[0].zone for choice in timezone_field.TimeZoneField.CHOICES AttributeError: type object 'TimeZoneField' has no attribute 'CHOICES'Cause: django-celery-beat setup.py has a https://github.com/celery/django-celery-beat/blob/master/requirements/default.txt dependency According to the requirement, django-timezone-field can only be used with >=4.0 and Solution: pipenv install django-timezone-field==4.0, just re-execute the data migration SummaryThis concludes this tutorial on the use of cookiecutter in django This concludes the article.
If you want to know more about programming learning, please pay attention to thephp training column!
The above is the detailed content of Detailed tutorial on using cookiecutter in Django. For more information, please follow other related articles on the PHP Chinese website!