ekatsah / proj402

Source code of cerkinfo's courses plateform
cours.cerkinfo.be
8 stars 6 forks source link

Wat?

This django project is a website providing mean for students to exchange courses and tips.

Dependencies

You'll need pyPdf, django-south, poppler (the binary 'pdftotext') and GraphicsMagic (the binary 'gm')

Installation using virtualenv

To install:

virtualenv --distribute --no-site-packages ve
source ve/bin/activate
pip install -r requirements.txt
python manage.py syncdb
python manage.py migrate

You still need to install poppler/pdftotext and ImageMagick/convert using your distribution packages.

To run:

python manage.py runserver

Then go http://localhost:8000/help

License

Copyright 2011, hast. All rights reserved.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Create a 'fake' user to use without NetID

$ ./manage.py shell
>>> from django.contrib.auth.models import User
>>> user = User.objects.create_user('netid', 'email', 'password')
>>> user.last_name="NAME"
>>> user.first_name="firstname"
>>> user.save()
>>> user_profile = user.profile
>>> user_profile.registration = "ulb:etudiants:<matricul>"
>>> user_profile.section = "fac:section"
>>> user_profile.save()
>>> user.save()

Turn a user (fake or not) into an admin

>>> u = User.objects.get(pk=id)
>>> from users.models import PERM_LIST, Permission
>>> for p in PERM_LIST: Permission.objects.create(name=p, user=u)