Skip to content

Repository files navigation

Free Django Website Template

Contributions are welcome if they help keep this the most basic, ready-to-use Django template. All submissions will be reviewed. If changes are needed, I’ll reach out to help you improve your contribution. Credits will be given and can be used in your portfolio.

if you are a contributor please make a branch first:

```sh
    git checkout -b branch-name
```

What does it look like though?
  • Basic home page contact page

Installation

  1. Check the latest stable Django version: Django Downloads - This template uses Django 4.2 LTS: sh pip install "django>=4.2,<4.3"
  2. Create a virtual environment: sh python -m venv .venv
  3. Activate the virtual environment: - On Windows (PowerShell): sh .\.venv\Scripts\Activate - On macOS/Linux: sh source .venv/bin/activate
  4. Install dependencies: sh pip install -r requirements.txt

Project Structure

  • The Django project is called config.
  • manage.py is in the project root for easier terminal commands.
  • Templates are in the root-level templates/ folder.
  • Static files are in the root-level static/ folder.
  • settings.py is already set up with:
    • TEMPLATES[0]['DIRS'] = [BASE_DIR / 'templates']
    • STATICFILES_DIRS = [BASE_DIR / 'static']
    • STATIC_ROOT = BASE_DIR / 'staticfiles'

Usage

Running the Development Server

python manage.py runserver

Home Page Without an App

You can serve a home.html template from the root templates/ folder without creating a Django app. The root urls.py is set up to render this template directly.


Static Files

To collect static files for production:

python manage.py collectstatic

This will create a staticfiles/ folder in the root.


Bootstrap

Bootstrap 5 is included via CDN for quick development. You can add your own styles in the static/ folder.


Creating an App

When you’re ready to add an app:

python manage.py startapp <appname>

This will create a new folder with the basic app structure.


License

  • Free to use

Credits

  • Django

Finally

Good luck! have fun! farewell!

About

I want to create a fundamentally basic template that myself and other people can use, to drag and drop a template ready to embark on the next invoice. I want to keep this as basic and as useful as possible.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages