Introduce python-bootstrapform as dependency

Twitter Bootstrap provides good styling for forms. Our current
theme does not ouput forms in bootstrap styles although for
everything else, it does. The python-bootstrap from is a simple
Django helper application to render Django forms into bootstrap
theme.

Django forms themselves provide numerous advantages over the
current incomplete homegrown solution. It also has solutions for
problems such as CSRF attacks which the current application is
vulnerable to.
This commit is contained in:
Sunil Mohan Adapa 2014-05-11 10:41:34 +05:30
parent c2328ba5e4
commit f097047b8b
4 changed files with 7 additions and 4 deletions

View File

@ -4,7 +4,7 @@
Install the pandoc, python-augeas, and bjsonrpc:
apt-get install augeas-tools libpython2.7 pandoc psmisc python2.7 python-augeas python-bcrypt python-bjsonrpc python-cherrypy3 python-django python-passlib python-simplejson sudo
apt-get install augeas-tools libpython2.7 pandoc psmisc python2.7 python-augeas python-bcrypt python-bjsonrpc python-cherrypy3 python-django python-passlib python-simplejson python-bootstrapform sudo
Unzip and untar the source into a directory. Change to the directory
containing the program. Run:
@ -40,6 +40,8 @@ The documentation has some dependencies too.
* *GNU Make* processes /doc/Makefile.
* *python-bootstrapform* - Render django forms for Twitter Bootstrap
## Building the Documentation
Documentation has been collected into a pdf that can be built using

View File

@ -17,7 +17,7 @@ default: config dirs css docs
all: default
predepend:
sudo sh -c "apt-get install augeas-tools libpython2.7 pandoc psmisc python2.7 python-augeas python-bcrypt python-bjsonrpc python-cherrypy3 python-django python-passlib python-simplejson sudo"
sudo sh -c "apt-get install augeas-tools libpython2.7 pandoc psmisc python2.7 python-augeas python-bcrypt python-bjsonrpc python-cherrypy3 python-django python-passlib python-simplejson python-bootstrapform sudo"
git submodule init
git submodule update
touch predepend

2
fabfile.py vendored
View File

@ -150,7 +150,7 @@ def apache():
@task
def deps():
"Basic plinth dependencies"
sudo('apt-get install --no-install-recommends -y python make pandoc python-simplejson python-pyme python-augeas python-bjsonrpc python-django')
sudo('apt-get install --no-install-recommends -y python make pandoc python-simplejson python-pyme python-augeas python-bjsonrpc python-django python-bootstrapform')
@task
def update():

View File

@ -206,7 +206,8 @@ def main():
# Configure Django
template_directories = get_template_directories()
django.conf.settings.configure(TEMPLATE_DIRS=template_directories)
django.conf.settings.configure(TEMPLATE_DIRS=template_directories,
INSTALLED_APPS=['bootstrapform'])
cherrypy.engine.start()
cherrypy.engine.block()