diff options
author | Madhusudan.C.S | 2010-07-13 23:40:34 +0530 |
---|---|---|
committer | Madhusudan.C.S | 2010-07-13 23:40:34 +0530 |
commit | d5fbda31f85176ccfd0a5e49561f1180a998df16 (patch) | |
tree | 9ba55c865fb15d3cdd67bf65d9e2308d51d66c69 | |
parent | 3ec894e684c645876402a9cac912d98b5ed06c37 (diff) | |
download | scipycon-d5fbda31f85176ccfd0a5e49561f1180a998df16.tar.gz scipycon-d5fbda31f85176ccfd0a5e49561f1180a998df16.tar.bz2 scipycon-d5fbda31f85176ccfd0a5e49561f1180a998df16.zip |
Removed unwanted files and made more changes to make SciPyCon a clean app.
63 files changed, 143 insertions, 752 deletions
@@ -34,9 +34,9 @@ downloads .project project/local.py project/project.egg-info -project.db +scipycon.db project/media/user/* project/static/media -project/kiwipycon/user/*.pyc +project/scipycon/user/*.pyc apache/* diff --git a/buildout.cfg b/buildout.cfg index a416924..5acd629 100644 --- a/buildout.cfg +++ b/buildout.cfg @@ -1,74 +1,18 @@ [buildout] -extensions = jarn.setuptoolsfixer - -find-links = - http://effbot.org/downloads - http://dist.repoze.org/ - -parts = - django - basic-apps - tagging - django-command-extensions - south - registration - reportlab - -eggs = - PIL - HTML5lib - pisa +parts = django tagging +eggs = Werkzeug - elementtree - docutils - markdown - textile - beautifulsoup MySQL-python -[versions] -reportlab=2.3 - -[reportlab] -recipe=zc.recipe.egg -eggs= - reportlab -find-links= - http://distfiles.minitage.org/public/externals/minitage/ - [django] recipe = djangorecipe -version = 1.1 -settings = production +version = 1.2.1 +settings = development eggs = ${buildout:eggs} - ${reportlab:eggs} pythonpath = - ${basic-apps:location} ${tagging:location} - ${django-command-extensions:location} - ${south:location} - ${registration:location} - -[basic-apps] -recipe = zerokspot.recipe.git -repository = http://github.com/nathanborror/django-basic-apps.git [tagging] recipe = infrae.subversion -urls = - http://django-tagging.googlecode.com/svn/trunk/ . - -[django-command-extensions] -recipe = zerokspot.recipe.git -repository = http://github.com/django-extensions/django-extensions.git - -[south] -recipe = infrae.subversion -urls = - http://svn.aeracode.org/svn/south/tags/0.5/ . - -[registration] -recipe = mercurialrecipe -repository = http://bitbucket.org/ubernostrum/django-registration/ - +urls = http://django-tagging.googlecode.com/svn/trunk/ .
\ No newline at end of file diff --git a/project/development.py b/project/development.py index 8f68838..814453a 100644 --- a/project/development.py +++ b/project/development.py @@ -15,22 +15,16 @@ INSTALLED_APPS = ( 'django.contrib.sites', 'django.contrib.flatpages', 'django.contrib.markup', - 'project.kiwipycon', - 'project.kiwipycon.user', - 'project.kiwipycon.talk', - 'project.kiwipycon.registration', - 'project.kiwipycon.sponsor', - 'project.kiwipycon.proceedings', + 'project.scipycon', + 'project.scipycon.user', + 'project.scipycon.talk', + 'project.scipycon.registration', + 'project.scipycon.proceedings', 'tagging', - 'basic.blog', - 'basic.inlines', - 'basic.media', - 'django_extensions', - 'south', ) DATABASE_ENGINE = 'sqlite3' -DATABASE_NAME = '/home/madhu/conference2009.db' +DATABASE_NAME = '../scipycon.db' DATABASE_USER = '' DATABASE_PASSWORD = '' diff --git a/project/production.py b/project/production.py index a7191a8..1e85526 100644 --- a/project/production.py +++ b/project/production.py @@ -15,21 +15,16 @@ INSTALLED_APPS = ( 'django.contrib.sites', 'django.contrib.flatpages', 'django.contrib.markup', - 'project.kiwipycon', - 'project.kiwipycon.user', - 'project.kiwipycon.talk', - 'project.kiwipycon.registration', - 'project.kiwipycon.sponsor', + 'project.scipycon', + 'project.scipycon.user', + 'project.scipycon.talk', + 'project.scipycon.registration', + 'project.scipycon.proceedings', 'tagging', - 'basic.blog', - 'basic.inlines', - 'basic.media', - 'django_extensions', - 'south', ) DATABASE_ENGINE = 'mysql' -DATABASE_NAME = 'conference2009' -DATABASE_USER = 'root' +DATABASE_NAME = 'scipycon' +DATABASE_USER = 'scipy' # Imports DATABASE_PASSWORD from project/local.py that is not part of mercurial repo from project.local import DATABASE_PASSWORD diff --git a/project/scipycon/proceedings/admin.py b/project/scipycon/proceedings/admin.py index 830fcdb..f92e5cb 100644 --- a/project/scipycon/proceedings/admin.py +++ b/project/scipycon/proceedings/admin.py @@ -3,7 +3,7 @@ from __future__ import absolute_import from django.contrib import admin -from project.kiwipycon.proceedings.models import Paper +from project.scipycon.proceedings.models import Paper class PaperAdmin(admin.ModelAdmin): diff --git a/project/scipycon/proceedings/booklet/mk_scipy_paper.py b/project/scipycon/proceedings/booklet/mk_scipy_paper.py index 90e2fa4..7b4eca0 100644 --- a/project/scipycon/proceedings/booklet/mk_scipy_paper.py +++ b/project/scipycon/proceedings/booklet/mk_scipy_paper.py @@ -11,7 +11,7 @@ from docutils import core as docCore conf_name = 'SciPy2009' -current_dir = '/media/python/workspace/kiwipycon/project/kiwipycon/proceedings/booklet' +current_dir = '/media/python/workspace/scipycon/project/scipycon/proceedings/booklet' outdir = current_dir + os.sep + 'output' diff --git a/project/scipycon/proceedings/migrations/0001_initial.py b/project/scipycon/proceedings/migrations/0001_initial.py deleted file mode 100644 index 5323cf7..0000000 --- a/project/scipycon/proceedings/migrations/0001_initial.py +++ /dev/null @@ -1,69 +0,0 @@ -# -*- coding: utf-8 -*- - -from south.db import db -from django.db import models -from project.kiwipycon.proceedings.models import * - -class Migration: - - def forwards(self, orm): - - # Adding model 'Paper' - db.create_table('proceedings_paper', ( - ('body', models.TextField()), - ('abstract', models.TextField()), - ('id', models.AutoField(primary_key=True)), - ('title', models.CharField(max_length=200)), - )) - db.send_create_signal('proceedings', ['Paper']) - - # Adding model 'Attachments' - db.create_table('proceedings_attachments', ( - ('paper', models.ForeignKey(orm.Paper)), - ('id', models.AutoField(primary_key=True)), - ('attachments', models.FileField(upload_to='attachments/%Y/%m/%d')), - )) - db.send_create_signal('proceedings', ['Attachments']) - - # Adding ManyToManyField 'Paper.authors' - db.create_table('proceedings_paper_authors', ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('paper', models.ForeignKey(Paper, null=False)), - ('user', models.ForeignKey(User, null=False)) - )) - - - - def backwards(self, orm): - - # Deleting model 'Paper' - db.delete_table('proceedings_paper') - - # Deleting model 'Attachments' - db.delete_table('proceedings_attachments') - - # Dropping ManyToManyField 'Paper.authors' - db.delete_table('proceedings_paper_authors') - - - - models = { - 'proceedings.paper': { - 'abstract': ('models.TextField', [], {}), - 'authors': ('models.ManyToManyField', ['User'], {}), - 'body': ('models.TextField', [], {}), - 'id': ('models.AutoField', [], {'primary_key': 'True'}), - 'title': ('models.CharField', [], {'max_length': '200'}) - }, - 'auth.user': { - '_stub': True, - 'id': ('models.AutoField', [], {'primary_key': 'True'}) - }, - 'proceedings.attachments': { - 'attachments': ('models.FileField', [], {'upload_to': "'attachments/%Y/%m/%d'"}), - 'id': ('models.AutoField', [], {'primary_key': 'True'}), - 'paper': ('models.ForeignKey', ['Paper'], {}) - } - } - - complete_apps = ['proceedings'] diff --git a/project/scipycon/proceedings/migrations/__init__.py b/project/scipycon/proceedings/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 --- a/project/scipycon/proceedings/migrations/__init__.py +++ /dev/null diff --git a/project/scipycon/proceedings/views.py b/project/scipycon/proceedings/views.py index 6a21691..aeb91e6 100644 --- a/project/scipycon/proceedings/views.py +++ b/project/scipycon/proceedings/views.py @@ -10,12 +10,12 @@ from django.core.urlresolvers import reverse from django.shortcuts import render_to_response from django.template import RequestContext -from project.kiwipycon.proceedings.models import Paper -from project.kiwipycon.user.forms import RegisterForm -from project.kiwipycon.user.models import UserProfile -from project.kiwipycon.utils import set_message_cookie -from project.kiwipycon.proceedings.booklet import mk_scipy_paper -from project.kiwipycon.proceedings.forms import ProceedingsForm +from project.scipycon.proceedings.models import Paper +from project.scipycon.user.forms import RegisterForm +from project.scipycon.user.models import UserProfile +from project.scipycon.utils import set_message_cookie +from project.scipycon.proceedings.booklet import mk_scipy_paper +from project.scipycon.proceedings.forms import ProceedingsForm def handleUploadedFile(proceedings_form_data, rst_file): @@ -60,7 +60,7 @@ def submit(request, id=None, template='proceedings/submit.html'): login(request, login_form.get_user()) - redirect_to = reverse('kiwipycon_submit_proceedings') + redirect_to = reverse('scipycon_submit_proceedings') return set_message_cookie(redirect_to, msg = u'You have been logged in.') @@ -68,7 +68,7 @@ def submit(request, id=None, template='proceedings/submit.html'): # add the new user if register_form.is_valid(): - user = kiwipycon_createuser(request, register_form.data) + user = scipycon_createuser(request, register_form.data) proceedings_form = ProceedingsForm(data=request.POST, files=request.FILES) @@ -86,14 +86,14 @@ def submit(request, id=None, template='proceedings/submit.html'): authors=authors) # Successfully saved. So get back to the edit page. - redirect_to = reverse('kiwipycon_submit_proceedings', + redirect_to = reverse('scipycon_submit_proceedings', args=[paper.id]) return set_message_cookie( redirect_to, msg = u'Thanks, your paper has been submitted.') else: # This is impossible. Something was wrong so return back # to submit page - redirect_to = reverse('kiwipycon_submit_proceedings') + redirect_to = reverse('scipycon_submit_proceedings') return set_message_cookie( redirect_to, msg = u'Something is wrong here.') else: @@ -193,8 +193,8 @@ def show_paper(request, id): abstract['paper_text'] = paper.body - outfilename = '/media/python/workspace/kiwipycon/project/kiwipycon/proceedings/booklet/output/paper.pdf' - attach_dir = os.path.dirname('/media/python/workspace/kiwipycon/project/kiwipycon/proceedings/booklet/output/') + outfilename = '/media/python/workspace/scipycon/project/scipycon/proceedings/booklet/output/paper.pdf' + attach_dir = os.path.dirname('/media/python/workspace/scipycon/project/scipycon/proceedings/booklet/output/') mk_scipy_paper.mk_abstract_preview(abstract, outfilename, attach_dir) from django.http import HttpResponse diff --git a/project/scipycon/registration/admin.py b/project/scipycon/registration/admin.py index 50acd43..128ae4b 100644 --- a/project/scipycon/registration/admin.py +++ b/project/scipycon/registration/admin.py @@ -4,7 +4,7 @@ from __future__ import absolute_import #django.contrib from django.contrib import admin -#kiwipycon +#scipycon from .models import Registration from .models import Wifi diff --git a/project/scipycon/registration/forms.py b/project/scipycon/registration/forms.py index 8d366c6..820c084 100644 --- a/project/scipycon/registration/forms.py +++ b/project/scipycon/registration/forms.py @@ -11,21 +11,13 @@ from django.contrib.auth.models import User from .models import SIZE_CHOICES from .models import Registration from .models import Wifi -from project.kiwipycon.sponsor.models import Sponsor + class RegistrationSubmitForm(forms.Form): """PyCon registration form """ tshirt = forms.ChoiceField(choices=SIZE_CHOICES, required=True, label=u'T-shirt size', help_text=u'Yes, we all get a t-shirt!') -# beverage = forms.CharField(required=True, label=u'Beverage', -# help_text=u'Your beverage of choice - coffee, tea etc', -# max_length=255, -# widget=forms.TextInput(attrs={'size':'50'})) -# diet = forms.CharField(required=False, label=u'Dietary', -# help_text=u'Special dietary requirements - vegetarian etc', -# max_length=255, -# widget=forms.TextInput(attrs={'size':'50'})) organisation = forms.CharField(required=True, label=u'Organisation', help_text=u'The primary organisation that you are a member of.', max_length=255, @@ -52,15 +44,6 @@ class RegistrationSubmitForm(forms.Form): help_text=u'Do you intend to attend the tutorials?') sprint = forms.BooleanField(required=False, label=u'Sprint', help_text=u'Do you intend to attend the sprints?') -# party = forms.BooleanField(required=False, label=u'Pre-con party', -# help_text=u'Do you intend to attend the pre-conference party on Friday?') -# discount = forms.BooleanField(required=False, label=u'Student/Unwaged?', -# help_text=u'You will be required to present your Community Services '\ -# 'Card or Student ID on arrival.') -# sponsor = forms.CharField(required=False, label=u'Sponsor code', -# help_text=u'If attending as a sponsor please enter your sponsor code.', -# max_length=50, -# widget=forms.TextInput(attrs={'size':'20'})) def demographic_fields(self): return (self['organisation'], @@ -75,34 +58,6 @@ class RegistrationSubmitForm(forms.Form): self['sprint'], self['allow_contact']) -# def other_fields(self): -# return (self['sponsor'],) -# -# def clean_sponsor(self): -# """Validates that the entered sponsor code is valid and within limits -# of allowed guests -# """ -# sponsorcode = self.cleaned_data.get("sponsor") -# if sponsorcode: -# try: -# sponsor = Sponsor.objects.get(slug=sponsorcode) -# except ObjectDoesNotExist: -# raise forms.ValidationError( -# u"The sponsor code you entered is not valid.") -# if sponsor: -# guests = sponsor.guests -# if guests == 0: -# raise forms.ValidationError( -# u"The sponsor code you entered is not valid.") -# count = Registration.objects.filter( -# sponsor=sponsorcode).count() -# if count >= guests: -# raise forms.ValidationError( -# u"That sponsor has reached limit of guests.") -# -# -# return sponsorcode - class RegistrationEditForm(RegistrationSubmitForm): id = forms.CharField(widget=forms.HiddenInput) diff --git a/project/scipycon/registration/migrations/0001_initial.py b/project/scipycon/registration/migrations/0001_initial.py deleted file mode 100644 index 5393708..0000000 --- a/project/scipycon/registration/migrations/0001_initial.py +++ /dev/null @@ -1,62 +0,0 @@ -# -*- coding: utf-8 -*- - -from south.db import db -from django.db import models -from project.kiwipycon.registration.models import * - -class Migration: - - def forwards(self, orm): - - # Adding model 'Registration' - db.create_table('registration_registration', ( - ('slug', models.SlugField()), - ('registrant', models.ForeignKey(orm['auth.User'])), - ('organisation', models.CharField(max_length=255, blank=True)), - ('occupation', models.CharField(max_length=255, blank=True)), - ('city', models.CharField(max_length=255, blank=True)), - ('postcode', models.CharField(max_length=255, blank=True)), - ('tshirt', models.CharField(max_length=2)), - ('conference', models.BooleanField(default=False)), - ('tutorial', models.BooleanField(default=False)), - ('sprint', models.BooleanField(default=False)), - ('submitted', models.DateTimeField(auto_now_add=True)), - ('allow_contact', models.BooleanField(default=False)), - ('last_mod', models.DateTimeField(auto_now=True)), - ('id', models.AutoField(primary_key=True)), - )) - db.send_create_signal('registration', ['Registration']) - - - - def backwards(self, orm): - - # Deleting model 'Registration' - db.delete_table('registration_registration') - - - - models = { - 'auth.user': { - '_stub': True, - 'id': ('models.AutoField', [], {'primary_key': 'True'}) - }, - 'registration.registration': { - 'allow_contact': ('models.BooleanField', [], {'default': 'False'}), - 'city': ('models.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('models.AutoField', [], {'primary_key': 'True'}), - 'last_mod': ('models.DateTimeField', [], {'auto_now': 'True'}), - 'occupation': ('models.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'organisation': ('models.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'conference': ('models.BooleanField', [], {'default': 'False'}), - 'tutorial': ('models.BooleanField', [], {'default': 'False'}), - 'sprint': ('models.BooleanField', [], {'default': 'False'}), - 'postcode': ('models.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'registrant': ('models.ForeignKey', ['User'], {}), - 'slug': ('models.SlugField', [], {}), - 'submitted': ('models.DateTimeField', [], {'auto_now_add': 'True'}), - 'tshirt': ('models.CharField', [], {'max_length': '2'}) - } - } - - complete_apps = ['registration'] diff --git a/project/scipycon/registration/migrations/0002_create_wifi.py b/project/scipycon/registration/migrations/0002_create_wifi.py deleted file mode 100644 index 55e5a17..0000000 --- a/project/scipycon/registration/migrations/0002_create_wifi.py +++ /dev/null @@ -1,56 +0,0 @@ -# -*- coding: utf-8 -*- - -from south.db import db -from django.db import models -from project.kiwipycon.registration.models import * - -class Migration: - - def forwards(self, orm): - - # Adding model 'Wifi' - db.create_table('registration_wifi', ( - ('wifi', models.CharField(max_length=50)), - ('user', models.ForeignKey(orm['auth.User'])), - ('id', models.AutoField(primary_key=True)), - )) - db.send_create_signal('registration', ['Wifi']) - - - - def backwards(self, orm): - - # Deleting model 'Wifi' - db.delete_table('registration_wifi') - - - - models = { - 'auth.user': { - '_stub': True, - 'id': ('models.AutoField', [], {'primary_key': 'True'}) - }, - 'registration.wifi': { - 'id': ('models.AutoField', [], {'primary_key': 'True'}), - 'user': ('models.ForeignKey', ['User'], {}), - 'wifi': ('models.CharField', [], {'max_length': '50'}) - }, - 'registration.registration': { - 'allow_contact': ('models.BooleanField', [], {'default': 'False'}), - 'city': ('models.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('models.AutoField', [], {'primary_key': 'True'}), - 'last_mod': ('models.DateTimeField', [], {'auto_now': 'True'}), - 'occupation': ('models.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'organisation': ('models.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'conference': ('models.BooleanField', [], {'default': 'False'}), - 'tutorial': ('models.BooleanField', [], {'default': 'False'}), - 'sprint': ('models.BooleanField', [], {'default': 'False'}), - 'postcode': ('models.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'registrant': ('models.ForeignKey', ['User'], {}), - 'slug': ('models.SlugField', [], {}), - 'submitted': ('models.DateTimeField', [], {'auto_now_add': 'True'}), - 'tshirt': ('models.CharField', [], {'max_length': '2'}) - } - } - - complete_apps = ['registration'] diff --git a/project/scipycon/registration/migrations/__init__.py b/project/scipycon/registration/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 --- a/project/scipycon/registration/migrations/__init__.py +++ /dev/null diff --git a/project/scipycon/registration/pdf.py b/project/scipycon/registration/pdf.py deleted file mode 100644 index 7fec07a..0000000 --- a/project/scipycon/registration/pdf.py +++ /dev/null @@ -1,20 +0,0 @@ -import os - -from django.conf import settings -from django.template.loader import render_to_string - -def save_invoice(user, registration, template_name): - content = render_to_string(template_name, - {'registration' : registration, 'user': user}) - filename = '%s.html' % registration.slug - filepath = os.path.join(settings.USER_MEDIA_PDF, filename) - save_to_file(content, filepath) - -def save_to_pdf(content, filepath): - import pisa - pisa.CreatePDF(str(content), file(filepath, 'wb')) - -def save_to_file(content, filepath): - fout = file(filepath, 'wb') - fout.write(content) - fout.close() diff --git a/project/scipycon/registration/views.py b/project/scipycon/registration/views.py index 754dc15..542d6cc 100644 --- a/project/scipycon/registration/views.py +++ b/project/scipycon/registration/views.py @@ -18,14 +18,12 @@ from django.contrib.auth.forms import AuthenticationForm from django.contrib.auth.models import User from django.core.exceptions import ObjectDoesNotExist -#kiwipycon -from project.kiwipycon.utils import set_message_cookie -from project.kiwipycon.utils import slugify -from project.kiwipycon.user.models import UserProfile -from project.kiwipycon.user.utils import kiwipycon_createregistrant -from project.kiwipycon.user.forms import RegistrantForm -from project.kiwipycon.sponsor.models import Sponsor -from project.kiwipycon.talk.models import Talk +from project.scipycon.utils import set_message_cookie +from project.scipycon.utils import slugify +from project.scipycon.user.models import UserProfile +from project.scipycon.user.utils import scipycon_createregistrant +from project.scipycon.user.forms import RegistrantForm +from project.scipycon.talk.models import Talk from .models import Registration from .models import Wifi @@ -45,7 +43,7 @@ def download_csv(request, """ """ if not request.user.is_staff: - redirect_to = reverse('kiwipycon_login') + redirect_to = reverse('scipycon_login') if request.method == "POST": form = RegistrationAdminSelectForm(request.POST) if form.is_valid(): @@ -118,7 +116,7 @@ def invoice(request, template_name='registration/invoice.html'): user = request.user registration = get_object_or_404(Registration, registrant=user) if registration.sponsor: - redirect_to = reverse('kiwipycon_account') + redirect_to = reverse('scipycon_account') return set_message_cookie(redirect_to, msg = u'You are a sponsored guest, no payment required.') return render_to_response(template_name, RequestContext(request, @@ -129,7 +127,7 @@ def pdf_invoice(request, template_name='registration/invoice.html'): user = request.user registration = get_object_or_404(Registration, registrant=user) if registration.sponsor: - redirect_to = reverse('kiwipycon_account') + redirect_to = reverse('scipycon_account') return set_message_cookie(redirect_to, msg = u'You are a sponsored guest, no payment required.') content = render_to_string(template_name, @@ -161,7 +159,7 @@ def edit_registration(request, id, reg = Registration.objects.get(pk=id) if reg.registrant != request.user: - redirect_to = reverse('kiwipycon_account') + redirect_to = reverse('scipycon_account') return set_message_cookie(redirect_to, msg = u'Redirected because the registration you selected' \ + ' is not your own.') @@ -179,7 +177,7 @@ def edit_registration(request, id, reg.sprint = form.data.get('sprint') and True or False reg.save() # Saved.. redirect - redirect_to = reverse('kiwipycon_account') + redirect_to = reverse('scipycon_account') return set_message_cookie(redirect_to, msg = u'Your changes have been saved.') else: @@ -214,7 +212,7 @@ def submit_registration(request, try: registration = Registration.objects.get(registrant=user) if registration: - redirect_to = reverse('kiwipycon_account') + redirect_to = reverse('scipycon_account') return set_message_cookie(redirect_to, msg = u'You have already been registered.') @@ -235,7 +233,7 @@ def submit_registration(request, from django.contrib.auth import login login(request, login_form.get_user()) - redirect_to = reverse('kiwipycon_submit_registration') + redirect_to = reverse('scipycon_submit_registration') return set_message_cookie(redirect_to, msg = u'You have been logged in please continue' + \ 'with registration.') @@ -244,7 +242,7 @@ def submit_registration(request, passwd = None if not user.is_authenticated(): if registrant_form.is_valid(): - newuser = kiwipycon_createregistrant(request, registrant_form.data) + newuser = scipycon_createregistrant(request, registrant_form.data) # Log in user passwd = User.objects.make_random_password() newuser.set_password(passwd) @@ -313,7 +311,7 @@ def submit_registration(request, # 2. send user email with registration id send_confirmation(registrant, slug) - redirect_to = reverse('kiwipycon_registrations') + redirect_to = reverse('scipycon_registrations') return set_message_cookie(redirect_to, msg = u'Thank you, your registration has been submitted '\ 'and an email has been sent with payment details.') diff --git a/project/scipycon/sponsor/__init__.py b/project/scipycon/sponsor/__init__.py deleted file mode 100644 index e69de29..0000000 --- a/project/scipycon/sponsor/__init__.py +++ /dev/null diff --git a/project/scipycon/sponsor/admin.py b/project/scipycon/sponsor/admin.py deleted file mode 100644 index 95735d9..0000000 --- a/project/scipycon/sponsor/admin.py +++ /dev/null @@ -1,15 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import absolute_import - -#django -from django.contrib import admin - -#kiwipycon -from .models import Sponsor - -class SponsorAdmin(admin.ModelAdmin): - list_display = ('title', 'type', 'contact_name', 'contact_email', 'contact_phone', - 'guests', 'url', 'logo') - -admin.site.register(Sponsor, SponsorAdmin) - diff --git a/project/scipycon/sponsor/migrations/0001_initial.py b/project/scipycon/sponsor/migrations/0001_initial.py deleted file mode 100644 index 2512f1a..0000000 --- a/project/scipycon/sponsor/migrations/0001_initial.py +++ /dev/null @@ -1,50 +0,0 @@ -# -*- coding: utf-8 -*- - -from south.db import db -from django.db import models -from project.kiwipycon.sponsor.models import * - -class Migration: - - def forwards(self, orm): - - # Adding model 'Sponsor' - db.create_table('sponsor_sponsor', ( - ('id', models.AutoField(primary_key=True)), - ('slug', models.SlugField()), - ('title', models.CharField(max_length=255)), - ('type', models.CharField(max_length=10)), - ('url', models.URLField(verify_exists=False, blank=True)), - ('contact_name', models.CharField(max_length=255)), - ('contact_phone', models.CharField(max_length=255)), - ('contact_email', models.CharField(max_length=255)), - ('logo', models.CharField(max_length=64, blank=True)), - ('guests', models.IntegerField()), - )) - db.send_create_signal('sponsor', ['Sponsor']) - - - - def backwards(self, orm): - - # Deleting model 'Sponsor' - db.delete_table('sponsor_sponsor') - - - - models = { - 'sponsor.sponsor': { - 'contact_email': ('models.CharField', [], {'max_length': '255'}), - 'contact_name': ('models.CharField', [], {'max_length': '255'}), - 'contact_phone': ('models.CharField', [], {'max_length': '255'}), - 'guests': ('models.IntegerField', [], {}), - 'id': ('models.AutoField', [], {'primary_key': 'True'}), - 'logo': ('models.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'slug': ('models.SlugField', [], {}), - 'title': ('models.CharField', [], {'max_length': '255'}), - 'type': ('models.CharField', [], {'max_length': '10'}), - 'url': ('models.URLField', [], {'verify_exists': 'False', 'blank': 'True'}) - } - } - - complete_apps = ['sponsor'] diff --git a/project/scipycon/sponsor/migrations/__init__.py b/project/scipycon/sponsor/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 --- a/project/scipycon/sponsor/migrations/__init__.py +++ /dev/null diff --git a/project/scipycon/sponsor/models.py b/project/scipycon/sponsor/models.py deleted file mode 100644 index 68d8b5b..0000000 --- a/project/scipycon/sponsor/models.py +++ /dev/null @@ -1,28 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import absolute_import - -#django -from django.db import models -from django.conf import settings - -TYPE_CHOICES = ( - ('gold', 'Gold'), - ('silver', 'Silver'), - ('schwag', 'Schwag'), - ) - -class Sponsor(models.Model): - """Defines sponsors for *PyCon""" - slug = models.SlugField() - title = models.CharField(max_length=255) - type = models.CharField(max_length=10, choices=TYPE_CHOICES) - contact_name = models.CharField(max_length=255) - contact_email = models.CharField(max_length=255) - contact_phone = models.CharField(max_length=255) - url = models.URLField(blank=True, verify_exists=False) - logo = models.CharField(max_length=64, blank=True) - guests = models.IntegerField() - - def __unicode__(self): - return self.title - diff --git a/project/scipycon/sponsor/views.py b/project/scipycon/sponsor/views.py deleted file mode 100644 index a6f5ad2..0000000 --- a/project/scipycon/sponsor/views.py +++ /dev/null @@ -1,17 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import absolute_import - -# django -from django.conf import settings -from django.shortcuts import render_to_response -from django.template import RequestContext - -def schwag_sponsors(request, - template_name = 'sponsor/schwag.html'): - """Simple page to display schwag sponsors - - The list is generated in kiwipycon.context_processors - """ - return render_to_response(template_name, RequestContext(request, - {})) - diff --git a/project/scipycon/talk/admin.py b/project/scipycon/talk/admin.py index 73c8d6a..b5c7158 100644 --- a/project/scipycon/talk/admin.py +++ b/project/scipycon/talk/admin.py @@ -4,7 +4,7 @@ from __future__ import absolute_import #django.contrib from django.contrib import admin -#kiwipycon +#scipycon from .models import Talk class TalkAdmin(admin.ModelAdmin): diff --git a/project/scipycon/talk/forms.py b/project/scipycon/talk/forms.py index 49e12d7..1b05ace 100644 --- a/project/scipycon/talk/forms.py +++ b/project/scipycon/talk/forms.py @@ -10,7 +10,7 @@ from django.contrib.auth.models import User #tagging from tagging.forms import TagField -#kiwipycon +#scipycon #from .models import TOPIC_CHOICES from .models import DURATION_CHOICES from .models import AUDIENCE_CHOICES diff --git a/project/scipycon/talk/migrations/0001_initial.py b/project/scipycon/talk/migrations/0001_initial.py deleted file mode 100644 index 6eec7f7..0000000 --- a/project/scipycon/talk/migrations/0001_initial.py +++ /dev/null @@ -1,68 +0,0 @@ -# -*- coding: utf-8 -*- - -from south.db import db -from django.db import models -from project.kiwipycon.talk.models import * - -class Migration: - - def forwards(self, orm): - - # Adding model 'Talk' - db.create_table('talk_talk', ( - ('id', models.AutoField(primary_key=True)), - ('slug', models.SlugField()), - ('speaker', models.ForeignKey(orm['auth.User'])), - ('authors_bio', models.TextField()), - ('contact', models.CharField(max_length=1024)), - ('title', models.CharField(max_length=1024)), - ('abstract', models.TextField()), -# ('outline', models.TextField()), - ('topic', models.CharField(blank=True, max_length=255)), -# ('topic_other', models.CharField(max_length=255, blank=True)), - ('duration', models.CharField(max_length=3)), - ('audience', models.CharField(blank=True, max_length=32)), -# ('audience_other', models.CharField(max_length=128, blank=True)), - ('approved', models.BooleanField(default=False)), - ('submitted', models.DateTimeField(auto_now_add=True)), - ('last_mod', models.DateTimeField(auto_now=True)), -# ('tags', TagField(blank=True)), - )) - db.send_create_signal('talk', ['Talk']) - - - - def backwards(self, orm): - - # Deleting model 'Talk' - db.delete_table('talk_talk') - - - - models = { - 'auth.user': { - '_stub': True, - 'id': ('models.AutoField', [], {'primary_key': 'True'}) - }, - 'talk.talk': { - 'abstract': ('models.TextField', [], {}), - 'approved': ('models.BooleanField', [], {'default': 'False'}), - 'audience': ('models.CharField', [], {'blank': 'True', 'max_length': '32'}), - 'audience_other': ('models.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'authors_bio': ('models.TextField', [], {}), - 'contact': ('models.CharField', [], {'max_length': '1024'}), - 'duration': ('models.CharField', [], {'max_length': '3'}), - 'id': ('models.AutoField', [], {'primary_key': 'True'}), - 'last_mod': ('models.DateTimeField', [], {'auto_now': 'True'}), - 'outline': ('models.TextField', [], {}), - 'slug': ('models.SlugField', [], {}), - 'speaker': ('models.ForeignKey', ['User'], {}), - 'submitted': ('models.DateTimeField', [], {'auto_now_add': 'True'}), - 'tags': ('TagField', [], {'blank': 'True'}), - 'title': ('models.CharField', [], {'max_length': '1024'}), - 'topic': ('models.CharField', [], {'blank': 'True', 'max_length': '255'}), - 'topic_other': ('models.CharField', [], {'max_length': '255', 'blank': 'True'}) - } - } - - complete_apps = ['talk'] diff --git a/project/scipycon/talk/migrations/__init__.py b/project/scipycon/talk/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 --- a/project/scipycon/talk/migrations/__init__.py +++ /dev/null diff --git a/project/scipycon/talk/views.py b/project/scipycon/talk/views.py index 017bcd3..0569a44 100644 --- a/project/scipycon/talk/views.py +++ b/project/scipycon/talk/views.py @@ -22,12 +22,12 @@ from PIL import Image # tagging from tagging.models import Tag -#kiwipycon -from project.kiwipycon.utils import set_message_cookie -from project.kiwipycon.utils import slugify -from project.kiwipycon.user.models import UserProfile -from project.kiwipycon.user.forms import RegisterForm -from project.kiwipycon.user.utils import kiwipycon_createuser +#scipycon +from project.scipycon.utils import set_message_cookie +from project.scipycon.utils import slugify +from project.scipycon.user.models import UserProfile +from project.scipycon.user.forms import RegisterForm +from project.scipycon.user.utils import scipycon_createuser from .models import Talk from .forms import TalkSubmitForm @@ -55,12 +55,12 @@ def edit_talk(request, id, template_name='talk/edit-talk.html'): talk = Talk.objects.get(pk=id) if talk.approved == True: - redirect_to = reverse('kiwipycon_account') + redirect_to = reverse('scipycon_account') return set_message_cookie(redirect_to, msg = u'Sorry but you cannot edit the talk once'\ + ' it has been accepted.') if talk.speaker != request.user: - redirect_to = reverse('kiwipycon_account') + redirect_to = reverse('scipycon_account') return set_message_cookie(redirect_to, msg = u'Redirected to account because the talk you selected' \ + ' is not your own.') @@ -82,7 +82,7 @@ def edit_talk(request, id, template_name='talk/edit-talk.html'): # talk.tags = form.data.get('tags') talk.save() # Saved.. redirect - redirect_to = reverse('kiwipycon_account') + redirect_to = reverse('scipycon_account') return set_message_cookie(redirect_to, msg = u'Your changes have been saved.') else: @@ -130,7 +130,7 @@ def submit_talk(request, template_name='talk/submit-talk.html'): from django.contrib.auth import login login(request, login_form.get_user()) - redirect_to = reverse('kiwipycon_submit_talk') + redirect_to = reverse('scipycon_submit_talk') return set_message_cookie(redirect_to, msg = u'You have been logged in.') @@ -138,7 +138,7 @@ def submit_talk(request, template_name='talk/submit-talk.html'): # add the new user if register_form.is_valid(): - user = kiwipycon_createuser(request, register_form.data) + user = scipycon_createuser(request, register_form.data) if talk_form.is_valid(): if user.is_authenticated(): @@ -161,11 +161,11 @@ def submit_talk(request, template_name='talk/submit-talk.html'): ) talk.save() # Saved, ... redirect back to account - redirect_to = reverse('kiwipycon_account') + redirect_to = reverse('scipycon_account') return set_message_cookie(redirect_to, msg = u'Thanks, your talk has been submitted.') else: - redirect_to = reverse('kiwipycon_submit_talk') + redirect_to = reverse('scipycon_submit_talk') return set_message_cookie(redirect_to, msg = u'Something is wrong here.') diff --git a/project/scipycon/user/admin.py b/project/scipycon/user/admin.py index c72a5b5..3d4813b 100644 --- a/project/scipycon/user/admin.py +++ b/project/scipycon/user/admin.py @@ -4,7 +4,7 @@ from __future__ import absolute_import #django from django.contrib import admin -#kiwipycon +#scipycon from .models import UserProfile class UserProfileAdmin(admin.ModelAdmin): diff --git a/project/scipycon/user/migrations/0001_initial.py b/project/scipycon/user/migrations/0001_initial.py deleted file mode 100644 index 8cb8788..0000000 --- a/project/scipycon/user/migrations/0001_initial.py +++ /dev/null @@ -1,44 +0,0 @@ -# -*- coding: utf-8 -*- - -from south.db import db -from django.db import models -from project.kiwipycon.user.models import * - -class Migration: - - def forwards(self, orm): - - # Adding model 'UserProfile' - db.create_table('user_userprofile', ( - ('id', models.AutoField(primary_key=True)), - ('user', models.ForeignKey(orm['auth.User'], unique=True)), - ('url', models.URLField(verify_exists=False, blank=True)), - ('photo', models.CharField(max_length=64, blank=True)), - ('about', models.TextField(blank=True)), - )) - db.send_create_signal('user', ['UserProfile']) - - - - def backwards(self, orm): - - # Deleting model 'UserProfile' - db.delete_table('user_userprofile') - - - - models = { - 'auth.user': { - '_stub': True, - 'id': ('models.AutoField', [], {'primary_key': 'True'}) - }, - 'user.userprofile': { - 'about': ('models.TextField', [], {'blank': 'True'}), - 'id': ('models.AutoField', [], {'primary_key': 'True'}), - 'photo': ('models.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'url': ('models.URLField', [], {'verify_exists': 'False', 'blank': 'True'}), - 'user': ('models.ForeignKey', ['User'], {'unique': 'True'}) - } - } - - complete_apps = ['user'] diff --git a/project/scipycon/user/migrations/__init__.py b/project/scipycon/user/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 --- a/project/scipycon/user/migrations/__init__.py +++ /dev/null diff --git a/project/scipycon/user/utils.py b/project/scipycon/user/utils.py index ad492a4..f978cd9 100644 --- a/project/scipycon/user/utils.py +++ b/project/scipycon/user/utils.py @@ -15,7 +15,7 @@ from django.contrib.auth.models import User from PIL import Image -def kiwipycon_createregistrant(request, data): +def scipycon_createregistrant(request, data): """Create user""" email = data.get("email") name = data.get("name") @@ -38,7 +38,7 @@ def kiwipycon_createregistrant(request, data): return user -def kiwipycon_createuser(request, data): +def scipycon_createuser(request, data): """Create user""" email = data.get("email") username = data.get("username") diff --git a/project/scipycon/user/views.py b/project/scipycon/user/views.py index 8b890c1..9d96ff2 100644 --- a/project/scipycon/user/views.py +++ b/project/scipycon/user/views.py @@ -26,15 +26,14 @@ from django.core.exceptions import ObjectDoesNotExist #PIL from PIL import Image -#kiwipycon -from project.kiwipycon.utils import set_message_cookie -from project.kiwipycon.talk.models import Talk -from project.kiwipycon.registration.models import Registration -from project.kiwipycon.registration.models import Wifi -from project.kiwipycon.registration.forms import WifiForm -from project.kiwipycon.sponsor.models import Sponsor - -from .utils import kiwipycon_createuser +#scipycon +from project.scipycon.utils import set_message_cookie +from project.scipycon.talk.models import Talk +from project.scipycon.registration.models import Registration +from project.scipycon.registration.models import Wifi +from project.scipycon.registration.forms import WifiForm + +from .utils import scipycon_createuser from .utils import handle_uploaded_photo from .forms import RegisterForm from .forms import EditProfileForm @@ -111,7 +110,7 @@ def edit_profile(request, template_name="user/editprofile.html"): profile.about = form.data.get("about") profile.save() - redirect_to = reverse("kiwipycon_account") + redirect_to = reverse("scipycon_account") return set_message_cookie(redirect_to, msg = u"Your profile has been changed.") @@ -135,7 +134,7 @@ def login(request, template_name="user/login.html"): """ user = request.user if user.is_authenticated(): - redirect_to = reverse("kiwipycon_account") + redirect_to = reverse("scipycon_account") return set_message_cookie(redirect_to, msg = u"Redirected to account from login form.") @@ -150,7 +149,7 @@ def login(request, template_name="user/login.html"): redirect_to = request.POST.get("next") # Light security check -- make sure redirect_to isn't garbage. if not redirect_to or '//' in redirect_to or ' ' in redirect_to: - redirect_to = reverse("kiwipycon_account") + redirect_to = reverse("scipycon_account") from django.contrib.auth import login login(request, login_form.get_user()) @@ -161,11 +160,11 @@ def login(request, template_name="user/login.html"): register_form = RegisterForm(data=request.POST) if register_form.is_valid(): - user = kiwipycon_createuser(request, register_form.data) + user = scipycon_createuser(request, register_form.data) redirect_to = request.POST.get("next") if not redirect_to or '//' in redirect_to or ' ' in redirect_to: - redirect_to = reverse("kiwipycon_account") + redirect_to = reverse("scipycon_account") return set_message_cookie( redirect_to, msg = u"You have been registered and logged in.") @@ -175,7 +174,7 @@ def login(request, template_name="user/login.html"): if next_url is None: next_url = request.META.get("HTTP_REFERER") if next_url is None: - next_url = reverse("kiwipycon_account") + next_url = reverse("scipycon_account") # Get just the path of the url. See django.contrib.auth.views.login for more next_url = urlparse(next_url) next_url = next_url[2] @@ -212,7 +211,7 @@ def password(request, template_name="user/password.html"): form = PasswordChangeForm(request.user, request.POST) if form.is_valid(): form.save() - redirect_to = reverse("kiwipycon_account") + redirect_to = reverse("scipycon_account") return set_message_cookie(redirect_to, msg = u"Your password has been changed.") else: @@ -231,7 +230,7 @@ def username(request, template_name="user/username.html"): if username_form.is_valid(): request.user.username = username_form.cleaned_data.get("username") request.user.save() - redirect_to = reverse("kiwipycon_account") + redirect_to = reverse("scipycon_account") return set_message_cookie(redirect_to, msg = u"Your username has been changed.") else: diff --git a/project/scipycon/utils.py b/project/scipycon/utils.py index 611dc62..93331b7 100644 --- a/project/scipycon/utils.py +++ b/project/scipycon/utils.py @@ -8,7 +8,7 @@ from random import randint #django from django.http import HttpResponseRedirect -def kiwipycon_quote(string, encoding="utf-8"): +def scipycon_quote(string, encoding="utf-8"): """Encodes string to encoding before quoting. """ return urllib.quote(string.encode(encoding)) @@ -26,7 +26,7 @@ def set_message_cookie(url, msg): datetime.timedelta(seconds=max_age), "%a, %d-%b-%Y %H:%M:%S GMT") response = HttpResponseRedirect(url) - response.set_cookie("message", kiwipycon_quote(msg), max_age=max_age, expires=expires) + response.set_cookie("message", scipycon_quote(msg), max_age=max_age, expires=expires) return response diff --git a/project/settings.py b/project/settings.py index 3c5c064..733489c 100644 --- a/project/settings.py +++ b/project/settings.py @@ -72,9 +72,7 @@ TEMPLATE_CONTEXT_PROCESSORS = ( 'django.core.context_processors.auth', 'django.core.context_processors.debug', 'django.core.context_processors.i18n', - 'django.core.context_processors.media', - 'project.scipycon.context_processors.sponsors') + 'django.core.context_processors.media') DEFAULT_FROM_EMAIL = 'admin@scipy.in' -ACCOUNT_ACTIVATION_DAYS = 55 diff --git a/project/setup.py b/project/setup.py index 37ca1f6..267c218 100644 --- a/project/setup.py +++ b/project/setup.py @@ -5,10 +5,5 @@ setup( name='project', version='1.0', description="SciPy.in Conference django website", - entry_points={ - "console_scripts": [ - 'initdb = scripts.initdb:main', - ] - }, ) diff --git a/project/static/css/styles.css b/project/static/css/styles.css index fae6f2b..fc2bd87 100644 --- a/project/static/css/styles.css +++ b/project/static/css/styles.css @@ -98,28 +98,28 @@ div#comment_form label { width: 200px; } /* default table layout */ -table.kiwipycon-default +table.scipycon-default { border-collapse: collapse; } -table.kiwipycon-default td +table.scipycon-default td { padding: 5px 15px; } -table.kiwipycon-default th +table.scipycon-default th { font-weight: bold; padding: 4px 6px; } -table.kiwipycon-default a +table.scipycon-default a { text-decoration: none; } -table.kiwipycon-default .buttons +table.scipycon-default .buttons { padding: 10px 0; } diff --git a/project/static/doc/Kiwi PyCon Media Statement 2.doc b/project/static/doc/Kiwi PyCon Media Statement 2.doc Binary files differdeleted file mode 100644 index 1e043d1..0000000 --- a/project/static/doc/Kiwi PyCon Media Statement 2.doc +++ /dev/null diff --git a/project/static/doc/Kiwi PyCon Media Statement.doc b/project/static/doc/Kiwi PyCon Media Statement.doc Binary files differdeleted file mode 100644 index 78d0ba3..0000000 --- a/project/static/doc/Kiwi PyCon Media Statement.doc +++ /dev/null diff --git a/project/static/pdf/Kiwi PyCon Media Statement 2.pdf b/project/static/pdf/Kiwi PyCon Media Statement 2.pdf Binary files differdeleted file mode 100644 index 14b1eee..0000000 --- a/project/static/pdf/Kiwi PyCon Media Statement 2.pdf +++ /dev/null diff --git a/project/static/pdf/Kiwi PyCon Media Statement.pdf b/project/static/pdf/Kiwi PyCon Media Statement.pdf Binary files differdeleted file mode 100644 index b95db89..0000000 --- a/project/static/pdf/Kiwi PyCon Media Statement.pdf +++ /dev/null diff --git a/project/static/pdf/Kiwi PyCon Preconference Release.pdf b/project/static/pdf/Kiwi PyCon Preconference Release.pdf Binary files differdeleted file mode 100644 index f765a41..0000000 --- a/project/static/pdf/Kiwi PyCon Preconference Release.pdf +++ /dev/null diff --git a/project/static/pdf/KiwiPyCon09_Sponsorship_Brochure_v1.0.pdf b/project/static/pdf/KiwiPyCon09_Sponsorship_Brochure_v1.0.pdf Binary files differdeleted file mode 100644 index fa9bb50..0000000 --- a/project/static/pdf/KiwiPyCon09_Sponsorship_Brochure_v1.0.pdf +++ /dev/null diff --git a/project/static/pdf/KiwiPyCon09_Sponsorship_Brochure_v1.1.pdf b/project/static/pdf/KiwiPyCon09_Sponsorship_Brochure_v1.1.pdf Binary files differdeleted file mode 100644 index 736f6be..0000000 --- a/project/static/pdf/KiwiPyCon09_Sponsorship_Brochure_v1.1.pdf +++ /dev/null diff --git a/project/static/pdf/KiwiPyConCfP.pdf b/project/static/pdf/KiwiPyConCfP.pdf Binary files differdeleted file mode 100644 index 0090202..0000000 --- a/project/static/pdf/KiwiPyConCfP.pdf +++ /dev/null diff --git a/project/templates/_menu.html b/project/templates/_menu.html index 543b965..6935947 100644 --- a/project/templates/_menu.html +++ b/project/templates/_menu.html @@ -24,30 +24,8 @@ </ul> </li> <li><a href="/">Blog</a></li> - <!--<li><a href="/sponsorship/">Sponsorship</a></li> - <li><a href="/media/">Media</a></li>--> {% if user.is_staff %} <li><a href="/howto/">HowTo</a></li> - {% endif %}<!-- - <li>Follow us:<br /><br /> - <a href="http://twitter.com/scipy.in" - target="_blank" - title="Follow us on Twitter"><img src="/img/twitter.png" /></a> - </li> - <li> - <a href="http://www.flickr.com/search/?q=scipy.in" - target="_blank" - title="Flickr"><img src="/img/flickr.png" /></a> - </li> - <li> - <a href="http://www.slideshare.net/tag/scipy.in" - target="_blank" - title="SlideShare"><img src="/img/slideshare.png" /></a> - </li> - <li> - <a href="http://scipy.in.blip.tv/" - target="_blank" - title="blip.tv"><img src="/img/bliptv.gif" /></a> - </li>--> + {% endif %} </ul> </div> diff --git a/project/templates/_menu_user.html b/project/templates/_menu_user.html index 444c62d..6041d00 100644 --- a/project/templates/_menu_user.html +++ b/project/templates/_menu_user.html @@ -6,14 +6,14 @@ <strong>{{ user.username }}</strong> {% endif %} | - <a href="{% url kiwipycon_account %}">My profile</a> | + <a href="{% url scipycon_account %}">My profile</a> | {% if user.is_superuser %} <a href="/admin/">Administer</a> | {% endif %} - <a href="{% url kiwipycon_logout %}">Logout</a> + <a href="{% url scipycon_logout %}">Logout</a> {% else %} - <a href="{% url kiwipycon_login %}">Login</a> + <a href="{% url scipycon_login %}">Login</a> {% endif %} </div> diff --git a/project/templates/about/reaching.html b/project/templates/about/reaching.html index 00586f3..b7eaa1a 100644 --- a/project/templates/about/reaching.html +++ b/project/templates/about/reaching.html @@ -17,7 +17,7 @@ which is approximately 1km from Trivandrum Central Railway Station.</p> are at:</p> <p class="noindent"> -<table class="kiwipycon-default"> +<table class="scipycon-default"> <tr><th>From East fort</th><th>Reaches Technopark at</th></tr> <tr><td>6:00AM</td><td>6:40AM</td></tr> <tr><td>7:00AM</td><td>7:35AM</td></tr> diff --git a/project/templates/proceedings/submit.html b/project/templates/proceedings/submit.html index de6b516..013980b 100644 --- a/project/templates/proceedings/submit.html +++ b/project/templates/proceedings/submit.html @@ -11,7 +11,7 @@ // Set autosuggest options with all plugins activated var options = { - script:"{% url kiwipycon_get_usernames %}?limit=10&", + script:"{% url scipycon_get_usernames %}?limit=10&", varname:"input", json:true, // Returned response type shownoresults:true, // If disable, display nothing if no results @@ -41,21 +41,21 @@ {% include '_errors.html' %} - <form action="{% if id %}{% url kiwipycon_submit_proceedings id %}{% else %}{% url kiwipycon_submit_proceedings %}{% endif %}" method="post"> + <form action="{% if id %}{% url scipycon_submit_proceedings id %}{% else %}{% url scipycon_submit_proceedings %}{% endif %}" method="post"> {% if not user.is_authenticated %} <fieldset> <legend>Are you a member of this site?</legend> - <table class="kiwipycon-default required">{{ login_form }}</table> + <table class="scipycon-default required">{{ login_form }}</table> <input type="hidden" name="action" value="login" /> <button class="button left" type="submit">Login</button> </fieldset> </form> <br /> - <form action="{% url kiwipycon_submit_proceedings id %}" + <form action="{% url scipycon_submit_proceedings id %}" enctype="multipart/form-data" method="post"> <fieldset> <legend>User Registration</legend> - <table class="kiwipycon-default required">{{ register_form }}</table> + <table class="scipycon-default required">{{ register_form }}</table> <input type="hidden" name="action" value="register" /> </fieldset> @@ -64,7 +64,7 @@ <fieldset> <legend>Proceedings Paper Submission</legend> - <table class="kiwipycon-default required"> + <table class="scipycon-default required"> <tr> <th>{{ proceedings_form.title.label }}</th> <td>{{ proceedings_form.title.errors }}{{ proceedings_form.title }}</td> diff --git a/project/templates/registration/download-csv.html b/project/templates/registration/download-csv.html index e23ae50..69df90f 100644 --- a/project/templates/registration/download-csv.html +++ b/project/templates/registration/download-csv.html @@ -11,7 +11,7 @@ method="post"> <fieldset> <legend>Select Registrations</legend> - <table class="kiwipycon-default"> + <table class="scipycon-default"> {{ form }} </table> <button class="button left" diff --git a/project/templates/registration/edit-registration.html b/project/templates/registration/edit-registration.html index 6bafa96..776b325 100644 --- a/project/templates/registration/edit-registration.html +++ b/project/templates/registration/edit-registration.html @@ -7,11 +7,11 @@ {% include '_errors.html' %} -<form action="{% url kiwipycon_edit_registration id %}" +<form action="{% url scipycon_edit_registration id %}" method="post"> <fieldset> <legend>Edit Registration</legend> - <table class="kiwipycon-default"> + <table class="scipycon-default"> {{ form }} </table> <button class="button left" diff --git a/project/templates/registration/submit-registration.html b/project/templates/registration/submit-registration.html index 6a29db8..f3909ac 100644 --- a/project/templates/registration/submit-registration.html +++ b/project/templates/registration/submit-registration.html @@ -20,7 +20,7 @@ {% if not user.is_authenticated %} <fieldset> <legend>Have you already registered for the conference?</legend> - <table class="kiwipycon-default"> + <table class="scipycon-default"> {{ login_form }} </table> @@ -46,7 +46,7 @@ method="post"> <fieldset> <legend>Registrant Details</legend> - <table class="kiwipycon-default required"> + <table class="scipycon-default required"> {{ registrant_form }} </table> @@ -61,7 +61,7 @@ <fieldset> <legend>Details</legend> - <table class="kiwipycon-default required"> + <table class="scipycon-default required"> {% for field in registration_form.personal_fields %} <tr class="{% cycle odd,even %}"><th>{{ field.label_tag }}</th> <td>{{ field.errors }}{{ field }}<br />{{ field.help_text }} </td></tr> @@ -79,7 +79,7 @@ <fieldset> <legend>Demographics</legend> - <table class="kiwipycon-default required"> + <table class="scipycon-default required"> {% for field in registration_form.demographic_fields %} <tr class="{% cycle odd,even %}"><th>{{ field.label_tag }}</th> <td>{{ field.errors }}{{ field }}<br />{{ field.help_text }} </td></tr> @@ -88,7 +88,7 @@ </fieldset> <fieldset> <legend>Others</legend> - <table class="kiwipycon-default"> + <table class="scipycon-default"> {{ wifi_form }} </table> diff --git a/project/templates/sponsor/schwag.html b/project/templates/sponsor/schwag.html deleted file mode 100644 index f01f1bf..0000000 --- a/project/templates/sponsor/schwag.html +++ /dev/null @@ -1,26 +0,0 @@ -{% extends "base.html" %} -<!-- TODO: Replace sentences with PR's suggestions. --> -{% block title %} -Schwag Sponsors -{% endblock %} - -{% block content %} - <h1>Schwag Sponsors</h1> - -<p>The SciPy.in 2009 Organising Committee would also like to thank the -following organisations for their generous contributions of giveaway items for -the SciPy.in PyCon attendees!</p> - -<p><ul> - <li>(co-chair) <a href='https://cirl.berkeley.edu/view/User/JarrodMillman'>Jarrod Millman</a>, Neuroscience Institute, UC Berkeley (USA)</li> - <li>(co-chair) <a href='http://www.aero.iitb.ac.in/~prabhu'>Prabhu Ramachandran</a>, Department of Aerospace Engineering, -IIT Bombay (India)</li> - <li>Vimal Joseph, <a href='http://space-kerala.org/'>SPACE-Kerala (India)</a></li> - <li><a href='http://fossee.in/'>FOSSEE Team</a></li> - <li><a href='http://www.itmission.kerala.gov.in'>Kerala State IT Mission(KSITM)</a></li> - <li><a href='http://csi-india.org'>SIG-FOSS Of CSI</a></li> -</ul></p> - - -{% endblock %} - diff --git a/project/templates/talk/edit-talk.html b/project/templates/talk/edit-talk.html index c6df8c0..5f4ce97 100644 --- a/project/templates/talk/edit-talk.html +++ b/project/templates/talk/edit-talk.html @@ -6,11 +6,11 @@ <h1>Edit Talk</h1> {% include '_errors.html' %} -<form action="{% url kiwipycon_edit_talk id %}" +<form action="{% url scipycon_edit_talk id %}" method="post"> <fieldset> <legend>Edit Talk</legend> - <table class="kiwipycon-default"> + <table class="scipycon-default"> {{ form }} </table> <button class="button left" diff --git a/project/templates/talk/submit-talk.html b/project/templates/talk/submit-talk.html index 79d3c80..9a40f80 100644 --- a/project/templates/talk/submit-talk.html +++ b/project/templates/talk/submit-talk.html @@ -7,12 +7,12 @@ {% include '_errors.html' %} - <form action="{% url kiwipycon_submit_talk %}" + <form action="{% url scipycon_submit_talk %}" method="post"> {% if not user.is_authenticated %} <fieldset> <legend>Are you a member of this site?</legend> - <table class="kiwipycon-default required"> + <table class="scipycon-default required"> {{ login_form }} </table> @@ -28,12 +28,12 @@ </form> <br /> - <form action="{% url kiwipycon_submit_talk %}" + <form action="{% url scipycon_submit_talk %}" enctype="multipart/form-data" method="post"> <fieldset> <legend>Speaker Registration</legend> - <table class="kiwipycon-default required"> + <table class="scipycon-default required"> {{ register_form }} </table> @@ -45,7 +45,7 @@ <br /> <fieldset> <legend>Talk Submission</legend> - <table class="kiwipycon-default required"> + <table class="scipycon-default required"> {{ talk_form }} </table> diff --git a/project/templates/talk/talks-cfp.html b/project/templates/talk/talks-cfp.html index 28a8225..f01018f 100644 --- a/project/templates/talk/talks-cfp.html +++ b/project/templates/talk/talks-cfp.html @@ -20,7 +20,7 @@ during which any attendee who wishes to talk on a pertinent topic is invited to <div class="section" id="submission-guidelines"> <h2>Submission Guidelines</h2> <ul class="simple"> -<li>Submissions should be uploaded via <a href="{% url kiwipycon_submit_talk %}">the web form.</a></li> +<li>Submissions should be uploaded via <a href="{% url scipycon_submit_talk %}">the web form.</a></li> <li>Submissions whose main purpose is to promote a commercial product or service will be refused.</li> <li>All accepted proposals must be presented at the SciPy conference by diff --git a/project/templates/user/_usermenu.html b/project/templates/user/_usermenu.html index db03c78..6f5a8d0 100644 --- a/project/templates/user/_usermenu.html +++ b/project/templates/user/_usermenu.html @@ -1,16 +1,16 @@ <div class="right"> <ul class="horizontal-menu"> <li> - <a href="{% url kiwipycon_account %}">My Profile</a> + <a href="{% url scipycon_account %}">My Profile</a> </li> <li> - <a href="{% url kiwipycon_edit_profile %}">Edit Profile</a> + <a href="{% url scipycon_edit_profile %}">Edit Profile</a> </li> <li> - <a href="{% url kiwipycon_password %}">Change Password</a> + <a href="{% url scipycon_password %}">Change Password</a> </li> <li> - <a href="{% url kiwipycon_username %}">Change Username</a> + <a href="{% url scipycon_username %}">Change Username</a> </li> </ul> </div> diff --git a/project/templates/user/account.html b/project/templates/user/account.html index 2862196..24d320a 100644 --- a/project/templates/user/account.html +++ b/project/templates/user/account.html @@ -7,7 +7,7 @@ {% block content %} <h1>My Profile: {{ user.first_name }} {{user.last_name}}</h1> -<table class="kiwipycon-default"> +<table class="scipycon-default"> <tr> <td class="label"> Username: @@ -25,7 +25,7 @@ <span>{{ user.get_full_name }}</span> {% else %} <span class="important">No name, please <a - href="{% url kiwipycon_edit_profile %}">edit profile</a>.</span> + href="{% url scipycon_edit_profile %}">edit profile</a>.</span> {% endif %} </td> <td rowspan="4"> @@ -86,7 +86,7 @@ requirements.</p> {% if talks %} <div id="talks"> <h2>Your Submitted Talks</h2> - <table class="kiwipycon-default" border="1"> + <table class="scipycon-default" border="1"> <th>Title</th> <th>Duration</th> <th>Audience</th> diff --git a/project/templates/user/editprofile.html b/project/templates/user/editprofile.html index fd73d3b..67857e8 100644 --- a/project/templates/user/editprofile.html +++ b/project/templates/user/editprofile.html @@ -6,12 +6,12 @@ <h1>Edit Your Profile</h1> - <form action="{% url kiwipycon_edit_profile %}" + <form action="{% url scipycon_edit_profile %}" enctype="multipart/form-data" method="post"> <fieldset> <legend>Edit Profile</legend> - <table class="kiwipycon-default"> + <table class="scipycon-default"> {{ form }} </table> <input type="hidden" diff --git a/project/templates/user/login.html b/project/templates/user/login.html index 9d920ad..65e8727 100644 --- a/project/templates/user/login.html +++ b/project/templates/user/login.html @@ -14,15 +14,15 @@ <form class="authenticate" enctype="multipart/form-data" - action="{% url kiwipycon_login %}" + action="{% url scipycon_login %}" method="post"> - <table class="kiwipycon-default"> + <table class="scipycon-default"> {{ login_form }} <tr> <td></td> <td> - <a href="{% url kiwipycon_password_reset %}">Forgot password?</a> + <a href="{% url scipycon_password_reset %}">Forgot password?</a> </td> </tr> </table> @@ -50,9 +50,9 @@ If you are not already a member of the site you can register here. </div> - <form action="{% url kiwipycon_login %}" + <form action="{% url scipycon_login %}" method="post"> - <table class="kiwipycon-default"> + <table class="scipycon-default"> {{ register_form }} </table> <input type="hidden" diff --git a/project/templates/user/password.html b/project/templates/user/password.html index ece1e96..db9b890 100644 --- a/project/templates/user/password.html +++ b/project/templates/user/password.html @@ -11,9 +11,9 @@ Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly. </p> - <form action="{% url kiwipycon_password %}" + <form action="{% url scipycon_password %}" method="post"> - <table class="kiwipycon-default"> + <table class="scipycon-default"> <tr> <td class="label"> <label for="id_old_password">Old password:</label> diff --git a/project/templates/user/username.html b/project/templates/user/username.html index 0e101a8..5ebbd1c 100644 --- a/project/templates/user/username.html +++ b/project/templates/user/username.html @@ -5,9 +5,9 @@ {% block content %} <h1>Change your username</h1> - <form action="{% url kiwipycon_username %}" + <form action="{% url scipycon_username %}" method="post"> - <table class="kiwipycon-default"> + <table class="scipycon-default"> <tr> <td class="label"> <label for="id_username">New username:</label> diff --git a/project/urls.py b/project/urls.py index 2db1513..10e29b4 100644 --- a/project/urls.py +++ b/project/urls.py @@ -6,20 +6,11 @@ from django.contrib import admin from django.views.generic.simple import direct_to_template from django.conf.urls.defaults import * -#basic.blog -from basic.blog.feeds import BlogPostsFeed - -feeds = { - 'blog': BlogPostsFeed, - } - admin.autodiscover() -# Blog & Admin -urlpatterns = patterns( - '', +# Admin +urlpatterns = patterns('', url(r'^$', direct_to_template, {"template": "home.html"}, name='home'), - (r'^feeds/(?P<url>.*)/$', 'django.contrib.syndication.views.feed', {'feed_dict': feeds}), (r'^comments/', include('django.contrib.comments.urls')), (r'^admin/(.*)', admin.site.root), ) @@ -92,12 +83,11 @@ urlpatterns += patterns('', url(r'^talks-cfp/speakers/$', direct_to_template, {"template": "talk/speakers.html"}, name='scipycon_speakers'), - (r'^accounts/', include('registration.urls')), ) # Password reset urlpatterns += patterns('django.contrib.auth.views', - url(r'^password-reset/$', 'password_reset', name='kiwipycon_password_reset'), + url(r'^password-reset/$', 'password_reset', name='scipycon_password_reset'), url(r'^password-reset-done/$', 'password_reset_done'), url(r'^password-reset-confirm/(?P<uidb36>[-\w]*)/(?P<token>[-\w]*)$', 'password_reset_confirm'), url(r'^password-reset-complete/$', 'password_reset_complete'), diff --git a/scripts/mails.py b/scripts/mails.py index b9705f8..84e2f04 100644 --- a/scripts/mails.py +++ b/scripts/mails.py @@ -11,8 +11,8 @@ __authors__ = [ from django.template import loader from django.contrib.auth.models import User -from project.kiwipycon.registration.models import Registration -from project.kiwipycon.talk.models import Talk +from project.scipycon.registration.models import Registration +from project.scipycon.talk.models import Talk def speaker_accepted(): |