This project I created is more of a template connection that allows a developer to connect Django and Dash from an API endpoint. I store the data throughout a dash application’s DCC.Store in that allows a user to use the data throughout individual pages.

Reason to building project architecture out like this?

Basically Django in my opinion is a strong backend framework and Dash is a strong frontend framework. My approach is to take the best of both combine them and make the development of each framework separate. One of the major weaknesses in web development with Django is mobile development. I setup the dash application to act as a mobile version where Django is focused on API, running scripts, desktop website, and backend development with an admin portal.

I only setup this project to work with a login authentication and get_user_info but I have a boilerplate for the register, refresh_user_token, verify_user_token, account_location, and update_account in the data/ that can be expanded to allow more functionality in the / pages for user’s profile pages and authentication.

Basic setup:

  • create and activate an env
  • pip install -r requirements.txt
  • cd into django_backend
  • Connect Postgres database in django_backend/django_backend/
  • python makemigrations
  • python migrate
    - python collectstatic
  • python createsuper user
  • python runserver
  • login to and create a profile for your account
  • run
  • go to: (dash app)
  • login in from the navbar, creates a modal
  • Fetch Data button click to show logged-in account or go to to see the account logged into Dash app.