Code Monkey home page Code Monkey logo

cookiecutter-sveetch-djangoapp's Introduction

cookiecutter-sveetch-djangoapp

Yet another Cookiecutter template to produce a repository to start a Django application package with Python3.

It emphases on simple package with quality and not any relation to any service (state badge, pyup, travis, etc..) except Read the Docs link in README.

A sample built from this template is available on repository sveetch-djangoapp-sample.

Usage

Just invoke the Cookiecutter template to create a new project: :

cookiecutter https://github.com/sveetch/cookiecutter-sveetch-djangoapp.git
Package content

A Django package with everything to start:

  • Development in a Python virtual environment with virtualenv and pip;
  • Promote Test Driven Development with Pytest;
  • Last Django versions support;
  • Configuration in setup.cfg ready to upload package to Pypi;
  • Sample blog application (very very minimalist) fully tested;
  • Flake8 configuration for quality review;
  • tox configuration for environments tests;
  • Code is fully documented with reStructuredText and Napoleon extension for Sphinx.
  • Release with twine.

Package cover some basic features:

  • A very minimalist Blog application for sample;
  • Basic generic views usage;
  • Testing models, factories and views;
  • pyquery usage for tests on HTML contents;
About first project install and model migrations

Created project have models but no migrations. This is to avoid creating migration for models you will surely change or remove.

This will result in failures on tests and running application until you have created initial migrations. There is a makefile action for this: :

make migrations

It will automatically search to create new migrations for your application if there is some changes or new models. When done, there is a makefile action to apply new migrations: :

make migrate

So if you just plan to check created package, just performs migration creation. However if you plan to create your own application, create your models and make migrations once finished.

But remember until you've done migrations, tests will fails.

Package requirements

To use it from repository url you just need Cookiecutter.

Once project is created, you can install it locally with make install from project directory.

However you can install this cookie locally (to avoid doing request each time you use it), you will need virtualenv, clone it where you want and use its make install command. Once installed you can create shortcut with a bash alias in your .bash_aliases: :

alias cookdjango='/home/your/install/cookiecutter-sveetch-django/.venv/bin/cookiecutter /home/your/install/cookiecutter-sveetch-django'
Naming

For a given Sample bar project name:

  • Package name will be sample-bar;
  • Application name will sample_bar;

You can change package and application names during project creation.

Options

You can define author full name, email, github username, pypi username, version start, package name and package short description.

Some of these have a default value filled from a previous value, obviously you can edit it to your own needs.

You can pre define some options in your cookiecutter user configuration to avoid to input them each time you use this cookie. This is especially recommended for the author and username ones.

cookiecutter-sveetch-djangoapp's People

Contributors

sveetch avatar

Watchers

 avatar

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.