Skip to content

The basic django rest framework boilerplate/scaffolding for quick project setup.

Notifications You must be signed in to change notification settings

TuxEducation/Django-SwiftStart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django Rest Scaffolding

Requirements

Recommended editor:
Prerequisite knowledge:

Python, Django, MySQL, Virtual Environment

System requirements:
  • Python Version : 3.6 or later
  • Django Version : 2.0 or later
  • MySQL Version : 8.0 or later

Getting Started

Note - Mac users can also use Auto setup script to setup the scaffolding/project.

  1. Create a virtual environment (Recommend to use Virtual Environment Wrapper)
mkvirtualenv --python=`which python3` scaffolding -r requirements.pip

Note: if you face error related to the mysqlclient (Check troubleshooting below)

sudo pip install mysqlclient
  1. Create a project database using MySQL console
mysql -u root -p
create database scaffolding_development;
  1. Set environment
cp .env.sample .env

Note: update .env file variables as per your requirements.

Auto Setup Script

Note: Setup script is only tested and created for Mac OS.

  1. run chmod 555 setup_mac_beta.sh to give read and execute permission to setup_mac_beta.sh file.

  2. run in terminal ./setup_mac_beta.sh and follow the instructions.

Commands

  • python manage.py runserver - For starting development server.
  • python manage.py runserver --settings=main.settings.production - For starting production server.
  • python manage.py shell - For starting interactive python shell.
  • python manage.py makemigrations articles - For creating app migrations.
  • python manage.py migrate - For applying migrations.
  • pip freeze - To view installed python packages.

Dependencies

Future Enhancement

  • Add comments to all the files
  • Add unit test cases

Troubleshooting

Contributing

  1. Fork it ( https://github.com/TuxEducation/Django-SwiftStart/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new pull request.