https://github.com/trafitto/django-startup-template
Simple template for starting new project with Django and DjangoRest with Docker
https://github.com/trafitto/django-startup-template
django django-rest-framework docker docker-compose
Last synced: 2 months ago
JSON representation
Simple template for starting new project with Django and DjangoRest with Docker
- Host: GitHub
- URL: https://github.com/trafitto/django-startup-template
- Owner: Trafitto
- Created: 2020-06-09T20:07:26.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-02-18T00:07:26.000Z (over 5 years ago)
- Last Synced: 2025-12-29T12:24:19.200Z (6 months ago)
- Topics: django, django-rest-framework, docker, docker-compose
- Language: Makefile
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Django startup template
##### Simple template for starting new project with Django and DjangoRest with Docker
Build and open the container
`make build`
`make up`
With the container up
`make bash`
Create a Django project
`django-admin startproject mysite`
##### Important!
Use pip freeze to view specific versions of the requirements and fix them so they don't change anymore
`pip freeze`
ex:
requirements.txt
django==3.0.7
djangorestframework==3.11.0
psycopg2==2.8.5
psycopg2-binary==2.8.5
pytz==2020.1
ipdb==0.13.2
gunicorn==20.0.4
Create a Django app
`python manage.py startapp myapp`
Creating files with Docker may need to add permissions to the current user,
So in the project root:
`sudo chown -R $USER .`
Change Django settings to work with Postgres
Add `rest_framework` to `INSTALLED_APPS` in Django settings
Finish to setup Django...