My web development starter kit.
This kit is not intended to be used in production environments.
- Back-end: Django (with REST Framework)
- Front-end: ReactJS
- Styles: Semantic UI
Installation
- Create a project directory and cd into it.
- Clone the repository (note the dot as the last argument - clones the repository into the current directory without the project folder).
git clone https://github.com/ru13r/django-react-semantic.git .
- Create and activate virtual environment (Windows PowerShell commands, please visit virtualenv documentation for other operating systems)
mkvirtualenv venv-myproject
cd ~/Envs/venv-myproject
.\Scripts\activate
- Cd back to project directory
cd C:\Path-to-project-directory
- Install python packages
pip install -r requirements.txt
- Make migrations, populate database with sample data, create super user.
python manage.py makemigrations
python manage.py migrate
python manage.py populate_db
python manage.py createsuperuser
- Init NPM and install NPM packages
npm install --save-dev
Running
- Start webpack development server
node server.js
- Start django server (in a different console)
python manage.py runserver
Use the following links:
- http://127.0.0.1:8000/ - to visit landing page
- http://127.0.0.1:8000/content/ - to visit open content page
- http://127.0.0.1:8000/react-content/ - to visit page powered by ReactJS
A login will be required to view protected content. You will also be asked to verify your email - look in the console for the verification link.