/webdev

Primary LanguagePython

WEDDEV is an collection of Django apps for learning purposes

Django apps : 

1) ftl - simle api endpoint to fetch user

2) auth - override basic auth of django rest

Getting started open a terminal follow the instructions below

 > git clone https://github.com/NishantGhanate/webdev

 > cd webdev

 > virtualenv venv

 > venv\Scripts\activate

 > pip install -r requirements.txt

Generate Django secret key :

from django.core.management.utils import get_random_secret_key

get_random_secret_key()

'[GENERATED SECRET KEY]'

Env file

Simply create a .env text file on your repository’s root directory where manage.py exists , then paste GENERATED SECRET KEY :

DEBUG=True
ALLOWED_HOSTS=127.0.0.1,localhost
SECRET_KEY=+jfvhj1(r@................
DB_HOST = 127.0.0.1
DB_NAME = test
DB_USER = root
DB_PASSWORD = root
DB_PORT = 3306

Run :

> python manage.py runserver 

Deploy project on heroku

 > Create app in Heroku 

 > Connect via Github add git repo & branch

 > Deploy Brach 

Hosted :-

Platform URL
Heroku https://webdevdjango.herokuapp.com/

Debug Heroku

Check project has ( runtime.txt , procfile ) and correct content runtime.txt procfile

No static issue

> heroku login 

> heroku apps
 - <your_heroku_apps>
 - webdevdjango 

> heroku config:set DISABLE_COLLECTSTATIC=1 --app webdevdjango