Skip to content

SoRobby/DjangoStarterTemplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DjangoStarterTemplate

A Django starter template for projects. Note: This is a work in progress.

Setup

  1. Clone the repository

  2. Create a virtual python environment

  3. Install the requirements from the "requirements.txt" file. Example using pip

    pip install -r requirements.txt
    
  4. Install the node modules from package.json. Navigate to \libs\npm\ which is where the package.json

    npm install
    
  5. Run python manage.py migrate to setup the local sqlite database. Run command from root folder of the project where the manage.py file is located.

  6. Run python manage.py runserver to start the django server.

  7. In a separate terminal, navigate to \libs\npm\ run npm run build-watch to start the webpack server that will compile Tailwind CSS in realtime.

Utility Hooks

Process form

  1. Add the x-data of x-data={ isProcessing: false } to the form element.
  2. Also on the form, @submit="isProcessing = validateForm('supportForm')"
<form id="myForm" 
      action="#"
      method="POST"
      x-data="{ isProcessing: false}"
      @submit="isProcessing = validateForm('supportForm')">
   ...   
</form>

About

A Django starter template for projects.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published