erang order + added summary field
This commit is contained in:
parent
27707e9841
commit
323aa6a686
|
@ -2,6 +2,7 @@ from django.db import models
|
||||||
|
|
||||||
class Issue(models.Model):
|
class Issue(models.Model):
|
||||||
title = models.CharField(max_length=255)
|
title = models.CharField(max_length=255)
|
||||||
|
summary = models.TextField(blank=True, null=True)
|
||||||
date = models.DateField()
|
date = models.DateField()
|
||||||
html = models.TextField(blank=True)
|
html = models.TextField(blank=True)
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ from django.http import HttpResponse
|
||||||
from django.core.mail import send_mail
|
from django.core.mail import send_mail
|
||||||
|
|
||||||
def home(request):
|
def home(request):
|
||||||
all_issues = Issue.objects.all().order_by('date')
|
all_issues = Issue.objects.all().order_by('-date')
|
||||||
if request.GET.has_key('issue_id'):
|
if request.GET.has_key('issue_id'):
|
||||||
issue_id = request.GET.get('issue_id')
|
issue_id = request.GET.get('issue_id')
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -1,6 +1,20 @@
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
from models import *
|
from models import *
|
||||||
|
|
||||||
|
class OccupationAdmin(admin.ModelAdmin):
|
||||||
|
model = Occupation
|
||||||
|
|
||||||
|
class RelationAdmin(admin.ModelAdmin):
|
||||||
|
model = Relation
|
||||||
|
|
||||||
|
class LanguageAdmin(admin.ModelAdmin):
|
||||||
|
model = Language
|
||||||
|
|
||||||
|
admin.site.register(Occupation, OccupationAdmin)
|
||||||
|
admin.site.register(Relation, RelationAdmin)
|
||||||
|
admin.site.register(Language, LanguageAdmin)
|
||||||
|
|
||||||
'''
|
'''
|
||||||
#class NicknameInline(admin.StackedInline):
|
#class NicknameInline(admin.StackedInline):
|
||||||
# model = Nickname
|
# model = Nickname
|
||||||
|
|
|
@ -15,7 +15,7 @@ class Person(models.Model):
|
||||||
#Basic Info
|
#Basic Info
|
||||||
user = models.ForeignKey(User, blank=True, null=True, db_index=True)
|
user = models.ForeignKey(User, blank=True, null=True, db_index=True)
|
||||||
first_name = models.CharField(max_length=255)
|
first_name = models.CharField(max_length=255)
|
||||||
last_name = models.CharField(max_length=255, blank=True)
|
last_name = models.CharField(max_length=255)
|
||||||
email = models.EmailField(blank=True, null=True, unique=True, db_index=True)
|
email = models.EmailField(blank=True, null=True, unique=True, db_index=True)
|
||||||
tel_no = models.CharField(max_length=100, blank=True)
|
tel_no = models.CharField(max_length=100, blank=True)
|
||||||
about = models.TextField(blank=True, null=True)
|
about = models.TextField(blank=True, null=True)
|
||||||
|
@ -101,7 +101,7 @@ class PersonPerson(models.Model):
|
||||||
person1 = models.ForeignKey(Person, related_name='PersonFrom', db_index=True)
|
person1 = models.ForeignKey(Person, related_name='PersonFrom', db_index=True)
|
||||||
person2 = models.ForeignKey(Person, related_name='PersonTo', db_index=True)
|
person2 = models.ForeignKey(Person, related_name='PersonTo', db_index=True)
|
||||||
relation = models.ForeignKey("Relation")
|
relation = models.ForeignKey("Relation")
|
||||||
approved = models.BooleanField(default=False)
|
disapproved = models.BooleanField(default=False)
|
||||||
|
|
||||||
class Relation(models.Model):
|
class Relation(models.Model):
|
||||||
name = models.CharField(max_length=255, db_index=True)
|
name = models.CharField(max_length=255, db_index=True)
|
||||||
|
@ -121,7 +121,7 @@ class Training(models.Model):
|
||||||
person = models.ForeignKey("Person")
|
person = models.ForeignKey("Person")
|
||||||
area = models.CharField(max_length=255) # Choices?
|
area = models.CharField(max_length=255) # Choices?
|
||||||
with_whom = models.CharField(max_length=255) # Is this a foreign key to person, or group, or just text field like now?
|
with_whom = models.CharField(max_length=255) # Is this a foreign key to person, or group, or just text field like now?
|
||||||
location = models.ForeignKey("Location")
|
where = models.ForeignKey("TheatreGroup")
|
||||||
from_when = models.DateField(blank=True, null=True)
|
from_when = models.DateField(blank=True, null=True)
|
||||||
until_when = models.DateField(blank=True, null=True)
|
until_when = models.DateField(blank=True, null=True)
|
||||||
|
|
||||||
|
@ -151,7 +151,7 @@ class PersonProduction(models.Model):
|
||||||
original_cast = models.BooleanField(default=False)
|
original_cast = models.BooleanField(default=False)
|
||||||
|
|
||||||
class TheatreGroup(models.Model):
|
class TheatreGroup(models.Model):
|
||||||
name = models.CharField(max_length=255, db_index=True)
|
name = models.CharField(max_length=255, db_index=True) # name + location is unique
|
||||||
city = models.CharField(max_length=255)
|
city = models.CharField(max_length=255)
|
||||||
location = models.ForeignKey(Location, blank=True, null=True)
|
location = models.ForeignKey(Location, blank=True, null=True)
|
||||||
tel = models.IntegerField(blank=True, null=True)
|
tel = models.IntegerField(blank=True, null=True)
|
||||||
|
|
|
@ -4,6 +4,20 @@ from django.contrib import admin
|
||||||
from settings import LANGUAGES
|
from settings import LANGUAGES
|
||||||
import simplejson
|
import simplejson
|
||||||
import sys
|
import sys
|
||||||
|
from forms import PersonForm, ConnectionFormset, ProductionFormset
|
||||||
|
|
||||||
|
def edit_profile(request):
|
||||||
|
u = request.user
|
||||||
|
#Do stuff like check if user has a person instance and then instantiate form with that person instance.
|
||||||
|
personForm = PersonForm()
|
||||||
|
formsets = [ConnectionFormset(), ProductionFormset()]
|
||||||
|
return render_to_response("itfcore/edit_profile.html", {
|
||||||
|
'personForm': personForm,
|
||||||
|
'formsets': formsets
|
||||||
|
})
|
||||||
|
|
||||||
|
def profile(request, name):
|
||||||
|
return HttpResponse(name)
|
||||||
|
|
||||||
def index(request):
|
def index(request):
|
||||||
return HttpResponse("India Theatre Forum - Coming Soon")
|
return HttpResponse("India Theatre Forum - Coming Soon")
|
||||||
|
@ -39,8 +53,10 @@ def resources(request):
|
||||||
def erang(request):
|
def erang(request):
|
||||||
return render_to_response("x0erang.html")
|
return render_to_response("x0erang.html")
|
||||||
|
|
||||||
|
'''
|
||||||
def profile(request):
|
def profile(request):
|
||||||
return render_to_response("x0profile.html")
|
return render_to_response("x0profile.html")
|
||||||
|
'''
|
||||||
|
|
||||||
def googlehosted(request):
|
def googlehosted(request):
|
||||||
return HttpResponse('googlefffffffffc014cb4')
|
return HttpResponse('googlefffffffffc014cb4')
|
||||||
|
|
|
@ -33,6 +33,9 @@ urlpatterns = patterns('',
|
||||||
('^getLanguages', 'itfcore.views.getLanguages'),
|
('^getLanguages', 'itfcore.views.getLanguages'),
|
||||||
# Uncomment the admin/doc line below and add 'django.contrib.admindocs'
|
# Uncomment the admin/doc line below and add 'django.contrib.admindocs'
|
||||||
# to INSTALLED_APPS to enable admin documentation:
|
# to INSTALLED_APPS to enable admin documentation:
|
||||||
|
#Core views:
|
||||||
|
# (r'profile', 'itfcore.views.edit_profile'),
|
||||||
|
(r'i/', include('itfcore.urls')),
|
||||||
(r'^admin/doc/', include('django.contrib.admindocs.urls')),
|
(r'^admin/doc/', include('django.contrib.admindocs.urls')),
|
||||||
(r'^mockup/', 'itfcore.views.mockup'),
|
(r'^mockup/', 'itfcore.views.mockup'),
|
||||||
(r'x0news/', 'itfcore.views.allnews'),
|
(r'x0news/', 'itfcore.views.allnews'),
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
-e svn+http://code.djangoproject.com/svn/django/branches/releases/1.1.X/#egg=django
|
-e svn+http://code.djangoproject.com/svn/django/branches/releases/1.2.X/#egg=django
|
||||||
-e bzr+http://code.0xdb.org/python-oxdjango/#egg=python-oxdjango
|
-e bzr+http://code.0xdb.org/python-oxdjango/#egg=python-oxdjango
|
||||||
-e svn+http://django-multilingual.googlecode.com/svn/trunk/#egg=multilingual
|
-e svn+http://django-multilingual.googlecode.com/svn/trunk/#egg=multilingual
|
||||||
-e bzr+http://firefogg.org/dev/python-firefogg/#egg=python-firefogg
|
-e bzr+http://firefogg.org/dev/python-firefogg/#egg=python-firefogg
|
||||||
|
|
Loading…
Reference in New Issue
Block a user