Giter Club home page Giter Club logo

djangoreact's Introduction

Django with React

There are a bunch of resources out there for getting started with Django and React and using the djangorestframework to generate an API. This repo. is a consolidation of some of these strategies.

Security

Security maybe a bit lacking on the Django Side. I am using this, django-cors-headers coupled with weak token based authentication which might open up security holes. If you choose to use this repo for anything beyond learning how to connect react and django, please research the security issues! For local development I am allowing localhost -> localhost connections which are prevented by most browsers for security reasons.

Database

This project uses a postgres Database and environmental variables that are stored in a separate file (.env). The .env file looks something like this:

{
  export DB_NAME='DBName'
  export DB_USER='UserName'
  export DB_PASS='UserPassword'
}

These data are then used by the settings.py file.

DB_NAME = os.environ['DB_NAME']
DB_USER = os.environ['DB_USER']
DB_PASS = os.environ['DB_PASS']

React

I am using react, redux (for global state), axios (for network communication), and react-redux as the major pieces. As you work through the repo and commits, you may see me pull in redux-saga, or pull out redux completely. My company uses redux and redux-saga and I am using this project to play around with some of these patterns. I'll try and make the commit history relatively clear!

Initial resource that I used to get started

'https://hackernoon.com/creating-websites-using-react-and-django-rest-framework-b14c066087c7'

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.