https://github.com/wilspi/django-templatestore
template editor and storage tool
https://github.com/wilspi/django-templatestore
django django2 handlebars jinja2 python react template
Last synced: about 1 month ago
JSON representation
template editor and storage tool
- Host: GitHub
- URL: https://github.com/wilspi/django-templatestore
- Owner: wilspi
- License: apache-2.0
- Created: 2020-01-19T09:50:29.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-06-18T09:03:29.000Z (10 months ago)
- Last Synced: 2025-03-20T10:19:27.466Z (about 1 month ago)
- Topics: django, django2, handlebars, jinja2, python, react, template
- Language: JavaScript
- Homepage:
- Size: 23.7 MB
- Stars: 9
- Watchers: 4
- Forks: 6
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# django-templatestore
`django-templatestore` is a [Django](https://www.djangoproject.com/) 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`](https://pypi.org/project/django-templatestore/0.1/)
```
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](https://github.com/wilspi/django-templatestore/releases)### Templating Library Support
Currently following templating libraries are supported:
- [x] [`jinja2`](https://www.palletsprojects.com/p/jinja/)
- [ ] [`handlebarsjs`](https://handlebarsjs.com/guide/)### Development
* #### Setup* Install `nix`
Follow steps [here](https://gist.github.com/wilspi/aad81f832d030d80fca91dfa264a1f8a), 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](/issues) :)* #### 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
```