GithubHelp home page GithubHelp logo

pooria-ghorbani / django-react-user-roles Goto Github PK

View Code? Open in Web Editor NEW

This project forked from app-generator/django-react-user-roles

0.0 0.0 0.0 27 KB

Django & React - Extended User & Roles (free) | AppSeed

License: Other

Shell 0.67% JavaScript 4.11% Python 43.72% HTML 50.44% Dockerfile 1.05%

django-react-user-roles's Introduction

Open-source Django Starter bundled with React, React-Flow - Actively supported by AppSeed.


Feature:

  • ๐Ÿš€ Stack: Django & React
  • โœ… Tooling: Webpack
  • โœ… Design: Django Theme Datta - Free Version
  • โœ… Sections covered by the design:
    • โœ… Admin section (reserved for superusers)
    • โœ… Authentication: Django.contrib.AUTH, Registration
    • โœ… All Pages available in for ordinary users
  • ๐Ÿš€ Deployment: Docker, CI/CD flow via Render

Django & React Codebase - Free Starter by AppSeed.


Start with Docker

๐Ÿ‘‰ Step 1 - Download the code from the GH repository (using GIT)

$ git clone https://github.com/app-generator/django-react-starter.git
$ cd django-react-starter

๐Ÿ‘‰ Step 2 - Start the APP in Docker

$ docker-compose up --build 

Visit http://localhost:5085 in your browser. The app should be up & running.


Manual Build

Download the code

$ git clone https://github.com/app-generator/django-react-starter.git
$ cd django-react-starter

๐Ÿ‘‰ Set Up for Unix, MacOS

Install modules via VENV

$ virtualenv env
$ source env/bin/activate
$ pip3 install -r requirements.txt

Set Up Database

$ python manage.py makemigrations
$ python manage.py migrate

Start the APP

$ python manage.py createsuperuser # create the admin
$ python manage.py runserver       # start the project

At this point, the app runs at http://127.0.0.1:8000/.


๐Ÿ‘‰ Set Up for Windows

Install modules via VENV (windows)

$ virtualenv env
$ .\env\Scripts\activate
$ pip3 install -r requirements.txt

Set Up Database

$ python manage.py makemigrations
$ python manage.py migrate

Start the APP

$ python manage.py createsuperuser # create the admin
$ python manage.py runserver       # start the project

At this point, the app runs at http://127.0.0.1:8000/.



Profile

  • We have created a model UserProfile and make one to one relationship between User and UserProfile. That means a user has only one profile.
  • Signals used for:
    • We are using signals for creating a new profile automatically.
    • Here we have used post_save signals. That means when a new User is created a new Profile will create automatically.
  • In apps.py file we have add this line of code. Here we have registered the signals with the app by importing the signals inside ready method. It is important to include cause we have used receiver in signals.py file.
      def ready(self):
          import apps.home.signals
    


Codebase Structure

The project is coded using a simple and intuitive structure presented below:

< PROJECT ROOT >
   |
   |-- core/                            
   |    |-- settings.py      # Project Configuration  
   |    |-- urls.py          # Project Routing
   |
   |-- apps/
   |    |-- home/            # Handle the default route  
   |
   |-- frontend/             # React Code
   |
   |-- requirements.txt      # Project Dependencies
   |-- manage.py             # Start the app - Django default start script
   |
   |-- ************************************************************************


Django & React Codebase - Open-Source starter crafted by AppSeed.

django-react-user-roles's People

Contributors

app-generator avatar mominur-helios 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.