Overview:
The django-svelte template is a tool used for creating django-svelte apps. It is designed to simplify the integration of svelte with django, and utilizes the webpack version of svelte’s template. The template comes with typescript and sass enabled by default, and includes integration with django’s urls and static files handling. Although it is still in beta, bugs are expected to be minimal. Any issues that do arise can be reported and addressed by the developers.
Features:
- Integration with django’s urls and static files handling
- Typescript and sass enabled by default
- Utilizes the webpack version of svelte’s template
Installation:
To install the django-svelte template, follow these steps:
- Download the current code and remove the git folder.
- Set up an active python3 virtualenv using the command
python3 -m venv my-appand activate it withsource my-app/bin/activate. - Navigate to the project folder.
- Install the dependencies by running
make install_dependencies. If you do not use NVM, you will need to manually install the dependencies usingnpm install --devandpip install -r requirements. - Copy the
env.examplefile to a.envfile and review the environment variables for better security. - If the installation was successful, you should be able to run the server at
localhost:8000by runningnpm run devand accessing it in your browser.
Summary:
The django-svelte template is a powerful tool for creating django-svelte apps. Its key features include integration with django’s urls and static files handling, as well as built-in support for typescript and sass. Although still in beta, it offers a seamless integration experience and any bugs that do occur are promptly addressed by the development team. By following the installation guide, users can easily set up the template and begin building their own projects.