Coder Social home page Coder Social logo

django-app-template's Introduction

django-app-template

This is a template for creating a new reusable application for Django. This uses the template feature added to the startapp command in Django 1.4. While creating the app requires using Django 1.4 you can choose to support earlier versions once it has been created.

To start a new app with this template:

# Install Django
pip install django>=1.4
# Clone the repo
git clone git://github.com/mlavin/django-app-template.git
# Use the template
django-admin.py startapp --template=django-app-template/template --extension=py,rst,in <app_name>

What Does This Give You

This template is indended to be used for a reusable application developed outside of a Django project. Beyond the standard <app_name>/__init__.py, <app_name>/models.py, <app_name>/tests.py and <app_name>/views.py this template will create:

  • README.rst - Some minor layout to get you started
  • setup.py - A starting point for packaging your app
  • MANIFEST.in - Includes your app templates and static resources
  • AUTHORS - Add your name here
  • LICENSE - Add a license here
  • runtests.py - Simple helper for running the application tests
  • tox.ini - Configured to run tests on Django 1.3/1.4/master on Python 2.6
  • .gitignore/.hgignore - Just to save you a few key strokes

What To Do Next

This template gives you a good starting point for your application layout but there are still some pieces of information to fill out:

  • Write your app and tests
  • Fill in the <app_name>/__init__.py doc string and __version__
  • Pick a license and add author names
  • Write a more complete README
  • Adjust the meta information in the setup.py

You should also consider using Sphinx to create a more complete set of documentation. For than you can install Sphinx and run the quickstart:

# Install Sphinx
pip install sphinx
# Run the quickstart to create docs in docs/
# Most other default answers should be fine
sphinx-quickstart

When you are ready to upload your app to the Python Package Index (PyPi) you can do that using the setup.py created with this template:

# Register you package name and meta data (This is done once)
python setup.py register
# Create a release and upload it (This is done with every new version)
python setup.py sdist upload

License Info

The template itself is available under the "Simplified" BSD license and can be freely modified under the terms of that license. You can see the full license text in the Github repository for additional detail.

Applications created using this template are not considered derivatives works. Applications created using this template can be freely licensed under whatever you as the author chooses. They may be either open or closed source.

If you are creating an open source application and need some direction on available open source licenses for your new application, you can find information on the Open Source Initiative (OSI) website.

Contributing

Remember if these defaults don't work for you then you can always create a fork and update them to fit your own needs. If you have found a bug or have a suggestion for an improvement which has broad appeal then please file a bug or submit a pull request.

django-app-template's People

Contributors

manfre avatar mlavin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

django-app-template's Issues

License

I don't see any information about a license for this template. Should I feel free to use any (open or closed) license for apps created using this template?

Coverage Integration

App authors might want an initial .coveragerc and some info on getting the app coverage.

Travis CI Integration

Might be too Github specific but it would be easy to include a .travis.yml by default.

Better README Stub

The default project README should layout more sections such as installation, configuration, documentation.

Default Test Should Fail

Testing 1 + 1 =2 is a silly default. The default test should be self.fail("Author is too lazy to write tests").

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.