Giter Site home page Giter Site logo

danfairs / fez.djangoskel Goto Github PK

View Code? Open in Web Editor NEW
25.0 2.0 7.0 321 KB

Paster templates for creating Django projects and apps. NOTE - this project is in dire need of an update! Pull requests gratefully accepted.

Home Page: http://www.fezconsulting.com

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%

fez.djangoskel's Introduction

Introduction

fez.djangoskel provides paster templates for creating Django projects and applications as eggs. Five templates are currently provided.

Usage

Install fez.djangoskel using easy_install. This should also install paster as a dependency. You should then be able to see five new templates available:

$ paster create --list-templates
Available templates:
  basic_package:             A basic setuptools-enabled package
  django_app:                Template for a basic Django reusable application
  django_buildout:           A plain Django buildout
  django_namespace_app:      Template for a namespaced Django reusable application
  django_namespace_project:  Template for a namespaced Django project
  django_project:            Template for a Django project
  paste_deploy:              A web application deployed through paste.deploy

You may create an initial Django buildout using the django_buildout template:

paster create -t django_buildout

This will create bootstrap.py, buildout.cfg and devel.cfg files. You should edit the buildout files to your needs.

Create a Django project using the django_project template:

paster create -t django_project

Answer the questions that paster asks, and it will create a full Django project with a template settings file and urls.py.

Applications are created in a similar way:

paster create -t django_app

Projects created with these templates do not have namespace packages: that is, you will find a directory created with the name of the package you specified which contains all the usual egg stuff, and the module will be under that directory.

If you wish to create a namespaced package (similar, for example, to this package: fez.djangoskel) then you should use the django_namespace_app and django_namespace_project templates. Both work in the same way.

When creating eggs based on django_namespace_app or django_namespace_project, paster will ask you for three pieces of information:

  • Project name - This should be the full dotted name of the package eg. foo.bar
  • Namespace package - This is the top-level namespace package, eg. foo
  • Package name - This is the name of the lower-level module, eg. bar

This will give you a directory layout like this:

./foo.bar
  /foo
      /bar

Your code will most likely be going under bar; this is where models.py, urls.py etc. will be created.

Difference from Django's own templates

Django provides its own 'template' app and project generation. Why use these templates?

  • The primary motivation is that the projects and apps generated by these templates are eggs. This means that they can be uploaded to PyPI, and other developers will be able to easy_install them.
  • These templates all provide skeleton documentation in the form of HISTORY.txt and README.txt files.
  • The application template also provides a lot more plumbing to get you started writing tests: a tests module, test settings (which can be invoked using python manage.py test --settings=project.settings) and test URLConfs and settings that the test client can use.

fez.djangoskel's People

Contributors

fabiocorneti 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

Watchers

 avatar  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.