Dynamic Django#

Dynamic Django aims to simplify the data processing and consolidation via generated APIs, DataTables, Charts and CLI tools.

👉 New toApp-Generator? Sign IN withGitHub orGenerate Web Apps in no time (free service).

Key features#

  • Dynamic DataTables: using a single line of configuration, the data saved in any table is automatically managed

  • Dynamic API : any model can become a secure API Endpoint using DRF

  • Dynamic Charts: extract relevant charts without coding all major types are supported

  • CSV Loader: translate CSV files into Django Models and (optional) load the information

  • Powerful CLI Tools for the GIT interface, configuration editing, updating the configuration and database (create models, migrate DB)

Download Sources#

To get the product navigate to thepayment page and complete the purchase.Unpack the ZIP archive and folow these steps:

Unzip Dynamic Django#
unzipdynamic-django.zipcddynamic-django

Once the source code is unzipped, the next step is to start it and use provided features.

Project Files#
<DynamicDjango>||--core/||--settings.py# Project Configuration||--urls.py# Project Routing||--cli/# CLI helpers|--django_dyn_api/# Dynamic API module|--django_dyn_charts/# Dynamic Charts|--django_dyn_dt/# Dynamic DataTable||--requirements.txt# Project Dependencies||--build.sh# Render Builder Script|--render.yaml# Render Deeployer||--.env# ENV Configuration (default values)|--manage.py# Start the app - Django default start script

Building the project#

It’s best to use a Python virtual environment for installing the project dependencies. You can use the followingcode to create the virtual environment

virtualenvenv

To activate the environment execute.envScriptsactivate.bat for Windows orsource env/bin/activate on Linux-based operating systems.

Having theVENV active, we can proceed and install the project dependencies:

pipinstall-rrequirements.txt

Core Dependencies#

The starter requires the following in order to be succesfully started:

  • Python 3.10 (or above)

  • (Optional) Git command line - used by the versioning system

  • (Optional) MySql or PostgreSQL DB Servers- if the default SQLite is not enough

  • A modern code editor like VsCode or Sublime

The python version can be easily check in the terminal by typing:

python--versionPython3.12.0

Environment Settings#

The starter loads the environment variables from.env file. Here are the critical ones:

  • DEBUG: set by default to False (development mode)

  • SECRET_KEY: a random value used by Django to secure sensitive information like passwords and cookie information

  • Database Credentials:DB_ENGINE,DB_USERNAME,DB_PASS,DB_HOST,DB_PORT,DB_NAME
    • if detected, the database is switched automatically from the default SQLite to the specified DBMS

Setting up the Database#

By default, the applicationuses SQLite for persistence. In order to useMySql/PostgreSQL, you’ll need to install the Python driver(s):

pipinstallmysqlclient# for MySql# ORpipinstallpsycopg2# for PostgreSQL

To connect the application with your mySQL database, you’ll need to fill in the credentialsint the.env file and run the migrations.

.env#
DB_ENGINE=mysql# ORDB_ENGINE=postgresql# DB credentials belowDB_HOST=localhostDB_NAME=<DB_NAME_HERE>DB_USERNAME=<DB_USER_HERE>DB_PASS=<DB_PASS_HERE>DB_PORT=3306

Use the following commands to seed your data:

pythonmanage.pymakemigrationspythonmanage.pymigrate

Running the project#

You can run Dynamic Django locally or deploy it on Render. If you want to run the server locally, you’ll need to run the following command:

pythonmanage.pycreatesuperuserpythonmanage.pyrunserver

Access the project in your preferred browser and access the dynamic features.

Homepage Dynamic Django - a tool that provides dynamic services for Django

Contents#