Merge lp:~cjohnston/loco-team-portal/608289 into lp:loco-team-portal

Proposed by Chris Johnston
Status: Merged
Approved by: Adnane Belmadiaf
Approved revision: 457
Merged at revision: 460
Proposed branch: lp:~cjohnston/loco-team-portal/608289
Merge into: lp:loco-team-portal
Diff against target: 92 lines (+55/-3)
3 files modified
loco_directory/templates/venues/venue_update.html (+1/-1)
loco_directory/venues/migrations/0007_auto__add_field_venue_continent.py (+50/-0)
loco_directory/venues/models.py (+4/-2)
To merge this branch: bzr merge lp:~cjohnston/loco-team-portal/608289
Reviewer Review Type Date Requested Status
Adnane Belmadiaf Approve
Review via email: mp+68182@code.launchpad.net

Commit message

Adds continent field to venue.

To post a comment you must log in.
Revision history for this message
Adnane Belmadiaf (daker) wrote :
review: Needs Fixing
Revision history for this message
Adnane Belmadiaf (daker) wrote :

Works Great.

review: Approve
Revision history for this message
Tarmac WebDev (tarmac-webdev) wrote :

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

Revision history for this message
Adnane Belmadiaf (daker) wrote :

Approve.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'loco_directory/templates/venues/venue_update.html'
2--- loco_directory/templates/venues/venue_update.html 2011-03-13 15:35:40 +0000
3+++ loco_directory/templates/venues/venue_update.html 2011-07-17 21:13:32 +0000
4@@ -13,7 +13,7 @@
5 $(function(){
6 $('#venue-map-selector').selectLocation({html_lng: $("#id_longitude"),
7 html_lat: $("#id_latitude"),
8- html_addr: $("#id_country, #id_spr, #id_city, #id_address"),
9+ html_addr: $("#id_country, #id_spr, #id_city, #id_address, #id_continent"),
10 marker_icon: '{{ MEDIA_URL }}img/marker.png'});
11
12 $('span[rel*=help]').colorTip({color:'orange'});
13
14=== added file 'loco_directory/venues/migrations/0007_auto__add_field_venue_continent.py'
15--- loco_directory/venues/migrations/0007_auto__add_field_venue_continent.py 1970-01-01 00:00:00 +0000
16+++ loco_directory/venues/migrations/0007_auto__add_field_venue_continent.py 2011-07-17 21:13:32 +0000
17@@ -0,0 +1,50 @@
18+# encoding: utf-8
19+import datetime
20+from south.db import db
21+from south.v2 import SchemaMigration
22+from django.db import models
23+
24+class Migration(SchemaMigration):
25+
26+ def forwards(self, orm):
27+
28+ # Adding field 'Venue.continent'
29+ db.add_column('venues_venue', 'continent', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['teams.Continent'], null=True), keep_default=False)
30+
31+
32+ def backwards(self, orm):
33+
34+ # Deleting field 'Venue.continent'
35+ db.delete_column('venues_venue', 'continent_id')
36+
37+
38+ models = {
39+ 'teams.continent': {
40+ 'Meta': {'object_name': 'Continent'},
41+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
42+ 'name': ('django.db.models.fields.TextField', [], {'max_length': '50'})
43+ },
44+ 'teams.country': {
45+ 'Meta': {'object_name': 'Country'},
46+ 'continents': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['teams.Continent']", 'symmetrical': 'False'}),
47+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
48+ 'name': ('django.db.models.fields.TextField', [], {'max_length': '100'})
49+ },
50+ 'venues.venue': {
51+ 'Meta': {'unique_together': "(('name', 'country', 'city'), ('longitude', 'latitude'))", 'object_name': 'Venue'},
52+ 'address': ('django.db.models.fields.CharField', [], {'max_length': '150', 'null': 'True', 'blank': 'True'}),
53+ 'city': ('django.db.models.fields.CharField', [], {'max_length': '150', 'null': 'True', 'blank': 'True'}),
54+ 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
55+ 'continent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Continent']", 'null': 'True'}),
56+ 'country': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Country']", 'null': 'True'}),
57+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
58+ 'latitude': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}),
59+ 'longitude': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}),
60+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
61+ 'spr': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}),
62+ 'tz': ('django.db.models.fields.CharField', [], {'default': "'UTC'", 'max_length': '32'}),
63+ 'venue_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'})
64+ }
65+ }
66+
67+ complete_apps = ['venues']
68
69=== modified file 'loco_directory/venues/models.py'
70--- loco_directory/venues/models.py 2011-07-04 01:09:15 +0000
71+++ loco_directory/venues/models.py 2011-07-17 21:13:32 +0000
72@@ -2,8 +2,9 @@
73 from django.utils.translation import ugettext_lazy as _
74 from django.db.models import permalink
75
76-from teams.models import Country
77+from teams.models import Country, Continent
78 from common.mixins import LocalTimeMixin
79+
80 import pytz
81
82
83@@ -18,7 +19,8 @@
84 a venue
85 """
86 name = models.CharField(help_text=_('Name of the Venue'), max_length=150)
87- country = models.ForeignKey(Country, null=True)
88+ continent = models.ForeignKey(Continent, verbose_name=_('Continent'), null=True)
89+ country = models.ForeignKey(Country, verbose_name=_('Country'), null=True)
90 spr = models.CharField(_("State/Province/Region"), max_length=50, null=True, blank=True)
91 city = models.CharField(help_text=_('City Name'), max_length=150, null=True, blank=True)
92 address = models.CharField(help_text=_('Address with Street and Number'), max_length=150, null=True, blank=True)

Subscribers

People subscribed via source and target branches