Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.
/ sample-django-app Public archive

Django skeleton app with super mega batteries included

License

Notifications You must be signed in to change notification settings

NobleSF/sample-django-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sample Django App

A skeleton for new projects prepared to become large applications Ready to deploy on Heroku

Features

  • Common models for document and image uploads, user addresses, and notes

  • Use django-simple-history to keep record of historical model state on every create/update/delete

  • Model Behaviors, Inspired by Kevin Stone's Django Model Behaviors.

    • Authorable: add assign user as author/creator and toggle public anonymity
    • Annotatable: add authored notes to any model
    • Expirable: set validitidy and expiration dates
    • Permalinkable: set url slug and define url pattern (great for blog posts or user profiles)
    • Publishable: set dates for publishing and editing
    • Timestampable: created_at and modified_at dates - great to add on all models (Rails has this on all models by default)
    • Uploadable: connect a model dircetly to all your file uploading features (great for documents
  • Communication App Models

    • Email
    • SMS
    • Slack, Telegram
  • Enhanced Default User Model

    • email verification
    • can use phone number instead of email for login, password reset
    • check has agreed to latest legal T&C
    • OTP code
    • Facebook login tokens
  • Common Utilities

    • AWS S3 and SQS connection methods
    • multithreading - see related SO answer
    • WritableSerializerMethodField for Django Rest Framework
    • WhoIs domain lookups
    • Transloadit integration methods
    • Auth tokens for JWT
    • Wordwide language codes for your L11N
    • Iommi classes

Docker

  1. How to install docker
  • go to this page https://docs.docker.com/docker-for-mac/ and Follow first step
  1. How to run develop environment
  • docker-compose up --build
  1. How to stop develop environment
  • docker-compose stop
  1. How to shell to develop environment
  • docker-compose exec web bash
  1. How to run test
  • docker-compose exec web python manage.py test
  1. Install new pagkage in requirement.txt have to build docker again(ps. It like a vagrant destroy and vagrant up again, all data gone)
  • docker-compose down && docker-compose up --build
  1. Check test coverage
  • shell to docker docker-compose exec web bash
  • run test coverage coverage run manage.py test
  • see report coverage report
  • Ps you can run on your host sever for example docker-compose exec web coverage run manage.py test