Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dori-dev/django-sample
The sample project for django framework.
https://github.com/dori-dev/django-sample
django django-framework notes-app sample sample-app website
Last synced: 2 months ago
JSON representation
The sample project for django framework.
- Host: GitHub
- URL: https://github.com/dori-dev/django-sample
- Owner: dori-dev
- Created: 2022-07-28T12:36:21.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-07-28T12:46:25.000Z (over 2 years ago)
- Last Synced: 2023-03-05T17:29:19.307Z (almost 2 years ago)
- Topics: django, django-framework, notes-app, sample, sample-app, website
- Language: Python
- Homepage: https://dori-django-sample.herokuapp.com/
- Size: 61.5 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Django Sample
The sample project for django framework.
#
# How to Run Project
## Download Codes
```
git clone https://github.com/dori-dev/django-sample.git
``````
cd django-sample
```## Build Virtual Environment
```
python -m venv env
``````
source env/bin/activate
```## Install Project Requirements
```
pip install -r requirements.txt
```## Change .Env Files
set your environment variables in `.env.local` to `.env.production`.
## Set STATE Variable
if you doesn't set `STATE` environ variable, project run with `debug=False`
```
export STATE=LOCAL
```## Migrate Models
```
python manage.py makemigrations notes
``````
python manage.py migrate
```## Add Super User
```
python manage.py createsuperuser
```## Run Tests
```
python manage.py test
```## Run Project
```
python manage.py runserver
```## Open On Browser
Home Page: [127.0.0.1:8000](http://127.0.0.1:8000/)
Admin Page: [127.0.0.1:8000/admin](http://127.0.0.1:8000/admin/)#
# How to Deploy on Heroku
Push to Heroku:
```
heroku login
``````
heroku create
``````
git push heroku master
```Run bash on Heroku with `heroku run bash` and write this commands:
```
python manage.py makemigrations notes
``````
python manage.py migrate
``````
python manage.py collectstatic
``````
python manage.py createsuperuser
```Open your website:
```
heroku open
```See Logs:
```
heroku logs --tail
```#
## Links
Demo of Project: [dori-django-sample.herokuapp.com](https://dori-django-sample.herokuapp.com/)
Download Source Code: [Click Here](https://github.com/dori-dev/django-sample/archive/refs/heads/master.zip)
My Github Account: [Click Here](https://github.com/dori-dev/)