Skip to content

app-generator/dynamic-django

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Dynamic Programming Patterns applied in Python/Django - actively supported by AppSeed.

LIVE DEMOs & official documentation

Dynamic Django - Dynamic Programming Patterns applied in Python/Django.

Features

  • [OK] Dynamic DT
  • [OK] Dynamic Charts
  • [OK] Dynamic API via DRF
  • [OK] Powerful CLI tools

Quick Start

NOTE: Requires a purchase, secured by GUMROAD.

# Clone Repo
$ git clone https://github.com/app-generator/priv-dynamic-django.git

Create VENV

$ virtualenv env
$ source env/bin/activate
$ pip install -r requirements.txt

Set Up Database

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

Start the Project

$ python manage.py createsuperuser # create the admin
$ python manage.py runserver       # start the project

Update model

$ python
>>> from cli import *
>>> add_model('home', 'Stats')
>>> # Syntax: model_add_field('APP_NAME_HERE', 'MODEL_NAME_HERE', 'FIELD_NAME',  'FIELD_TYPE') 
>>> add_model_field('home', 'Stats', 'aInt',  'int') 
>>> add_model_field('home', 'Stats', 'aChar', 'str')
>>> add_model_field('home', 'Stats', 'aText', 'text')

The file is automatically reformated using black and DB migrated.

DB Backup / RESET / Restore

$ python manage.py dbbackup  -o 20240930-001.dump  # backup 
$ python manage.py reset_db                        # RESET_DB [ Danger, all tables wipped ]
$ python manage.py dbrestore -i 20240930-001.dump  # restore 

Dynamic Django - actively supported by AppSeed.