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

Proposed by Chris Johnston
Status: Merged
Merged at revision: 348
Proposed branch: lp:~cjohnston/loco-team-portal/618384
Merge into: lp:loco-team-portal
Diff against target: 180 lines (+130/-2)
3 files modified
loco_directory/teams/migrations/0012_add_team_microbloghashtag.py (+117/-0)
loco_directory/teams/models.py (+1/-0)
loco_directory/templates/teams/team_detail.html (+12/-2)
To merge this branch: bzr merge lp:~cjohnston/loco-team-portal/618384
Reviewer Review Type Date Requested Status
Adnane Belmadiaf Approve
Review via email: mp+44688@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Adnane Belmadiaf (daker) wrote :

I think you forgot to create the migration script for the "microbloghashtag" field.

review: Needs Fixing
Revision history for this message
Chris Johnston (cjohnston) wrote :

Forgot bzr add.. Ill try to get it today. Thanks!
On Dec 25, 2010 7:11 AM, "Adnane Belmadiaf" <email address hidden> wrote:
> Review: Needs Fixing
> I think you forgot to create the migration script for the
"microbloghashtag" field.
> --
>
https://code.launchpad.net/~chrisjohnston/loco-directory/618384/+merge/44688
> You are the owner of lp:~chrisjohnston/loco-directory/618384.

348. By Chris Johnston

Adds migrations script

Revision history for this message
Chris Johnston (cjohnston) wrote :

Migration script added.

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

Great!! It works.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file 'loco_directory/teams/migrations/0012_add_team_microbloghashtag.py'
--- loco_directory/teams/migrations/0012_add_team_microbloghashtag.py 1970-01-01 00:00:00 +0000
+++ loco_directory/teams/migrations/0012_add_team_microbloghashtag.py 2010-12-25 16:58:13 +0000
@@ -0,0 +1,117 @@
1
2from south.db import db
3from django.db import models
4from teams.models import *
5
6class Migration:
7
8 def forwards(self, orm):
9
10 # Adding field 'Team.microbloghashtag'
11 db.add_column('teams', 'microbloghashtag', orm['teams.team:microbloghashtag'])
12
13
14
15 def backwards(self, orm):
16
17 # Deleting field 'Team.microbloghashtag'
18 db.delete_column('teams', 'microbloghashtag')
19
20
21
22 models = {
23 'auth.group': {
24 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
25 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
26 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
27 },
28 'auth.permission': {
29 'Meta': {'unique_together': "(('content_type', 'codename'),)"},
30 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
31 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
32 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
33 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
34 },
35 'auth.user': {
36 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
37 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
38 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
39 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
40 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
41 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
42 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
43 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
44 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
45 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
46 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
47 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
48 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
49 },
50 'contenttypes.contenttype': {
51 'Meta': {'unique_together': "(('app_label', 'model'),)", 'db_table': "'django_content_type'"},
52 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
53 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
54 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
55 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
56 },
57 'teams.continent': {
58 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
59 'name': ('django.db.models.fields.TextField', [], {'max_length': '50'})
60 },
61 'teams.country': {
62 'continents': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['teams.Continent']", 'symmetrical': 'False'}),
63 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
64 'name': ('django.db.models.fields.TextField', [], {'max_length': '100'})
65 },
66 'teams.language': {
67 'code': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True'}),
68 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
69 'name': ('django.db.models.fields.CharField', [], {'max_length': '150', 'null': 'True'})
70 },
71 'teams.team': {
72 'Meta': {'db_table': "'teams'"},
73 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
74 'admin_profiles': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['userprofiles.UserProfile']", 'symmetrical': 'False'}),
75 'approved': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
76 'approved_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
77 'city': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}),
78 'contact_profiles': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['userprofiles.UserProfile']", 'symmetrical': 'False'}),
79 'countries': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['teams.Country']", 'symmetrical': 'False'}),
80 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'null': 'True', 'blank': 'True'}),
81 'expires_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
82 'flickr_id': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}),
83 'forum_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
84 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
85 'irc_chan': ('django.db.models.fields.CharField', [], {'max_length': '25', 'null': 'True', 'blank': 'True'}),
86 'languages': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['teams.Language']", 'symmetrical': 'False'}),
87 'lp_name': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True'}),
88 'microbloghashtag': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}),
89 'ml_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
90 'mugshot_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
91 'name': ('django.db.models.fields.CharField', [], {'max_length': '80', 'null': 'True'}),
92 'owner_profile': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'owner'", 'null': 'True', 'to': "orm['userprofiles.UserProfile']"}),
93 'picasa_id': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}),
94 'pixie_id': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}),
95 'provides_support': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
96 'spr': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}),
97 'web_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
98 'wiki_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'})
99 },
100 'userprofiles.userprofile': {
101 'aim': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
102 'blog': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
103 'facebook': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
104 'flickr': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
105 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
106 'identica': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
107 'irc': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
108 'picasa': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
109 'realname': ('django.db.models.fields.CharField', [], {'max_length': '150', 'blank': 'True'}),
110 'twitter': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
111 'tz': ('django.db.models.fields.CharField', [], {'default': "'UTC'", 'max_length': '32'}),
112 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}),
113 'xmpp': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'})
114 }
115 }
116
117 complete_apps = ['teams']
0118
=== modified file 'loco_directory/teams/models.py'
--- loco_directory/teams/models.py 2010-11-27 04:33:33 +0000
+++ loco_directory/teams/models.py 2010-12-25 16:58:13 +0000
@@ -97,6 +97,7 @@
97 help_text=_("Ex. toto@gmail.com, so your Picasa id is : toto"))97 help_text=_("Ex. toto@gmail.com, so your Picasa id is : toto"))
98 pixie_id = models.CharField(_("Pix.ie User ID"), max_length=20, null=True, blank=True,98 pixie_id = models.CharField(_("Pix.ie User ID"), max_length=20, null=True, blank=True,
99 help_text=_("Your Pix.ie Username"))99 help_text=_("Your Pix.ie Username"))
100 microbloghashtag = models.CharField(max_length=50, help_text=_('Hash Tag used for microbloggers to mention this team'), verbose_name=_('Microblogging Hash Tag'), null=True, blank=True)
100 active = models.BooleanField(_("Active Team"), default=True)101 active = models.BooleanField(_("Active Team"), default=True)
101 102
102 objects = TeamManager()103 objects = TeamManager()
103104
=== modified file 'loco_directory/templates/teams/team_detail.html'
--- loco_directory/templates/teams/team_detail.html 2010-12-02 08:06:16 +0000
+++ loco_directory/templates/teams/team_detail.html 2010-12-25 16:58:13 +0000
@@ -14,6 +14,7 @@
1414
1515
16{% block extrahead %}{{ block.super }}16{% block extrahead %}{{ block.super }}
17<link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}/css/twidenash.css" />
17{% if team.flickr_id or team.picasa_id or team.pixie_id %}18{% if team.flickr_id or team.picasa_id or team.pixie_id %}
18<script type="text/javascript" src="{{MEDIA_URL}}jquery/jquery.js"></script>19<script type="text/javascript" src="{{MEDIA_URL}}jquery/jquery.js"></script>
19<script type="text/javascript" src="{{MEDIA_URL}}js/jquery.lightbox-0.5.min.js"></script>20<script type="text/javascript" src="{{MEDIA_URL}}js/jquery.lightbox-0.5.min.js"></script>
@@ -21,7 +22,7 @@
21<script type="text/javascript"> 22<script type="text/javascript">
22$(function() {23$(function() {
23 var apiKey = '{{ flickr_api_key }}';24 var apiKey = '{{ flickr_api_key }}';
24 var perPage = '27';25 var perPage = '16';
25{% endif %}26{% endif %}
26{% if team.flickr_id %} 27{% if team.flickr_id %}
27 var flickr_userId = '{{ team.flickr_id }}';28 var flickr_userId = '{{ team.flickr_id }}';
@@ -227,8 +228,10 @@
227 <img id="locobranding" src="{{ team.mugshot_url }}" alt="" title="{{ team.name }}" />228 <img id="locobranding" src="{{ team.mugshot_url }}" alt="" title="{{ team.name }}" />
228</article>229</article>
229230
231<hr class="divide" />
232
230{% if team.flickr_id or team.picasa_id or team.pixie_id %} 233{% if team.flickr_id or team.picasa_id or team.pixie_id %}
231<article class="minor-content alone" style="width:95%;">234<article class="minor-content alone">
232 <h2>{% trans "Photos from" %} {{ team.name }}</h2>235 <h2>{% trans "Photos from" %} {{ team.name }}</h2>
233 <div style="width:100%;" id="flickr"> </div>236 <div style="width:100%;" id="flickr"> </div>
234 <div style="width:100%;" id="picasa"> </div> 237 <div style="width:100%;" id="picasa"> </div>
@@ -236,6 +239,13 @@
236</article>239</article>
237{% endif %}240{% endif %}
238241
242{% if team.microbloghashtag %}
243<article class="minor-content">
244 <h2>{% trans "Microblogging" %} #{{team.microbloghashtag}}</h2>
245 <p><script src="{{MEDIA_URL}}js/twidenash.js?{{team.microbloghashtag}}"></script></p>
246</article>
247{% endif %}
248
239{% endblock %}249{% endblock %}
240{% block general %}250{% block general %}
241{% if team.irc_chan %}251{% if team.irc_chan %}

Subscribers

People subscribed via source and target branches