created, modified changes + erang css + script to update meeting dates
This commit is contained in:
parent
30a6125e3b
commit
2db5425fe0
|
@ -10,6 +10,7 @@ from insidepages.models import ModuleTab, ModelExtra
|
||||||
from os.path import exists
|
from os.path import exists
|
||||||
from sorl.thumbnail import get_thumbnail
|
from sorl.thumbnail import get_thumbnail
|
||||||
from django.template import RequestContext
|
from django.template import RequestContext
|
||||||
|
import datetime
|
||||||
|
|
||||||
def splitSearch(string):
|
def splitSearch(string):
|
||||||
ret = []
|
ret = []
|
||||||
|
@ -36,6 +37,17 @@ class ItfModel(models.Model):
|
||||||
hasComments = True
|
hasComments = True
|
||||||
title_field = "title"
|
title_field = "title"
|
||||||
is_itf_model = True
|
is_itf_model = True
|
||||||
|
changed = models.DateTimeField(null=True, editable=False)
|
||||||
|
created = models.DateTimeField(null=True, editable=False)
|
||||||
|
|
||||||
|
def save(self, *args, **kwargs):
|
||||||
|
''' On save, update timestamps '''
|
||||||
|
if not self.id:
|
||||||
|
self.created = datetime.datetime.today()
|
||||||
|
self.changed = datetime.datetime.today()
|
||||||
|
if self.created == None:
|
||||||
|
self.created = self.changed
|
||||||
|
super(ItfModel, self).save(*args, **kwargs)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
abstract = True
|
abstract = True
|
||||||
|
|
|
@ -38,6 +38,7 @@ class Meeting(ItfModel):
|
||||||
slug = models.SlugField()
|
slug = models.SlugField()
|
||||||
fts_fields = ['title', 'intro']
|
fts_fields = ['title', 'intro']
|
||||||
|
|
||||||
|
|
||||||
def preview_dict(self):
|
def preview_dict(self):
|
||||||
return {
|
return {
|
||||||
'id': self.id,
|
'id': self.id,
|
||||||
|
|
|
@ -11,7 +11,7 @@ from django.core.mail import send_mail
|
||||||
|
|
||||||
class ContactForm(forms.Form):
|
class ContactForm(forms.Form):
|
||||||
name = forms.CharField(max_length=255)
|
name = forms.CharField(max_length=255)
|
||||||
email = forms.EmailField()
|
email = forms.CharField()
|
||||||
message = forms.CharField(widget=Textarea(attrs={'cols': 10, 'rows': 6}))
|
message = forms.CharField(widget=Textarea(attrs={'cols': 10, 'rows': 6}))
|
||||||
|
|
||||||
def save(self, fail_silently=False):
|
def save(self, fail_silently=False):
|
||||||
|
|
|
@ -29,7 +29,7 @@ HAYSTACK_WHOOSH_PATH = join(PROJECT_PATH, "../whoosh/itf_index")
|
||||||
CKEDITOR_MEDIA_PREFIX = "/static/ckeditor/"
|
CKEDITOR_MEDIA_PREFIX = "/static/ckeditor/"
|
||||||
CKEDITOR_UPLOAD_PATH = join(PROJECT_PATH, "static/upload/images/")
|
CKEDITOR_UPLOAD_PATH = join(PROJECT_PATH, "static/upload/images/")
|
||||||
|
|
||||||
AUTH_PROFILE_MODULE = "profiles.Person"
|
AUTH_PROFILE_MODULE = "itfprofiles.ItfProfile"
|
||||||
|
|
||||||
LOGIN_REDIRECT_URL = "/t/"
|
LOGIN_REDIRECT_URL = "/t/"
|
||||||
|
|
||||||
|
@ -41,12 +41,25 @@ INTERNAL_IPS = ('127.0.0.1',)
|
||||||
|
|
||||||
MANAGERS = ADMINS
|
MANAGERS = ADMINS
|
||||||
|
|
||||||
DATABASE_ENGINE = 'mysql' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
|
#DATABASE_ENGINE = 'mysql' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
|
||||||
DATABASE_NAME = 'theatre' # Or path to database file if using sqlite3.
|
#DATABASE_NAME = 'theatre' # Or path to database file if using sqlite3.
|
||||||
DATABASE_USER = 'root' # Not used with sqlite3.
|
#DATABASE_USER = 'root' # Not used with sqlite3.
|
||||||
DATABASE_PASSWORD = '' # Not used with sqlite3.
|
#DATABASE_PASSWORD = '' # Not used with sqlite3.
|
||||||
DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3.
|
#DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3.
|
||||||
DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
|
#DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
|
||||||
|
|
||||||
|
DATABASES = {
|
||||||
|
'default': {
|
||||||
|
'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
|
||||||
|
'NAME': 'theatre', # Or path to database file if using sqlite3.
|
||||||
|
'USER': 'root', # Not used with sqlite3.
|
||||||
|
'PASSWORD': '', # Not used with sqlite3.
|
||||||
|
'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
|
||||||
|
'PORT': '', # Set to empty string for default. Not used with sqlite3.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
TWITTER_ID = "sachin_rt"
|
TWITTER_ID = "sachin_rt"
|
||||||
|
|
||||||
|
@ -160,6 +173,7 @@ INSTALLED_APPS = (
|
||||||
'scriptbank',
|
'scriptbank',
|
||||||
'bestpractices',
|
'bestpractices',
|
||||||
'emailer',
|
'emailer',
|
||||||
|
'itfprofiles',
|
||||||
'pages',
|
'pages',
|
||||||
'tagging',
|
'tagging',
|
||||||
'app',
|
'app',
|
||||||
|
|
|
@ -174,7 +174,12 @@ cursor: pointer;
|
||||||
font-family:"Century Gothic", Arial, Helvetica, sans-serif;
|
font-family:"Century Gothic", Arial, Helvetica, sans-serif;
|
||||||
font-size:12px;
|
font-size:12px;
|
||||||
padding-right:12px;
|
padding-right:12px;
|
||||||
float:right;
|
float:right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.authorBio {
|
||||||
|
padding-left:8px;
|
||||||
|
padding-right:8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.articleImg {
|
.articleImg {
|
||||||
|
|
|
@ -17,4 +17,14 @@ def clean_participants():
|
||||||
d.delete()
|
d.delete()
|
||||||
print u
|
print u
|
||||||
|
|
||||||
|
def add_meeting_dates():
|
||||||
|
for m in Meeting.objects.all():
|
||||||
|
dates = MeetingDay.objects.filter(meeting=m)
|
||||||
|
if len(dates) > 0:
|
||||||
|
date = dates[0].meeting_date
|
||||||
|
if not m.created:
|
||||||
|
m.created = date
|
||||||
|
if not m.changed:
|
||||||
|
m.changed = date
|
||||||
|
m.save()
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@ import os
|
||||||
from os.path import join
|
from os.path import join
|
||||||
from django.views.generic.simple import direct_to_template
|
from django.views.generic.simple import direct_to_template
|
||||||
# from django.auth.views import login, logout, register,
|
# from django.auth.views import login, logout, register,
|
||||||
|
from itfprofiles.forms import ItfRegistrationForm
|
||||||
|
|
||||||
# Uncomment the next two lines to enable the admin:
|
# Uncomment the next two lines to enable the admin:
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
|
@ -31,6 +32,7 @@ urlpatterns = patterns('',
|
||||||
(r'jsdoc/', 'api.views.jsdoc'),
|
(r'jsdoc/', 'api.views.jsdoc'),
|
||||||
(r'site.json', 'app.views.site_json'),
|
(r'site.json', 'app.views.site_json'),
|
||||||
(r'^itf/', include('festival.urls')),
|
(r'^itf/', include('festival.urls')),
|
||||||
|
# (r'^accounts/register/', 'registration.views.register', {'form_class': ItfRegistrationForm }),
|
||||||
(r'^accounts/', include('registration.urls')),
|
(r'^accounts/', include('registration.urls')),
|
||||||
(r'^admin/', include(admin.site.urls)),
|
(r'^admin/', include(admin.site.urls)),
|
||||||
('^getLanguages', 'itfcore.views.getLanguages'),
|
('^getLanguages', 'itfcore.views.getLanguages'),
|
||||||
|
|
|
@ -4,9 +4,10 @@
|
||||||
-e bzr+http://firefogg.org/dev/python-firefogg/#egg=python-firefogg
|
-e bzr+http://firefogg.org/dev/python-firefogg/#egg=python-firefogg
|
||||||
-e bzr+http://firefogg.org/dev/django_firefogg/#egg=django_firefogg
|
-e bzr+http://firefogg.org/dev/django_firefogg/#egg=django_firefogg
|
||||||
-e hg+https://django-ajax-filtered-fields.googlecode.com/hg/#egg=django-ajax-filtered-fields
|
-e hg+https://django-ajax-filtered-fields.googlecode.com/hg/#egg=django-ajax-filtered-fields
|
||||||
|
-e git://github.com/bit/django-extensions.git#egg=django_extensions
|
||||||
sorl-thumbnail
|
sorl-thumbnail
|
||||||
django-tagging
|
django-tagging
|
||||||
django-extensions
|
#django-extensions
|
||||||
django-debug-toolbar
|
django-debug-toolbar
|
||||||
South
|
South
|
||||||
django-ckeditor
|
django-ckeditor
|
||||||
|
|
Loading…
Reference in New Issue
Block a user