Permalink
Browse files

Merge branch 'master' into transport

Conflicts:
	molly/osm/management/commands/generate_markers.py
	molly/providers/apps/maps/naptan.py
	requirements/core.txt
  • Loading branch information...
2 parents 68acf05 + 342a4a0 commit 118e057b80135bd85ed64e27ed0484f99463fe85 @cnorthwood cnorthwood committed Nov 22, 2010
Showing with 1,474 additions and 102 deletions.
  1. +1 −1 demos/molly_oxford/{ → apache}/molly_oxford.wsgi
  2. +39 −0 demos/molly_oxford/apps/river_status/migrations/0001_initial.py
  3. 0 demos/molly_oxford/apps/river_status/migrations/__init__.py
  4. +0 −1 demos/molly_oxford/providers/apps/river_status/__init__.py
  5. +8 −6 demos/molly_oxford/settings.py
  6. +0 −1 molly/apps/desktop/views.py
  7. +66 −0 molly/apps/external_media/migrations/0001_initial.py
  8. 0 molly/apps/external_media/migrations/__init__.py
  9. +0 −1 molly/apps/external_media/models.py
  10. +0 −1 molly/apps/external_media/templatetags/molly_external_media_tags.py
  11. +51 −0 molly/apps/feature_vote/migrations/0001_initial.py
  12. 0 molly/apps/feature_vote/migrations/__init__.py
  13. +0 −12 molly/apps/feeds/importers/daily_info.py
  14. +0 −1 molly/apps/feeds/importers/generic_rss.py
  15. +234 −0 molly/apps/feeds/migrations/0001_initial.py
  16. 0 molly/apps/feeds/migrations/__init__.py
  17. +3 −1 molly/apps/feeds/templates/rss/news/index.html
  18. +8 −8 molly/apps/feeds/templates/rss/news/item_detail.html
  19. +2 −1 molly/apps/feeds/templates/rss/news/item_list.html
  20. +56 −0 molly/apps/home/migrations/0001_initial.py
  21. 0 molly/apps/home/migrations/__init__.py
  22. +0 −1 molly/apps/home/templatetags/portal_misc.py
  23. +178 −0 molly/apps/places/migrations/0001_initial.py
  24. 0 molly/apps/places/migrations/__init__.py
  25. +124 −0 molly/apps/podcasts/migrations/0001_initial.py
  26. 0 molly/apps/podcasts/migrations/__init__.py
  27. +1 −0 molly/apps/podcasts/models.py
  28. +0 −8 molly/apps/podcasts/templates/podcasts/index.html
  29. +0 −6 molly/apps/sakai/views.py
  30. +35 −0 molly/apps/url_shortener/migrations/0001_initial.py
  31. 0 molly/apps/url_shortener/migrations/__init__.py
  32. +0 −1 molly/apps/url_shortener/views.py
  33. +73 −0 molly/apps/weather/migrations/0001_initial.py
  34. 0 molly/apps/weather/migrations/__init__.py
  35. +43 −0 molly/apps/webcams/migrations/0001_initial.py
  36. 0 molly/apps/webcams/migrations/__init__.py
  37. +214 −0 molly/auth/migrations/0001_initial.py
  38. 0 molly/auth/migrations/__init__.py
  39. +0 −3 molly/auth/views.py
  40. +53 −0 molly/batch_processing/migrations/0001_initial.py
  41. 0 molly/batch_processing/migrations/__init__.py
  42. +43 −0 molly/geolocation/migrations/0001_initial.py
  43. 0 molly/geolocation/migrations/__init__.py
  44. +0 −2 molly/geolocation/utils.py
  45. +1 −2 molly/logger/config.py
  46. +0 −4 molly/logger/server.py
  47. +7 −15 molly/osm/management/commands/generate_markers.py
  48. +142 −0 molly/osm/migrations/0001_initial.py
  49. 0 molly/osm/migrations/__init__.py
  50. +0 −1 molly/providers/apps/contact/mit.py
  51. +0 −1 molly/providers/apps/geolocation/cloudmade.py
  52. +9 −3 molly/providers/apps/maps/naptan.py
  53. +0 −3 molly/providers/apps/maps/postcodes.py
  54. +0 −1 molly/providers/apps/podcasts/opml.py
  55. +1 −7 molly/providers/apps/search/application_search.py
  56. +0 −3 molly/stats/logger.py
  57. +57 −0 molly/stats/migrations/0001_initial.py
  58. 0 molly/stats/migrations/__init__.py
  59. +15 −1 molly/utils/context_processors.py
  60. +4 −2 requirements/core.txt
  61. +4 −3 scripts/deploy-molly.sh
  62. +1 −0 scripts/update-molly.sh
  63. +1 −1 setup.py
@@ -3,7 +3,7 @@
import os, os.path
import sys
-os.environ['DJANGO_SETTINGS_MODULE'] = 'demos.molly_oxford.settings'
+os.environ['DJANGO_SETTINGS_MODULE'] = 'molly_oxford.settings'
sys.path.insert(0, os.path.abspath(os.path.join(
os.path.dirname(__file__), '..', '..',
)))
@@ -0,0 +1,39 @@
+# encoding: utf-8
+import datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+
+ # Adding model 'FlagStatus'
+ db.create_table('river_status_flagstatus', (
+ ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('order', self.gf('django.db.models.fields.IntegerField')()),
+ ('name', self.gf('django.db.models.fields.TextField')()),
+ ('status', self.gf('django.db.models.fields.CharField')(max_length=6)),
+ ('updated', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
+ ))
+ db.send_create_signal('river_status', ['FlagStatus'])
+
+
+ def backwards(self, orm):
+
+ # Deleting model 'FlagStatus'
+ db.delete_table('river_status_flagstatus')
+
+
+ models = {
+ 'river_status.flagstatus': {
+ 'Meta': {'object_name': 'FlagStatus'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.TextField', [], {}),
+ 'order': ('django.db.models.fields.IntegerField', [], {}),
+ 'status': ('django.db.models.fields.CharField', [], {'max_length': '6'}),
+ 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
+ }
+ }
+
+ complete_apps = ['river_status']
@@ -26,7 +26,6 @@ def import_data(self, metadata, output):
flag_status = FlagStatus(order=i)
flag_status.name = name
- print tr[1][0].attrib['alt']
flag_status.status = status
@@ -74,8 +74,9 @@
TEMPLATE_CONTEXT_PROCESSORS = (
'django.core.context_processors.auth',
'django.core.context_processors.debug',
+ 'django.core.context_processors.request',
# 'django.core.context_processors.i18n',
- 'django.core.context_processors.media',
+ 'molly.utils.context_processors.ssl_media',
# 'django.contrib.messages.context_processors.messages',
'molly.wurfl.context_processors.wurfl_device',
'molly.wurfl.context_processors.device_specific_media',
@@ -169,11 +170,11 @@
Provider('molly.providers.apps.podcasts.OPMLPodcastsProvider',
url = 'http://rss.oucs.ox.ac.uk/metafeeds/podcastingnewsfeeds.opml',
),
- Provider('molly.providers.apps.podcasts.RSSPodcastsProvider',
- podcasts = [
- ('top-downloads', 'http://rss.oucs.ox.ac.uk/oxitems/topdownloads.xml'),
- ],
- ),
+ #Provider('molly.providers.apps.podcasts.RSSPodcastsProvider',
+ # podcasts = [
+ # ('top-downloads', 'http://rss.oucs.ox.ac.uk/oxitems/topdownloads.xml'),
+ # ],
+ #),
]
),
@@ -334,6 +335,7 @@
'staticfiles',
'compress',
+ 'south',
# 'debug_toolbar',
)
@@ -33,7 +33,6 @@ def _cache(self, f, key, args=None, kwargs=None, timeout=None):
key = '.'.join(['molly', self.conf.local_name, key])
value = cache.get(key)
if value is None:
- print "Fetching"
value = f(*(args or ()), **(kwargs or {}))
cache.set(key, value, timeout)
return value
@@ -0,0 +1,66 @@
+# encoding: utf-8
+import datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+
+ # Adding model 'ExternalImage'
+ db.create_table('external_media_externalimage', (
+ ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('url', self.gf('django.db.models.fields.URLField')(max_length=200)),
+ ('etag', self.gf('django.db.models.fields.TextField')(null=True)),
+ ('last_modified', self.gf('django.db.models.fields.TextField')(null=True)),
+ ('last_updated', self.gf('django.db.models.fields.DateTimeField')()),
+ ('width', self.gf('django.db.models.fields.PositiveIntegerField')(null=True)),
+ ('height', self.gf('django.db.models.fields.PositiveIntegerField')(null=True)),
+ ))
+ db.send_create_signal('external_media', ['ExternalImage'])
+
+ # Adding model 'ExternalImageSized'
+ db.create_table('external_media_externalimagesized', (
+ ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('external_image', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['external_media.ExternalImage'])),
+ ('width', self.gf('django.db.models.fields.PositiveIntegerField')()),
+ ('height', self.gf('django.db.models.fields.PositiveIntegerField')()),
+ ('slug', self.gf('django.db.models.fields.SlugField')(max_length=50, db_index=True)),
+ ('content_type', self.gf('django.db.models.fields.TextField')()),
+ ))
+ db.send_create_signal('external_media', ['ExternalImageSized'])
+
+
+ def backwards(self, orm):
+
+ # Deleting model 'ExternalImage'
+ db.delete_table('external_media_externalimage')
+
+ # Deleting model 'ExternalImageSized'
+ db.delete_table('external_media_externalimagesized')
+
+
+ models = {
+ 'external_media.externalimage': {
+ 'Meta': {'object_name': 'ExternalImage'},
+ 'etag': ('django.db.models.fields.TextField', [], {'null': 'True'}),
+ 'height': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'last_modified': ('django.db.models.fields.TextField', [], {'null': 'True'}),
+ 'last_updated': ('django.db.models.fields.DateTimeField', [], {}),
+ 'url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
+ 'width': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'})
+ },
+ 'external_media.externalimagesized': {
+ 'Meta': {'object_name': 'ExternalImageSized'},
+ 'content_type': ('django.db.models.fields.TextField', [], {}),
+ 'external_image': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['external_media.ExternalImage']"}),
+ 'height': ('django.db.models.fields.PositiveIntegerField', [], {}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}),
+ 'width': ('django.db.models.fields.PositiveIntegerField', [], {})
+ }
+ }
+
+ complete_apps = ['external_media']
@@ -75,7 +75,6 @@ def save(self, force_insert=False, force_update=False, *args, **kwargs):
resized.save(self.get_filename(), format='jpeg')
self.content_type = 'image/jpeg'
except IOError, e:
- print "ERR", e
try:
resized.convert('RGB').save(self.get_filename(), format='jpeg')
self.content_type = 'image/jpeg'
@@ -35,7 +35,6 @@ def render(self, context):
width = float('inf')
url, width = self.url.resolve(context), min(width, context['device'].max_image_width)
- print "width", width, (self.max_width or 9999), context['device'].max_image_width
eis = resize_external_image(url, width)
@@ -0,0 +1,51 @@
+# encoding: utf-8
+import datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+
+ # Adding model 'Feature'
+ db.create_table('feature_vote_feature', (
+ ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('user_name', self.gf('django.db.models.fields.TextField')()),
+ ('user_email', self.gf('django.db.models.fields.EmailField')(max_length=75)),
+ ('title', self.gf('django.db.models.fields.TextField')()),
+ ('description', self.gf('django.db.models.fields.TextField')()),
+ ('up_vote', self.gf('django.db.models.fields.IntegerField')(default=0)),
+ ('down_vote', self.gf('django.db.models.fields.IntegerField')(default=0)),
+ ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
+ ('last_commented', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)),
+ ('is_public', self.gf('django.db.models.fields.BooleanField')(default=False)),
+ ('is_removed', self.gf('django.db.models.fields.BooleanField')(default=False)),
+ ))
+ db.send_create_signal('feature_vote', ['Feature'])
+
+
+ def backwards(self, orm):
+
+ # Deleting model 'Feature'
+ db.delete_table('feature_vote_feature')
+
+
+ models = {
+ 'feature_vote.feature': {
+ 'Meta': {'ordering': "('-last_commented', '-created')", 'object_name': 'Feature'},
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {}),
+ 'down_vote': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_removed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'last_commented': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'title': ('django.db.models.fields.TextField', [], {}),
+ 'up_vote': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'user_email': ('django.db.models.fields.EmailField', [], {'max_length': '75'}),
+ 'user_name': ('django.db.models.fields.TextField', [], {})
+ }
+ }
+
+ complete_apps = ['feature_vote']
@@ -33,7 +33,6 @@ def range(start, stop=None, step=1):
start, stop = step-step, start
while start < stop:
- print start
yield start
start += step
@@ -70,7 +69,6 @@ def update(self, feed):
r'(\d\d [A-Za-z]{3} \d{4}( - \d\d [A-Za-z]{3} \d{4})?: )?(.+)',
x_item.find('title').text,
)
- print match.group(3)
series.title = match.group(3)
except AttributeError:
series.title = x_item.find('title').text
@@ -87,8 +85,6 @@ def update(self, feed):
dt_start = parse_date(x_item.find(ns_xcal['dtstart']).text)
dt_end = parse_date(x_item.find(ns_xcal['dtend']).text)
- #print feed_data, '\n\n\n'
-
for i, dt in enumerate(x_item.findall(ns_dc['date'])):
item, created = Item.objects.get_or_create(
@@ -177,12 +173,6 @@ def handle_noargs(self, **options):
for x_item in feed_data.entries:
guid, last_modified = x_item.id, datetime(*x_item.date_parsed[:7])
- #print x_item.link
- #if x_item.link != 'http://www.dailyinfo.co.uk/events.php?colname=Lectures%2C+Seminars+and+Conferences&period=7&eventday=10&eventmonth=12&eventyear=2009#70276':
- # continue
-
- print x_item.items()
-
for i in items:
if i.guid == guid:
item = i
@@ -224,7 +214,6 @@ def handle_noargs(self, **options):
try:
item.location_point = Point(float(x_item.geo_long),
float(x_item.geo_lat))
- print x_item.geo_lat, x_item.geo_long
except AttributeError, ValueError:
for link in venue_et.findall('.//a'):
match = Command.GOOGLE_MAPS_LINK_RE.match(link.attrib.get('href', ''))
@@ -245,7 +234,6 @@ def handle_noargs(self, **options):
break
item.location_point = self.postcode_to_point(match.groups(0)[0])
- print item.location_point
break
location_data[venue_id] = item.location_name, item.location_address, item.location_point
@@ -20,7 +20,6 @@ def update(self, feed):
feed_data = feedparser.parse(feed.rss_url)
try:
feed.last_modified = struct_to_datetime(feed_data.feed.updated_parsed)
- print "RRRRRRRRRRRRRRRRRRRRRRRRRRRR"
except:
feed.last_modified = parse_date(feed_data.headers.get('last-modified', datetime.now().strftime("%a, %d %b %Y %H:%M:%S +0000")))
Oops, something went wrong.

0 comments on commit 118e057

Please sign in to comment.