Skip to main content

Django-Frontier

The django front-end scaffold tool you requested.

django-frontier enable you to quickly scaffold a front-end for your django apps.

currently only (react, tailwindcss and react-tailwindcss) scaffolding is available


How to guide

before you install django-frontier, please make sure you have python install and you have a working django project either with with your local python installation or a virtual environment. We recommend the latter

  1. Open your terminal and install the package using pip
$ pip install django-frontier
  1. After the installation, add the 'frontier' app to your django settings
INSTALLED_APPS = [
...
'frontier',
...
]
  1. Now you can use the frontier command by navigating to the root of your project directory, where 'manage.py' file is and run the frontier with either preset (react, tailwind, or react-tailwind) example for react, run:
$ python manage.py frontier react

or

$ ./manage.py frontier react

This generates a resources directory with your react application scaffold.

  1. You can then compile your assets by running
$ npm run dev

or

$ npm run watch

This spits out the complied assets in a static/dist directory, which you can include in your django templates as such

# settings.py
STATIC_URL = '/static/'
STATICFILES_DIRS = (str(BASE_DIR.joinpath('static')),)
{% load static %}
<html>
<head>
...
<!-- if your dist folder includes a css files -->
<link rel="stylesheet" href="{% static 'dist/app.css' %}" />
...
</head>
<body>
<!-- for your react app -->
<div id="app"></div>
<script src="{% static 'dist/index.js' %}"></script>
</body>
</html>
...

For production, run the build command to minify the js and css for a smaller bundle and replace dist/ with build/ in your templates

$ npm run watch

NOTE: You can also configure the output destination for your bundles by configuring parcel in the package.json file. For more info on parcel, check out Parcel Js


  1. If you need help using the frontier command, run:
$ ./manage.py frontier -h

Enjoy 😇

Metadata

Release files for django-frontier 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-frontier 0.0.1
File Size Uploaded Provenance Actions
django-frontier-0.0.1.tar.gz 7.5 kB Without provenance Details for django-frontier-0.0.1.tar.gz

Release files / django-frontier-0.0.1.tar.gz

Download URL django-frontier-0.0.1.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
edd9b514170cbc58b177508a06e77b47c301d0b7c10a9a5e5f5529209a26ed93
BLAKE2b-256 checksum
How to use checksums
87e165e155be96e39856f22bf320936472d942d73a3edc9683e64ae51a8b96eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5

Security for django-frontier 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page