[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Packaging Django applications and projects



Hi.

This is my first post to this mailing list, and in fact to any Debian mailing list in general so I'd like to introduce myself first. To keep Your interest focused on the problem I moved this to the footer of this message. With that of the way here's the core topic:

I'd like to define and document the recommended best practice of packaging Django 1.0+ (and especially 1.3) web applications and projects for Debian. I started this on the Debian wiki at
http://wiki.debian.org/DjangoPackagingDraft

The topics I want to cover are:

* Packaging Django applications:
  - where to install code
  - where to install templates
- where to install static files (as understood by http://docs.djangoproject.com/en/dev/howto/static-files/)
  - where to install documentation (if any)

* Packaging Django projects:
  - where to install code (like urls, settings, etc)
  - where to install templates
- how to do settings (debconf integration / configuration files / python module vs real config file?) - what to with web server integration (aka http://localhost/packagename vs do-it-yourself-after-installation)
  - how do to database configuration and integration (dbconfig-common?)


There are some things I did not want to enforce because either there is no clear best method or I don't feel that the topic is relevant before specifying more fundamental pieces. In particular this includes:

- Shipping web server configuration files so that application can work out of the box after installation. - Handling of project configuration (it's both executable code and administrator-oriented settings file)


I started a demo native package (still work in progress, comments welcome) called django-hello that contains a simple django project with one application. I deliberately used django-staticfiles as that's how upcoming web applications will distribute their static files. The code is at lp:~zkrynicki/+junk/django_hello. There is an Ubuntu PPA with python-django-staticfiles package that is required at https://launchpad.net/~zkrynicki/+archive/lava).


There are some compromises I needed to make though. This package is using python-support as I still need to target the current Ubuntu LTS release (lucid) where dh_python2 is not available. I'm more than happy to convert this package to dh_python2 assuming that the same rules can be applied in a backwards compatible manner to Lucid packages.


That's it.
I'd like to know what you think.

About me:

My name is Zygmunt Krynicki. I'm work in the Linaro Validation team and I'd like to start a process that will make the output of the Linaro Validation team available to Debian users. I'd like to maintain the packages we're making and learn to do those packages properly.

Most of my work revolves around server-side technology, specifically around Django web applications. I did not find any strong guidelines on how to package Django web applications and projects for Debian. Therefore I decided that I'd like to contribute to Debian and help define and apply those guidelines to various Django applications as they become available.


Best regards
Zygmunt Krynicki

PS: I cross-posted to linaro-dev to make sure people there that might be interested in this discussion can notice it and participate.


Reply to: