Coder Social home page Coder Social logo

kn-django-cookiecutter's Introduction

Django with Cookiecutter

A Cookiecutter_ template for django_ to deliver your website with a strong Django backend.

Features

  • Select CMS package from django-cms or wagtail
  • django compressor included
  • Amazon S3 for static files

Installation and usage

First, get cookiecutter

$ pip install cookiecutter

Now run it against this repo

$ cookiecutter https://github.com/KuwaitNET/kn-django-cookiecutter

You'll be prompted for some questions. After project generation, you'll find a README.rst in which you'll find all information to sync your database with fake migrations. Before your first commit remember to change (if required) the LICENSE file.

Docker Instructions

To start this application in docker

  1. create a .env.dev in the parent directory (next to Dockerfile) with these variables

    DEBUG=1 SECRET_KEY=foo DJANGO_ALLOWED_HOSTS=localhost 127.0.0.1 [::1] SQL_ENGINE=django.db.backends.mysql SQL_DATABASE=hello_django SQL_USER=hello_django SQL_PASSWORD=hello_django SQL_HOST=db

  2. Execute

    docker-compose up --build (add -d to make run in the background)

    You'll need to run this command each time you change something in the env or in the code.

    For first time run, you'd need to execute these commands too

     `docker-compose exec web python {{ cookiecutter.project_name}}/manage.py migrate`
    
     `docker-compose exec web python {{ cookiecutter.project_name}}/manage.py createsuperuser`
    
  3. For logs, use this command

    docker-compose logs -f

  4. To Finish The docker session

    docker-compose down

  5. To reclaim space and remove dangling images

    docker image prune

    You can check here https://www.digitalocean.com/community/tutorials/how-to-remove-docker-images-containers-and-volumes for other options

  6. settings file used is docker.py in {{ cookiecutter.project_name}}/{{ cookiecutter.project_name}}/settings/. You can edit it as you want

kn-django-cookiecutter's People

Contributors

abahnihi avatar ahmadcasper2018 avatar dipen30 avatar ecugol avatar hhhmha avatar jab3z avatar mouiad-jra avatar ramezissac avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

kn-django-cookiecutter's Issues

incorrect import in tests

in user/tests.py the import is not correct
from <project>.users.models import User
should
from user.models import User

readme usage link is outdated

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.