Skip to content

wilspi/django-templatestore

Repository files navigation

django-templatestore

Python application

django-templatestore is a Django application/ UI tool to edit and save your templates.

Quick start

Follow steps to quickly add django-templatestore to your existing django application:

  1. Install django-templatestore
    pip install django-templatestore
    
  2. Add templatestore to your INSTALLED_APPS in settings.py:
    INSTALLED_APPS = [
        ...
        'templatestore',
    ]
    
  3. Include the templatestore URLconf in your project's urls.py:
    path('templatestore/', include('templatestore.urls')),
    
  4. Run python manage.py collectstatic to collect the static files into root static folder.
  5. Run python manage.py migrate to create the templatestore models.
  6. Start the development server and visit http://127.0.0.1:8000/templatestore/ to start editing templates.

Changelog

Here

Templating Library Support

Currently following templating libraries are supported:

Development

  • Setup

    • Install nix
      Follow steps here, if not done already
    • Run
      nix-shell --pure shell.nix
      
      • shell.nix is tested on Arch Linux, Ubuntu, Macos
        Failing to run: please raise issue here :)
  • Update requirements

    • python
      pip install -r requirements.txt # python
      
    • node
      cd templatestore/frontend/ && npm install && cd - # node packages
      
  • Run

    • Migrate database
      python manage.py migrate
      
    • Build js and collect static files
      cd templatestore/frontend/ && npm run build && cd - && python manage.py collectstatic --noinput
      
    • Run application
      python manage.py runserver