Code Monkey home page Code Monkey logo

drf-boiler-plate's Introduction

drf_boiler_plate

drf_boiler_plate is an initial DRF boilerplate project.

Getting started with this boilerplate:

(eg. in any Linux distribution, you can follow a similar process in another os also.)
  1. Create a project root directory in your local machine
mkdir <project_name> 
  1. Clone the project in this <project_name> directory (you can use ssh also)

  2. Create your virtual environment, activate that environment and install all the requirements

pip install -r requirements.txt
  1. collect all static files (if run for the first time it creates the assests folder in <project_name> directory)
django-admin collectstatic
  1. create env.py inside <project_name/django_project/config/settings/. Copy from env.example.py for the first time and update settings as your requirements.
  2. Remember <project_name>/django_project is the directory name from where you will run the server.

optional:

  1. Rename the drf_project by running following command (from inside of your Django environment):
django-admin rename_project <new_name_for_drf_project>
  1. run migrations
django-admin migrate
  1. create superuser
django-admin create_superuser

Folder Structure

<project_name>
|
|---assets (folder created once static files are collected)
|
|---drf_project
|   |---apps
|   |   |---core (custom app)
|   |   |   |---v1
|   |   |   |   |---views
|   |   |   |   |---serializers
|   |   |   |   |---urls.py
|   |   |   |   |---<other util files>
|   |   |   |---v2
|   |   |   |---<versions of apis>
|   |   |---...<other apps>...
|   |   |---urls.py
|   |
|   |---config
|   |   |---settings
|   |   |   |---base.py
|   |   |   |---env.py (ignored by git)
|   |   |   |---env.example.py
|   |   |
|   |   |---asgi.py
|   |   |---urls.py
|   |   |---wsgi.py
|   |   |
|   |   |static_files (all static files we use in development)
|   |   |---base (project as a whole specific static files)
|   |   |   |---css
|   |   |   |---img
|   |   |   |---js
|   |   |---core (my custom app specific)
|   |   |   |---css
|   |   |   |---img
|   |   |   |---js
|   |   |
|   |---templates
|   |   |---core (custom app specific)
|   |   |---<other app specific templates>
|   |   |---base.html (included basics of jquery and bootstrap)
|   |
|   |---.gitignore
|   |---manage.py
|   |---requirements.txt
|
|---media (folder created once items were uploaded)
|---db.sqlite3

drf-boiler-plate's People

Contributors

khushbu-thapa-outcode avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.