Chris Johnston has proposed merging lp:~chrisjohnston/loco-directory/608289 
into lp:loco-directory.

Requested reviews:
  loco-directory-dev (loco-directory-dev)
Related bugs:
  Bug #608289 in LoCo Team Directory: "Add continent field to venue"
  https://bugs.launchpad.net/loco-directory/+bug/608289

For more details, see:
https://code.launchpad.net/~chrisjohnston/loco-directory/608289/+merge/68182
-- 
https://code.launchpad.net/~chrisjohnston/loco-directory/608289/+merge/68182
Your team loco-directory-dev is requested to review the proposed merge of 
lp:~chrisjohnston/loco-directory/608289 into lp:loco-directory.
=== modified file 'loco_directory/templates/venues/venue_update.html'
--- loco_directory/templates/venues/venue_update.html	2011-03-13 15:35:40 +0000
+++ loco_directory/templates/venues/venue_update.html	2011-07-17 18:16:31 +0000
@@ -13,7 +13,7 @@
     $(function(){
         $('#venue-map-selector').selectLocation({html_lng: $("#id_longitude"),
                                                  html_lat: $("#id_latitude"),
-                                                 html_addr: $("#id_country, #id_spr, #id_city, #id_address"),
+                                                 html_addr: $("#id_country, #id_spr, #id_city, #id_address, #id_continent"),
                                                  marker_icon: '{{ MEDIA_URL }}img/marker.png'});
 
         $('span[rel*=help]').colorTip({color:'orange'});

=== added file 'loco_directory/venues/migrations/0007_auto__add_field_venue_continent.py'
--- loco_directory/venues/migrations/0007_auto__add_field_venue_continent.py	1970-01-01 00:00:00 +0000
+++ loco_directory/venues/migrations/0007_auto__add_field_venue_continent.py	2011-07-17 18:16:31 +0000
@@ -0,0 +1,50 @@
+# 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 field 'Venue.continent'
+        db.add_column('venues_venue', 'continent', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['teams.Continent'], null=True), keep_default=False)
+    
+    
+    def backwards(self, orm):
+        
+        # Deleting field 'Venue.continent'
+        db.delete_column('venues_venue', 'continent_id')
+    
+    
+    models = {
+        'teams.continent': {
+            'Meta': {'object_name': 'Continent'},
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'name': ('django.db.models.fields.TextField', [], {'max_length': '50'})
+        },
+        'teams.country': {
+            'Meta': {'object_name': 'Country'},
+            'continents': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['teams.Continent']", 'symmetrical': 'False'}),
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'name': ('django.db.models.fields.TextField', [], {'max_length': '100'})
+        },
+        'venues.venue': {
+            'Meta': {'unique_together': "(('name', 'country', 'city'), ('longitude', 'latitude'))", 'object_name': 'Venue'},
+            'address': ('django.db.models.fields.CharField', [], {'max_length': '150', 'null': 'True', 'blank': 'True'}),
+            'city': ('django.db.models.fields.CharField', [], {'max_length': '150', 'null': 'True', 'blank': 'True'}),
+            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+            'continent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Continent']", 'null': 'True'}),
+            'country': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Country']", 'null': 'True'}),
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'latitude': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}),
+            'longitude': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}),
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
+            'spr': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}),
+            'tz': ('django.db.models.fields.CharField', [], {'default': "'UTC'", 'max_length': '32'}),
+            'venue_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'})
+        }
+    }
+    
+    complete_apps = ['venues']

=== modified file 'loco_directory/venues/models.py'
--- loco_directory/venues/models.py	2011-06-17 17:10:41 +0000
+++ loco_directory/venues/models.py	2011-07-17 18:16:31 +0000
@@ -2,8 +2,9 @@
 from django.utils.translation import ugettext_lazy as _
 from django.db.models import permalink
 
-from teams.models import Country
+from teams.models import Country, Continent
 from common.mixins import LocalTimeMixin
+
 import pytz
 
 
@@ -18,7 +19,8 @@
     a venue
     """
     name = models.CharField(help_text=_('Name of the Venue'), max_length=150)
-    country = models.ForeignKey(Country, null=True)
+    country = models.ForeignKey(Country, verbose_name=_('Country'), null=True)
+    continent = models.ForeignKey(Continent, verbose_name=_('Continent'), null=True)
     spr = models.CharField(_("State/Province/Region"), max_length=50, null=True, blank=True)
     city = models.CharField(help_text=_('City Name'), max_length=150, null=True, blank=True)
     address = models.CharField(help_text=_('Address with Street and Number'), max_length=150, null=True, blank=True)

_______________________________________________
Mailing list: https://launchpad.net/~loco-directory-dev
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~loco-directory-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to