Code Monkey home page Code Monkey logo

django-cookiecutter's Introduction

Django cookiecutter template

Cookiecutter template for Django using Postgres, htmx and Tailwindcss.

The Stack:

PACKAGE VERSION
Python 3.8
Django 4.0.4
Postgres latest
htmx 1.7.0
Tailwindcss 3.0

How to use

Install the latest Cookiecutter:

pip install cookiecutter

Generate a new Project:

cookiecutter https://github.com/Alurith/django-cookiecutter.git

Create the .env file (update with your own values):

# postgres variables for docker
POSTGRES_DB = database_name
POSTGRES_USER = user
POSTGRES_PASSWORD = password
POSTGRES_ROOT_PASSWORD = rootpassword

# database url for dj-database-url
DATABASE_URL = postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}

# DJANGO
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
# NOTICE: this key is generated by cookiecutter.
SECRET_KEY="my-really-secret-secret_key" 

Run the project with docker:

docker-compose up 

Done!

Update Philosophy

The stability of this stack is the main focus, so we will do any upgrade only in case of vulnerabilities or if some package has some interesting new features. The main branch will always host the latest version. Also, each version will have its tag and changelog.

Issues & Pull Request

Please describe your issue as clear as possible, so I can replicate the issue. Also, if you already worked on a fix you can submit a pull request.

django-cookiecutter's People

Contributors

alurith avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

django-cookiecutter's Issues

Fix cookiecutter configuration

The following variables should be rendered without user interaction:

  • "app_name_slug": "{{ cookiecutter.app_name|lower|replace(' ', '-') }}",
  • "app_class": "{{ cookiecutter.app_name_slug|lower|replace(' ', '-') }}",
  • "project_slug": "{{ cookiecutter.project_name|lower|replace(' ', '-') }}",

But if I add the double underscore as suggested in the cookiecutter manual like this:

  • "__app_name_slug": "{{ cookiecutter.app_name|lower|replace(' ', '-') }}",
  • "__app_class": "{{ cookiecutter.app_name_slug|lower|replace(' ', '-') }}",
  • "__project_slug": "{{ cookiecutter.project_name|lower|replace(' ', '-') }}",

The behavior is that it doesn't render the variable at all.

My Cookiecutter version is 1.7.3

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.