Commit de4bf760 authored by Christophe Siraut's avatar Christophe Siraut

Work toward packaging: use reST and distutils.

parent de24f521
*.sqlite *.sqlite
*.pyc *.pyc
*~ *~
dist
fixtures fixtures
staticroot staticroot
local_settings.py local_settings.py
...@@ -8,4 +9,4 @@ local_urls.py ...@@ -8,4 +9,4 @@ local_urls.py
.coverage .coverage
htmlcov htmlcov
nuages.egg-info 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 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: The project uses the following django applications:
- django-registration - django-registration
- django-datetime-widget - django-datetime-widget
- django-bootstrap-staticfiles - django-bootstrap-staticfiles
...@@ -23,7 +29,7 @@ Manual installation ...@@ -23,7 +29,7 @@ Manual installation
=================== ===================
Install required dependencies and copy nuages to /usr/local/lib. 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 # aptitude install python-django python-django-registration
# pip install django-datetime-widget django-bootstrap-staticfiles django-jquery # 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 ...@@ -34,35 +40,35 @@ Use local_settings.py and local_urls.py to customize your installation when need
Translation Translation
=========== ===========
Create/update a translation file: Create/update a translation file::
# django-admin makemessages -l fr # django-admin makemessages -l fr
Edit and translate the translation file: Edit and translate the translation file::
# vi locale/fr/LC_MESSAGES/django.po # vi locale/fr/LC_MESSAGES/django.po
Compile translated messages/update a translation file: Compile translated messages/update a translation file::
# make translation # make translation
Dev installation Dev installation
================ ================
Install python-django package (>=1.3) Install python-django package (>=1.3)
Clone nuages archive somewhere in your home folder Clone nuages archive somewhere in your home folder::
# cd # cd
# git clone http://git.domainepublic.net/git/nuages.git # 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 # vi nuages/local_settings.py
Build nuages database Build nuages database::
# ./manage.py syncdb # ./manage.py syncdb
Start the python webserver Start the python webserver::
# ./manage.py runserver # ./manage.py runserver
...@@ -71,16 +77,16 @@ You should have the application running at http://127.0.0.1:8000 ...@@ -71,16 +77,16 @@ You should have the application running at http://127.0.0.1:8000
Apache installation Apache installation
=================== ===================
Install python-django package (>=1.3) Install python-django package (>=1.3)
Copy nuages to /usr/local/lib/nuages Copy nuages to /usr/local/lib/nuages::
# cd /usr/local/lib # cd /usr/local/lib
# git clone http://git.domainepublic.net/git/nuages.git # 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 # 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> <VirtualHost *:80>
...@@ -102,7 +108,7 @@ There are several ways to configure Apache and python, we recommend wsgi, simply ...@@ -102,7 +108,7 @@ There are several ways to configure Apache and python, we recommend wsgi, simply
</VirtualHost> </VirtualHost>
Build database, collect static files and set permissions: Build database, collect static files and set permissions::
# make update # make update
...@@ -110,19 +116,19 @@ Set domain name: Point your browser to /admin/sites/site/1/ and modify the entry ...@@ -110,19 +116,19 @@ Set domain name: Point your browser to /admin/sites/site/1/ and modify the entry
Testing Testing
======= =======
In order to test Nuages, you need the following dependencies: In order to test Nuages, you need the following dependencies::
webtest webtest
coverage coverage
django_webtest django_webtest
django-discover-runner django-discover-runner
On debian: On debian::
# aptitude install python-webtest python-coverage python-pip # aptitude install python-webtest python-coverage python-pip
# pip install django_webtest django-discover-runner # pip install django_webtest django-discover-runner
You can now validate your modifications with: You can now validate your modifications with::
# make test # make test
...@@ -130,8 +136,7 @@ Email Service ...@@ -130,8 +136,7 @@ Email Service
============= =============
Django is expecting a working SMTP server listening at localhost, sendmail for instance. 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 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::
for the mail delivery. To enable this, we only have to add these lines:
# Email attributes # Email attributes
EMAIL_HOST = 'mail.example.com' EMAIL_HOST = 'mail.example.com'
...@@ -142,13 +147,13 @@ Another option is to add attributes in local_settings.py, so django can connect ...@@ -142,13 +147,13 @@ Another option is to add attributes in local_settings.py, so django can connect
Update Update
====== ======
In order to update your nuages installation: In order to update your nuages installation::
# make update # make update
Migration 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 # mkdir fixtures
# APPS="account auth meetingpoll poll" # APPS="account auth meetingpoll poll"
......
#!/usr/bin/env python #!/usr/bin/env python
from setuptools import setup from distutils.core import setup
setup(name='nuages', setup(
version='0.1', name='django-nuages',
description='Nuages web applications', version='0.1',
author='Christophe Siraut', description='Nuages web application',
author_email='d@tobald.eu.org', long_description=open('README').read(),
url='http://nuages.domainepublic.net/nuages/', author='Christophe Siraut',
packages=[ author_email='d@tobald.eu.org',
'nuages', url='http://nuages.domainepublic.net/',
'nuages_templates', packages=[
'meetingpoll', 'nuages',
'registration_templates'], 'nuages_templates',
install_requires=[ 'meetingpoll',
'django', 'registration_templates'
'django-jquery', ],
'django-registration', install_requires=[
'django-datetime-widget', 'django',
'django-bootstrap-staticfiles'], 'django-jquery',
license='GPL', 'django-registration',
long_description=open('README').read(), 'django-datetime-widget',
classifiers=['Development Status :: 4 - Beta', 'django-bootstrap-staticfiles'
'Environment :: Web Environment', ],
'Framework :: Django', license='LICENSE',
'Intended Audience :: Developers', classifiers=[
'License :: OSI Approved :: GNU General Public License\ 'Development Status :: 4 - Beta',
(GPL) License', 'Environment :: Web Environment',
'Operating System :: OS Independent', 'Framework :: Django',
'Programming Language :: Python', 'Intended Audience :: Developers',
'Topic :: Internet :: WWW/HTTP', 'License :: OSI Approved :: GNU General Public License (GPL) License',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content', 'Operating System :: OS Independent',
'Topic :: Utilities'], '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