Commit de4bf760 authored by Christophe Siraut's avatar Christophe Siraut

Work toward packaging: use reST and distutils.

parent de24f521
*.sqlite
*.pyc
*~
dist
fixtures
staticroot
local_settings.py
......@@ -8,4 +9,4 @@ local_urls.py
.coverage
htmlcov
nuages.egg-info
MANIFEST
recursive-include nuages_templates *
recursive-include registration_templates *
recursive-include meetingpoll *
include LICENSE
Nuages - Easy poll sharing
==========================
======
Nuages
======
-----------------
Easy poll sharing
-----------------
Nuages aims to provide a collaborative meeting poll system, similar to doodle or rdvz. It is build in python, using the django framework and a little of javascript. This application was named after Django's famous song. Feedback and collaboration are welcome at nuages @lists.domainepublic.net
The project uses the following django applications:
- django-registration
- django-datetime-widget
- django-bootstrap-staticfiles
......@@ -23,7 +29,7 @@ Manual installation
===================
Install required dependencies and copy nuages to /usr/local/lib.
On debian one can install it as follow:
On debian and derivatives one can install it as follow:
# aptitude install python-django python-django-registration
# pip install django-datetime-widget django-bootstrap-staticfiles django-jquery
......@@ -34,35 +40,35 @@ Use local_settings.py and local_urls.py to customize your installation when need
Translation
===========
Create/update a translation file:
Create/update a translation file::
# django-admin makemessages -l fr
Edit and translate the translation file:
Edit and translate the translation file::
# vi locale/fr/LC_MESSAGES/django.po
Compile translated messages/update a translation file:
Compile translated messages/update a translation file::
# make translation
Dev installation
================
Install python-django package (>=1.3)
Clone nuages archive somewhere in your home folder
Clone nuages archive somewhere in your home folder::
# cd
# git clone http://git.domainepublic.net/git/nuages.git
You can have local customizations in the nuages/local_settings.py file (and avoid modify the original settings.py)
You can have local customizations in the nuages/local_settings.py file (and avoid modify the original settings.py)::
# vi nuages/local_settings.py
Build nuages database
Build nuages database::
# ./manage.py syncdb
Start the python webserver
Start the python webserver::
# ./manage.py runserver
......@@ -71,16 +77,16 @@ You should have the application running at http://127.0.0.1:8000
Apache installation
===================
Install python-django package (>=1.3)
Copy nuages to /usr/local/lib/nuages
Copy nuages to /usr/local/lib/nuages::
# cd /usr/local/lib
# git clone http://git.domainepublic.net/git/nuages.git
You can have local customizations in the local_settings.py file. Optionally set DEBUG option to False.
You can have local customizations in the local_settings.py file. (Optionally set DEBUG option to False)::
# vi /usr/local/lib/nuages/nuages/local_settings.py
There are several ways to configure Apache and python, we recommend wsgi, simply install libapache2-mod-wsgi, and add the following to /etc/apache2/sites-available/nuages, replacing ServerName accordingly.
There are several ways to configure Apache and python, we recommend wsgi, simply install libapache2-mod-wsgi, and add the following to /etc/apache2/sites-available/nuages, replacing ServerName accordingly::
<VirtualHost *:80>
......@@ -102,7 +108,7 @@ There are several ways to configure Apache and python, we recommend wsgi, simply
</VirtualHost>
Build database, collect static files and set permissions:
Build database, collect static files and set permissions::
# make update
......@@ -110,19 +116,19 @@ Set domain name: Point your browser to /admin/sites/site/1/ and modify the entry
Testing
=======
In order to test Nuages, you need the following dependencies:
In order to test Nuages, you need the following dependencies::
webtest
coverage
django_webtest
django-discover-runner
On debian:
On debian::
# aptitude install python-webtest python-coverage python-pip
# pip install django_webtest django-discover-runner
You can now validate your modifications with:
You can now validate your modifications with::
# make test
......@@ -130,8 +136,7 @@ Email Service
=============
Django is expecting a working SMTP server listening at localhost, sendmail for instance.
Another option is to add attributes in local_settings.py, so django can connect to an external server
for the mail delivery. To enable this, we only have to add these lines:
Another option is to add attributes in local_settings.py, so django can connect to an external server for the mail delivery. To enable this, we only have to add these lines::
# Email attributes
EMAIL_HOST = 'mail.example.com'
......@@ -142,13 +147,13 @@ Another option is to add attributes in local_settings.py, so django can connect
Update
======
In order to update your nuages installation:
In order to update your nuages installation::
# make update
Migration
=========
When models change, we need to perform some manual steps to keep existing data. The following example backups all databases to json files, and resets only the poll table.
When models change, we need to perform some manual steps to keep existing data. The following example backups all databases to json files, and resets only the poll table::
# mkdir fixtures
# APPS="account auth meetingpoll poll"
......
#!/usr/bin/env python
from setuptools import setup
from distutils.core import setup
setup(name='nuages',
version='0.1',
description='Nuages web applications',
author='Christophe Siraut',
author_email='d@tobald.eu.org',
url='http://nuages.domainepublic.net/nuages/',
packages=[
'nuages',
'nuages_templates',
'meetingpoll',
'registration_templates'],
install_requires=[
'django',
'django-jquery',
'django-registration',
'django-datetime-widget',
'django-bootstrap-staticfiles'],
license='GPL',
long_description=open('README').read(),
classifiers=['Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License\
(GPL) License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Utilities'],
)
setup(
name='django-nuages',
version='0.1',
description='Nuages web application',
long_description=open('README').read(),
author='Christophe Siraut',
author_email='d@tobald.eu.org',
url='http://nuages.domainepublic.net/',
packages=[
'nuages',
'nuages_templates',
'meetingpoll',
'registration_templates'
],
install_requires=[
'django',
'django-jquery',
'django-registration',
'django-datetime-widget',
'django-bootstrap-staticfiles'
],
license='LICENSE',
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License (GPL) License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Utilities'
],
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment