Skip to content

wachunei/django-project-template-py3

 
 

Repository files navigation

django-project-template-py3

A project template for Django 1.11 in Python 3

CircleCI CircleCI CircleCI

Get the code

Create a new repository for your django project and clone your repository into your computer.

Add the django-project-template-py3 github repo as a remote repository:

Pull the code from the project template:

  • git pull template master

Push to your own repo

  • git push origin master

Now you have your own django project in your repository.

Dependencies

This project works with:

  • Python >= 3.6
  • Python libraries defined in requirements.txt
  • Node >= 8.5
  • Node libraries defined in package.json
  • Postgress >= 9.6
  • pipenv, >= 11.9.0

Quickstart

If you are using Ubuntu 16.04 or OSX, the script quickstart.sh installs all dependencies of the project. It assumes you have yarn installed.

  • ./quickstart.sh

Start new app

Use the custom app template to create your apps:

python manage.py startapp --template=project/app_template answers

Javascript stuff

Select2

The project comes with select2 by default for all selects. If you wish to disable this feature add the class .js-not-select2 to the selec

eonasdan-bootstrap-datetimepicker

The project comes with eonasdan-bootstrap-datetimepicker by default for all inputs that have the .datetime-picker class.

disable on submit

The project disables all buttons and inputs of submit type within a form after submit. This is done with a timeout of 10 milliseconds to avoid not sending values of inputs with type submit. To disable this behaviour, add .js-do-not-disable-on-submit class to the buttons you don't want to disable.

App.utils

  • App.utils.showLoading(): Shows a spinner on the navbar and puts the cursor on wait
  • App.utils.hideLoading(): Reverts changes caused by showLoading on wait
  • App.utils.thousandSeparator(): for a given number in text, returns the text with thoushand separators (for spanish) on wait

About

A project template for Django in python 3

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 75.7%
  • HTML 17.0%
  • Shell 5.3%
  • JavaScript 1.2%
  • CSS 0.8%