From 75d320b872f66b366cdb05729bf20af7192e7d97 Mon Sep 17 00:00:00 2001 From: Amit Sethi Date: Wed, 3 Nov 2010 00:13:52 +0530 Subject: Handling the 500's for urls --- project/urls.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/project/urls.py b/project/urls.py index 599ec56..ab2dc87 100644 --- a/project/urls.py +++ b/project/urls.py @@ -9,8 +9,8 @@ from django.views.generic.simple import redirect_to admin.autodiscover() -PROGRAM_PATTERN_CORE = r'[a-z](?:[0-9a-z]|_[0-9a-z])*' -EVENT_PATTERN_CORE =r'(?:[0-9a-z]|_[0-9a-z])*' +PROGRAM_PATTERN_CORE = r'scipyin' +EVENT_PATTERN_CORE =r'2010' SCOPE_ARG_PATTERN = r'(?P%s/%s)' % ( PROGRAM_PATTERN_CORE, EVENT_PATTERN_CORE) -- cgit From c0e53373844dd79338efa358868af43658d4a8d4 Mon Sep 17 00:00:00 2001 From: Amit Sethi Date: Wed, 17 Nov 2010 23:25:09 +0530 Subject: Merging heads --- project/scipycon/base/models.py | 4 ++++ project/scipycon/registration/models.py | 5 +++++ project/scipycon/registration/views.py | 4 ++-- project/settings.py | 27 +++++++++++++++++++++++++++ 4 files changed, 38 insertions(+), 2 deletions(-) diff --git a/project/scipycon/base/models.py b/project/scipycon/base/models.py index 0e8d7c4..3146ca4 100644 --- a/project/scipycon/base/models.py +++ b/project/scipycon/base/models.py @@ -75,3 +75,7 @@ class ScopedBase(models.Model): class Meta: abstract = True + + +class Paid(models.Model): + event_start = models.DateTimeField(blank=True, null=True) diff --git a/project/scipycon/registration/models.py b/project/scipycon/registration/models.py index a465bdc..87851cf 100644 --- a/project/scipycon/registration/models.py +++ b/project/scipycon/registration/models.py @@ -78,3 +78,8 @@ class Registration(base_models.ScopedBase): return 'Registration for user: <%s %s> %s' % ( self.registrant.first_name, self.registrant.last_name, self.registrant.email) + + +class Payment(base_models.ScopedBase): + """ Defines Payment Details of Users """ + pass diff --git a/project/scipycon/registration/views.py b/project/scipycon/registration/views.py index 04d79a3..28f374c 100644 --- a/project/scipycon/registration/views.py +++ b/project/scipycon/registration/views.py @@ -227,7 +227,7 @@ def submit_registration(request, scope, wifi = wifi_form.save(registrant, scope_entity) - send_confirmation(registrant, scope_entity,password=passwd) + # send_confirmation(registrant, scope_entity,password=passwd) redirect_to = reverse('scipycon_registrations', kwargs={'scope': scope}) @@ -274,4 +274,4 @@ def regstats(request, scope, 'conf_num': conf_num, 'tut_num': tut_num, 'sprint_num': sprint_num, - })) \ No newline at end of file + })) diff --git a/project/settings.py b/project/settings.py index b8a94ba..0287cf2 100644 --- a/project/settings.py +++ b/project/settings.py @@ -7,6 +7,7 @@ ADMINS = ( MANAGERS = ADMINS +DEBUG=False DATABASE_HOST = '' DATABASE_PORT = '' @@ -77,3 +78,29 @@ DEFAULT_FROM_EMAIL = 'admin@scipy.in' CURRENT_SCOPE = 'scipyin/2010' LOGIN_URL = '/%s/login' % (CURRENT_SCOPE) + +DATABASE_ENGINE = 'sqlite3' +DATABASE_NAME = 'scipycon.db' +DATABASE_USER = '' +DATABASE_PASSWORD = '' + +INSTALLED_APPS = ( + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.comments', + 'django.contrib.sessions', + 'django.contrib.admin', + 'django.contrib.sites', + 'django.contrib.flatpages', + 'django.contrib.markup', + 'django.contrib.sitemaps', + 'project.scipycon', + 'project.scipycon.base', + 'project.scipycon.proceedings', + 'project.scipycon.registration', + 'project.scipycon.user', + 'project.scipycon.talk', + 'tagging', + 'robots', +) + -- cgit From 6fd8bc041f4e6a0fcd2b2107b25abe33b4d52b79 Mon Sep 17 00:00:00 2001 From: Amit Sethi Date: Thu, 18 Nov 2010 01:20:54 +0530 Subject: Changes to make it possible for someone to view daily dumps. --- project/scipycon/user/views.py | 39 ++++++++++++ project/templates/user/dump.html | 126 +++++++++++++++++++++++++++++++++++++++ project/urls.py | 8 ++- 3 files changed, 170 insertions(+), 3 deletions(-) create mode 100644 project/templates/user/dump.html diff --git a/project/scipycon/user/views.py b/project/scipycon/user/views.py index 92af31b..5f3b1be 100644 --- a/project/scipycon/user/views.py +++ b/project/scipycon/user/views.py @@ -29,6 +29,8 @@ from project.scipycon.user.utils import handle_uploaded_photo from project.scipycon.user.utils import scipycon_createuser from project.scipycon.utils import set_message_cookie +#User_dump Http404 Error +from django.http import Http404 @login_required def account(request, scope, template_name="user/account.html"): @@ -277,3 +279,40 @@ def get_usernames(request, scope): json_response = {'results': results} return HttpResponse(json.dumps(json_response)) + + +@login_required +def get_user_dump(request, scope,template_name='user/dump.html'): + """ Gets a general dump of user related info + """ + print request.user.is_staff + if request.user.is_staff: + qs=Registration.objects.all() + rows=[] + for obj in qs: + row = {} + row['first_name'] = obj.registrant.first_name + row['last_name'] = obj.registrant.last_name + try: + accomodation_require = Accommodation.objects.filter(user__username=obj.registrant.username)[0] + row['sex'] = accomodation_require.sex + except: + row['sex'] = 'Acco. Unspecified' + row['city'] = obj.city + row['organization'] = obj.organisation + row['occupation'] = obj.occupation + row['conference'] = obj.conference + row['sprint'] = obj.sprint + row['tutorial'] = obj.tutorial + try: + wifi_require = Wifi.objects.filter(user__username=obj.registrant.username)[0] + row['wifi'] = wifi_require.wifi + except: + row['wifi']='Wifi Unspecified' + rows.append(row) + return render_to_response(template_name, RequestContext(request, { + 'rows': rows})) + + + else: + raise Http404 diff --git a/project/templates/user/dump.html b/project/templates/user/dump.html new file mode 100644 index 0000000..6caa25d --- /dev/null +++ b/project/templates/user/dump.html @@ -0,0 +1,126 @@ + + + + +Dump + + + + + + + + + + +
+ +

Dump

+ + +
+

Table of Contents

+ +
+ +
+

1 Scipy Dump 12 Nov 6:34

+
+ + +
    +
  • +Gender - '–' in case not specified +
  • +
  • +C - Conference +
  • +
  • +S - Sprints +
  • +
  • +T - Tutorial +
  • +
  • +L - Bring a Laptop + + + ++ + + + +{% for row in rows %} + + +{% endfor %} +
    first namelast nameGenderCityOrganizationOccupationCSTL
    {{ row.first_name }}{{ row.last_name }}{{ row.sex }}{{ row.city }}{{ row.organization }}{{ row.occupation }}{{ row.conference }}{{ row.sprint }}{{ row.tutorial }}{{ row.wifi }}
    + +
  • +
+
+
+
+ + diff --git a/project/urls.py b/project/urls.py index 1a7c33d..90e6c87 100644 --- a/project/urls.py +++ b/project/urls.py @@ -9,8 +9,8 @@ from django.views.generic.simple import redirect_to admin.autodiscover() -PROGRAM_PATTERN_CORE = r'scipyin' -EVENT_PATTERN_CORE =r'2010' +PROGRAM_PATTERN_CORE = r'[a-z](?:[0-9a-z]|_[0-9a-z])*' +EVENT_PATTERN_CORE =r'(?:[0-9a-z]|_[0-9a-z])*' SCOPE_ARG_PATTERN = r'(?P%s/%s)' % ( PROGRAM_PATTERN_CORE, EVENT_PATTERN_CORE) @@ -71,7 +71,9 @@ urlpatterns += patterns('project.scipycon.user.views', 'edit_profile', name='scipycon_edit_profile'), url(r'^%s/get-usernames/$' % (SCOPE_ARG_PATTERN), 'get_usernames', name='scipycon_get_usernames'), - ) + url(r'^%s/get-user-dump/$' % (SCOPE_ARG_PATTERN), + 'get_user_dump', name='scipycon_get_usernames')) + # Proceedings urlpatterns += patterns('project.scipycon.proceedings.views', -- cgit From b5c66d1ac13f77e480fbdecf417a6dffeb89040e Mon Sep 17 00:00:00 2001 From: Amit Sethi Date: Thu, 18 Nov 2010 12:20:15 +0530 Subject: Changes to the template get-user-dump --- project/scipycon/user/views.py | 5 ++++- project/templates/user/dump.html | 13 +++---------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/project/scipycon/user/views.py b/project/scipycon/user/views.py index 5f3b1be..5822157 100644 --- a/project/scipycon/user/views.py +++ b/project/scipycon/user/views.py @@ -31,6 +31,9 @@ from project.scipycon.utils import set_message_cookie #User_dump Http404 Error from django.http import Http404 +#for user_dump creation +from project.scipycon.registration.models import Accommodation + @login_required def account(request, scope, template_name="user/account.html"): @@ -297,7 +300,7 @@ def get_user_dump(request, scope,template_name='user/dump.html'): accomodation_require = Accommodation.objects.filter(user__username=obj.registrant.username)[0] row['sex'] = accomodation_require.sex except: - row['sex'] = 'Acco. Unspecified' + row['sex'] = '-' row['city'] = obj.city row['organization'] = obj.organisation row['occupation'] = obj.occupation diff --git a/project/templates/user/dump.html b/project/templates/user/dump.html index 6caa25d..aba9dc9 100644 --- a/project/templates/user/dump.html +++ b/project/templates/user/dump.html @@ -4,7 +4,7 @@ -Dump +Scipy User Dump @@ -74,14 +74,7 @@ lang="en" xml:lang="en">

Dump

-
-

Table of Contents

- -
+

1 Scipy Dump 12 Nov 6:34

@@ -109,7 +102,7 @@ L - Bring a Laptop -first namelast nameGenderCityOrganizationOccupationCSTL +first namelast nameGenderCityOrganizationOccupationCSTL {% for row in rows %} {{ row.first_name }}{{ row.last_name }}{{ row.sex }}{{ row.city }}{{ row.organization }}{{ row.occupation }}{{ row.conference }}{{ row.sprint }}{{ row.tutorial }}{{ row.wifi }} -- cgit From 73b83c40d6e97dbef647dda0f78039a1d6bac4f4 Mon Sep 17 00:00:00 2001 From: Amit Sethi Date: Thu, 18 Nov 2010 12:25:58 +0530 Subject: some more template changes to get-user-dump --- project/templates/user/dump.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/project/templates/user/dump.html b/project/templates/user/dump.html index aba9dc9..061201b 100644 --- a/project/templates/user/dump.html +++ b/project/templates/user/dump.html @@ -71,13 +71,12 @@ lang="en" xml:lang="en">
-

Dump

+

User Dump

-

1 Scipy Dump 12 Nov 6:34

-- cgit From a5ac45a3fef34745e16a5cf2f03b894e28a9b541 Mon Sep 17 00:00:00 2001 From: Anoop Jacob Thomas Date: Thu, 18 Nov 2010 12:28:06 +0530 Subject: Added wire transfer details to fees page. --- project/templates/about/fees.html | 82 ++++++++++++++++++++++++++------------- 1 file changed, 55 insertions(+), 27 deletions(-) diff --git a/project/templates/about/fees.html b/project/templates/about/fees.html index 63d3fc2..3caf832 100644 --- a/project/templates/about/fees.html +++ b/project/templates/about/fees.html @@ -1,9 +1,9 @@ {% extends "base.html" %} {% block content %} -

Fees

+

Fees

-

Registration fees for outstation students and teachers.

+

Registration fees for outstation students and teachers.

@@ -12,7 +12,6 @@ - @@ -20,10 +19,10 @@
CategoryConferenceAccommodation
+ Tutorials(all 6 days)
StudentsRs. 500Rs. 300
-

Registration fees along with the accommodation charges can be paid either by electronic transfer (account no. - ) or by sending a Demand Draft for the amount of Rs.800 (for all 6 days).

+

Registration fees along with the accommodation charges can be paid either by electronic transfer (details) or by sending a Demand Draft for the amount of Rs.800 (for all 6 days).

-

Registration fees for in-station students and teachers.

+

Registration fees for in-station students and teachers.

@@ -36,15 +35,12 @@ -
StudentsRs. 500
TeachersRs. 500
+

Registration fees can be paid either by electronic transfer (details) or by sending a Demand Draft for the amount of Rs.500 (for all 6 days).

- -

Registration fees can be paid either by electronic transfer (account no. - ) or by sending a Demand Draft for the amount of Rs.500 (for all 6 days).

- -

Registration fees for corporates and others.

+

Registration fees for corporates and others.

@@ -52,7 +48,6 @@ - @@ -60,14 +55,14 @@
CategoryConferenceTutorials + sprints
CorporatesRs. 2000Rs. 1000 per day
-

Registration fees corresponding to the conference +( number of tutorial days * 1000) can be paid either by electronic transfer (account no. - ) or by sending a Demand Draft.

+

Registration fees corresponding to the conference +( number of tutorial days * 1000) can be paid either by electronic transfer (details) or by sending a Demand Draft.

    -
  • For example, if attending the conference and 2 of the tutorial days, the fees payable would be Rs. 2000 + (2 * Rs. 1000) = Rs. 4000.
    +
  • For example, if attending the conference and 2 of the tutorial days, the fees payable would be Rs. 2000 + (2 * Rs. 1000) = Rs. 4000.
-

Spot registration / late payment(on-spot)

+

Spot registration / late payment(on-spot)

@@ -78,45 +73,47 @@ -
StudentsRs. 750Included in conference fee
TeachersRs. 750Included in conference fee
CorporatesRs. 2500Rs. 1250 per day
-

Note:

- -

Accommodation

+

Note:

+

Accommodation

  • -Accommodation will be provided at a subsidized rate of Rs.50 for day for outstation teachers and students alone. - +Accommodation will be provided at a subsidized rate of Rs.50 per day for outstation teachers and students alone.
  • -Accommodation will be confirmed only upon receipt of the fee. +Accommodation fees has to remitted on or before 6th of December, 2010. If you are sending us a DD, it should reach us on or before 8th of December, 2010.
  • Accommodation will be confirmed at the venue only for participants with valid identity cards from their respective institutions.
-

Registration

+

Registration Fees

+ +

Demand Draft

  • -An email should be sent to info@scipy.in with the name of the participant, user id on the website, institution, and the transaction details(reference no. and account no.) +An email should be sent to info@scipy.in with the name of the +participant, user id on the website, institution, and the +transaction details(reference no. and account no.)
  • -Registered participants whose talks have been accepted will be exempt from the registration fees. +Registered participants whose talks have been accepted will be +exempt from the registration fees.
  • -The demand draft may be obtained in favour of Prof. Prabhu Ramachandran payable at Mumbai. +The demand draft may be obtained in favour of FOSSEE payable at +Mumbai.
  • The Demand Drafts may be sent to -
     Prof. Prabhu Ramachandran,
     Department of Aerospace Engineering,
    @@ -128,4 +125,35 @@ India 400 076
     
-{% endblock content %} +

Electronic transfer (NEFT)

+ +
    +
  • +An email should be sent to info@scipy.in with the name of the +participant, user id on the website, institution, and the +transaction details(reference no. and account no., account holder +name from which the transfer was made.) +
  • +
  • +Registered participants whose talks have been accepted will be +exempt from the registration fees. +
  • +
  • +The total amount for fees and accommodation (if applicable) may be +transfered to, +
    +Account Number - 2724101100988
    +Account Name - FOSSEE
    +IFSC code - CNRB0002724
    +Bank - Canara Bank
    +Branch - IIT Powai, Mumbai - 400076
    +
    + +
  • +
  • +While transferring the amount, ensure that the remark of transaction +contain the user-name on website and (or) Full name with email +address registered with us. + +
  • +
-- cgit From 1e2a6b85b2f7bd9e391c4b700fbf5b62cb93e13f Mon Sep 17 00:00:00 2001 From: Anoop Jacob Thomas Date: Thu, 18 Nov 2010 12:42:21 +0530 Subject: fixed an error in fee page. --- project/templates/about/fees.html | 1 + 1 file changed, 1 insertion(+) diff --git a/project/templates/about/fees.html b/project/templates/about/fees.html index 3caf832..ec751f5 100644 --- a/project/templates/about/fees.html +++ b/project/templates/about/fees.html @@ -157,3 +157,4 @@ address registered with us. +{% endblock content %} -- cgit