daniiche / sitemach

Industrial machines info repositiry

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Single page application on Django with React and Rest Framework

Full stack Django/React/Redux app that uses token based authentication with Knox.

Usage on Django, React Js & Rest API

Setup virtualenv (not required)

mkvirtualenv myenv

Install dependencies

pip install -r requirements.txt
npm install

Set up PostgreSQL and add configurations into a hidden file .env DATABASE_URL=postgres://NAME:PASS@localhost:/DBNAME

Django migrate, create admin user

python manage.py migrate
python manage.py createsuperuser

Run django server, serve API on 127.0.0.1:8000

python manage.py runserver

Login to Django Admin

http://127.0.0.1:8000/control/

Build frontend and collect static files

npm run build
python manage.py collectstatic

Or run webpack server in dev mode

# Run webpack (from root)
npm run dev

Open the site

http://127.0.0.1:8000/

About

Industrial machines info repositiry


Languages

Language:CSS 41.6%Language:JavaScript 39.6%Language:Python 12.9%Language:PostScript 4.9%Language:Shell 0.5%Language:HTML 0.3%Language:Roff 0.2%