Giter VIP home page Giter VIP logo

django_react_test's Introduction

django_react_test

Usage

1. Navigate to the django-react-boilerplate directory

$ cd django-react-boilerplate

2. Set up environment

Conda environment is used and the dependencies are shown in requirements.txt.

  1. Create conda environment, in my case, my environment name is django_react_test_env.
$ conda create -n django_react_test_env python=3.7
$ conda activate django_react_test_env
  1. Install dependencies.
$ pip install -r requirements.txt

3. Run server

$ python manage.py runserver

4. Test

  1. Enter your username at http://127.0.0.1:8000/.
  2. See your username at http://127.0.0.1:8000/api/data/.

Notes for Testing and Development

  1. Navigate to the django-react-boilerplate directory.
$ cd django-react-boilerplate
  1. You may need to run the following lines once.
$ python manage.py makemigrations
$ python manage.py migrate --run-syncdb

or

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

Whenever you start the server, run the following line to start the development server at 127.0.0.1:8000.

$ python manage.py runserver

When you only change python codes, you do not need to restart the server every time since django offers hot-reload.

  1. Whenever you change your frontend codes such as index.js and index.css, run the following line.
$ yarn build
  1. If you are only developing frontend codes. You can use hot-reload. It is suggested to run the following line to start another development server at localhost:3000. Remember that this server only contains frontend codes.

django_react_test's People

Contributors

michaelfong2017 avatar

Watchers

 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.