Questions tagged [cookiecutter-django]

Cookiecutter Django is a framework for jumpstarting production-ready Django projects quickly.

Powered by Cookiecutter, Cookiecutter Django is a framework for jumpstarting production-ready Django projects quickly. It is an open source tool, designed with best practices in mind to move the boilerplate of building deployable Django projects out of the way.

222 questions
19
votes
3 answers

Is there a command for creating an app using cookiecutter-django?

Once a Django project has been created using cookiecutter-django, is there a command like python manage.py startapp to run instead of writing the new app from scratch?
dolma33
  • 4,133
  • 6
  • 28
  • 48
14
votes
2 answers

cookiecutter command not found after installing with pip

I want to use cookiecutter to start a django project but for some reason cookiecutter cannot be found. What I did was: pip install cookiecutter After that: cookiecutter https://github.com/pydanny/cookiecutter-django Then I get the error message: …
Johan Vergeer
  • 5,208
  • 10
  • 48
  • 105
13
votes
6 answers

RuntimeError: Model class xxx doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS

I refer to following GitHub repo which is based on Django 2.0 and cookiecutter-django: github.com/Apfelschuss/apfelschuss/tree/c8851430201daeb7d1d81c5a6b3c8a639ea27b02 I am getting the following error when trying to run the app: RuntimeError:…
Philipp
  • 794
  • 1
  • 7
  • 21
11
votes
3 answers

Django app with docker-compose keep the data in media volume

I'm using Django cookiecutter with docker and docker-compose. On production I'm using dj-static to serve my media files. Whenever I use 'docker-compose down' command everything that is in my media volume gets deleted. I think this is the expected…
Dragos
  • 318
  • 2
  • 12
11
votes
1 answer

How to tell cookiecutter to download a stable version of cookiecutter-django?

The command: cookiecutter https://github.com/pydanny/cookiecutter-django/ will clone the lastest version of cookiecutter-django, which is aimed for Django 1.9. There is a Stable section in the README pointing to some tags. One of them being…
jgomo3
  • 1,153
  • 1
  • 13
  • 26
8
votes
1 answer

Permission denied on mkdir inside of a django Docker container when running collectstatic

I've modified django-cookiecutter default production template to make caddy web server serve static files. I'm using volumes to map the ./static directories in django and caddy containters through host ./static directory, but I'm getting permissions…
Daniel
  • 307
  • 5
  • 15
7
votes
0 answers

Python module not found in docker container

I'm trying to run a django-cookiecutter project, but I'm getting a ModuleNotFoundError: No module named 'iprestrict' error in some of the containers. I checked out our repository that my colleagues can successfully build and run using both Docker…
7
votes
2 answers

Fresh cookiecutter django project shows "Invalid syntax" at environ.py

I started my first project with cookiecutter using the cookiecutter-django template. When I tried to start it from PyCharm using the virtualenv, it gave me an error in a lib file: environ.py, telling me this: File…
madtyn
  • 1,469
  • 27
  • 55
7
votes
1 answer

What is the recommended way to package a Django project? Django package with multiple apps or multiple Django packages?

I am working on a Django project that is separated into 5 apps (each have 3-6 models). As a whole, this project is definitely something I would reuse in other projects, but it would only be useful if it included all the apps because they are…
genomics-geek
  • 195
  • 4
  • 14
6
votes
1 answer

Django "Detected change in ..., reloading" Error in Docker

I'm having a problem which I don't understand, and therefore can't resolve. I have a Dockerised Django project, which I created using Cookiecutter Django months ago. Today, my development environment has started displaying the following error on…
5
votes
1 answer

Explain how `<<: *name` makes a reference to `&name` in docker-compose?

Trying to understand how the docker-compose file was created as I want to replicate this into a kubernetes deployment yaml file. In reference to a cookiecutter-django's docker-compose production.yaml file: ... services: django: &django ... By…
5
votes
5 answers

ERROR: Pidfile (celerybeat.pid) already exists

I am getting this issue while re-build and re-start cookiecutter-django docker-compose in production. I am able to solve this by either removing all stopped docker containers or by adding rm -f './celerybeat.pid' in…
Binoy Mathew
  • 123
  • 1
  • 2
  • 7
5
votes
1 answer

Cookiecutter template testing, what is cookies.bake?

I am Trying to figure out how to write a test suite for my cookiecutter template. after looking at the tests for the cookiecutter-django template in cookiecutter-django/tests/test_cookiecutter_generation.py I see that most of the test functions take…
Drafter250
  • 138
  • 9
5
votes
1 answer

Tilde (~) symbol on Django regex url (Cookiecutter Django)

After installing Cookiecutter Django i saw the tilde (~) symbol in regex and don't know the meaning for url purposes. It's related to a regular expression or only a way to declare paths? ./users/urls.py: urlpatterns = [ ... url( …
Nadav
  • 574
  • 10
  • 24
5
votes
2 answers

Deploying django app with docker, ALLOWED_HOSTS

I am trying to run a django app with docker, I am using the cookiecutter-django template that exists. When trying to run the app however, I get the following error: Bad Request (400) When looking at the log from the terminal I see the…
hY8vVpf3tyR57Xib
  • 3,574
  • 8
  • 41
  • 86
1
2 3
14 15