Skip to content

Django boilerplate for any scalable WebApp project. Equipped with users apps, celery, lightbox.js, dropzone.js and cropper.js

Notifications You must be signed in to change notification settings

CodingMantras/Django-Advanced-Boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django Advance Boilerplate With Different Image Upload Apps

Django boilerplate for any scalable WebApp project.

This boilerplate is equipped with users app, celery, django-debug-toolbar, lightbox.js, dropzone.js and cropper.js.

Overview

Login

Register

Registration under approval

  • Login through django admin after createsuperuser command, in users model check active box.
  • Logout from django admin
  • Restart app and login again.

Main page

Upload single image app

Cropperjs

Images uploaded via dropzone

Why this boilerplate?

  • To avoid the repetitive tasks of setting up a new Django Web App project. If a project requires image upload, and user login/register functionalities, this boilerplate can be used for easy start up.

Project Structure

  • Separate app folder containing all apps

    • Apps details:
      • singleimages: To upload single image at a time using django forms and models.

      • multipleimages: To upload multiple images using django forms and models.

      • croppedimages: To upload single original image using django forms and models, and then cropping that image(using cropperjs) and storing all cropped images corresponding to the orig image.

      • dropzoneimages: To upload multiple images using dropzonejs.

      • Users: A users app with login, logout and sign up pages.

  • Reusable/Pluggable Apps

    • All apps can be added to other projects with tweaking a little.(Yes few lines need to be added or deleted from settings, urls, and views if an app is removed.)
  • Settings.py

    • base.py
    • development.py
    • production.py
    • test.py
  • Secrets.json (For boilerplate only. Preferably add in .gitignore)

    • To store database, email backend credentials and the secret-key
  • static

    • Local static files with, bootstrap
  • Templates folder

    • base.html
    • partials folder contains _nav,_paginator, _scripts and other html file
  • Requirements folder

    • Separate for base, development, production & testing

Other Python Packages

  • django-crispy-forms
  • crispy-bootstrap4
  • Pillow
  • Django-cleanup
  • OpenCV
# install dependencies
pip install django-crispy-forms crispy-bootstrap4 Pillow Django-cleanup opencv-python

pip install celery django-celery-beat django-celery-results

pip install django-debug-toolbar

Task queue manager

  • Celery

Javascript

  • Ekko-lightbox: To display images in a lightbox.

  • Dropzonejs: To upload multiple images

  • Cropperjs: To crop an image at front-end

Used dependencies

This boilerplate relies on the following plugins, libraries and frameworks:

Hit star ⭐ if you find this helpful!