• This repository has been archived on 16/Nov/2018
  • Stars
    star
    789
  • Rank 57,694 (Top 2 %)
  • Language
    JavaScript
  • Created over 8 years ago
  • Updated over 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An example how you can use ReactJS with your Django project.

Django ReactJS Boilerplate

This repository was used for my talk at the Python User Group Singapore March Meetup 2016

I gave the talk a second time at a PyLadies meetup and it was recorded by Engineers.SG.

The goal is to show how you can use ReactJS in your existing Django apps today.

This is far from perfect. This approach is not universal, so it only works for components that don't need to be indexed by Google (and thus need to be pre-rendered on your server). However, the highly interactive stuff usually happens behind a login form anyways (think Trello: They have a few static pages to advertise their product but the real app is behind a login).

Credit where credit is due:

This awesome blog post by Owais Lone finally pushed me into the right direction: http://owaislone.org/blog/webpack-plus-reactjs-and-django/

Try this on your machine

You can clone this repository, install all dependencies and try it in your browser quite easily:

git clone https://github.com/mbrochh/django-reactjs-boilerplate.git
cd django-reactjs-boilerplate/django
mkvirtualenv djreact
pip install -r requirements.txt
npm install
./manage.py migrate
./manage.py runserver

# in another terminal:
node server.js

Follow my train of thought

If you want to learn how I came up with this repository, you can follow my train of thought by going into all those branches.

The README.md in each branch will tell you what you need to do in order to get to a state that is (hopefully) equal to that branch. If anything doesn't work, just compare your files to the ones in the branch. If your really can't figure it out, just checkout that branch and run it locally and play with it for a while, then move on to the next branch.

Start with Step 1: Create your Django project

More Repositories

1

vim-as-a-python-ide

Example code from my PyCon APAC 2012 talk.
Vim Script
546
star
2

django-graphql-apollo-react-demo

Code for a workshop about my Django, GraphQL, ReactJS, Apollo-stack
Python
332
star
3

django-react-primer

A collection of links and thoughts on how to incorporate React.js into a complex Django toolchain
217
star
4

mbrochh-dotfiles

Shell
85
star
5

react-apollo-graphql-demo

Code for a talk that I gave at the TalkJS Singapore June meetup
Python
34
star
6

tdd-with-django-project

Code for my PyCon APAC 2012 talk on TDD with Django for Django projects
Python
24
star
7

tdd-with-django-reusable-app

The code for my PyCon APAC 2012 talk about TDD with Django for a reusable app
Python
19
star
8

django-testing-cookbook

Dummy-code for a Singapore Djangonauts talk
Python
14
star
9

whisper-youtube-transcribe

Code and slides for a beginner presentation titled "Introduction to ChatGPT, Whisper & Github Copilot for Python Development"
Python
8
star
10

mbrochh-blog

My personal blog, powered by Github Pages and Pelican
Makefile
5
star
11

pelican-responsive

A minimalistic and responsive pelican theme
5
star
12

linux-essentials

Slides for a hands-on tutorial about Linux essentials
JavaScript
4
star
13

logseq-faiss-chatgpt

Code and slides for a beginner presentation titled "Talk to your notes with Logseq and ChatGPT!"
Python
4
star
14

installing-python

3
star
15

mbrochh.io

My personal website
JavaScript
3
star
16

py-erudite

Knowledge retrieval tool written in Django & Remix, based on embeddings and vector search
Python
3
star
17

nodebox-ansible

An attempt to create an Ansible script for k3tan's nodebox video tutorials on Youtube.
2
star
18

razzle-loadable-components

Test-repo to invite others help me get this right...
JavaScript
2
star
19

kindle-scrape-summarise

About Code and slides for a beginner presentation titled "Summarising books with ChatGPT, Python and Logseq"
Python
2
star
20

social-notifications-cli

A command line tool that prints recent notifications from various social media sites.
1
star
21

pugsg_20120302

Pyhton User Group Singapore Meetup: Talk about vim as a Python IDE
Python
1
star
22

django-bootcamp

Python
1
star
23

introducing-elasticsearch-fixtures

Code for my presentation at Python User Group Singapore 2019 meetup
Python
1
star
24

pugsg_20120419

Code for my Python User Group SG talk: Test Driven Development with Django
1
star