https://github.com/gitpod-samples/template-django-cookiecutter
cookiecutter-django template with Gitpod
https://github.com/gitpod-samples/template-django-cookiecutter
cde cookiecutter cookiecutter-template django gitpod template
Last synced: 3 months ago
JSON representation
cookiecutter-django template with Gitpod
- Host: GitHub
- URL: https://github.com/gitpod-samples/template-django-cookiecutter
- Owner: gitpod-samples
- Created: 2023-04-19T03:28:18.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-04-19T03:30:47.000Z (about 2 years ago)
- Last Synced: 2025-01-24T12:45:31.816Z (5 months ago)
- Topics: cde, cookiecutter, cookiecutter-template, django, gitpod, template
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Gitpod django cookiecutter sample
A gitpod sample configured to quickly set up production ready django applications in the cloud using [cookiecutter-django](https://github.com/cookiecutter/cookiecutter-django).
## Getting Started
Click the button below to start the workspace[](https://gitpod.io/#https://github.com/gitpod-samples/template-django-cookiecutter)
Follow all the onscreen prompts accordingly and make sure the `project_name` is the same both times you're prompted to enter it as shown below:
```
project_name: monty
project_name [My Awesome Project]: monty
project_slug [monty]:
```
Postgres is already enabled in the workspace, so all you need to do is create a database with the same name as your project:
```
psql -U gitpod
CREATE DATABASE project_name;
```
Now for it to work you need to define a `DATABASE_URL` variable either in the `base.py` settings file or preferably a `.env` file that isn't included in VCS. The default database connection string looks like this `postgres:///dbname` the one you define should be in this format `postgres://user@localhost:port/dbname`.And then migrate your database:
```
python manage.py migrate
```
### Happy coding!!!![]()