Merge lp:~cjohnston/loco-team-portal/618384 into lp:loco-team-portal
- 618384
- Merge into 0.2
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 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Adnane Belmadiaf | Approve | ||
Review via email:
|
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
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:/
> You are the owner of lp:~chrisjohnston/loco-directory/618384.
- 348. By Chris Johnston
-
Adds migrations script
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Chris Johnston (cjohnston) wrote : | # |
Migration script added.
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
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
1 | === added file 'loco_directory/teams/migrations/0012_add_team_microbloghashtag.py' | |||
2 | --- loco_directory/teams/migrations/0012_add_team_microbloghashtag.py 1970-01-01 00:00:00 +0000 | |||
3 | +++ loco_directory/teams/migrations/0012_add_team_microbloghashtag.py 2010-12-25 16:58:13 +0000 | |||
4 | @@ -0,0 +1,117 @@ | |||
5 | 1 | |||
6 | 2 | from south.db import db | ||
7 | 3 | from django.db import models | ||
8 | 4 | from teams.models import * | ||
9 | 5 | |||
10 | 6 | class Migration: | ||
11 | 7 | |||
12 | 8 | def forwards(self, orm): | ||
13 | 9 | |||
14 | 10 | # Adding field 'Team.microbloghashtag' | ||
15 | 11 | db.add_column('teams', 'microbloghashtag', orm['teams.team:microbloghashtag']) | ||
16 | 12 | |||
17 | 13 | |||
18 | 14 | |||
19 | 15 | def backwards(self, orm): | ||
20 | 16 | |||
21 | 17 | # Deleting field 'Team.microbloghashtag' | ||
22 | 18 | db.delete_column('teams', 'microbloghashtag') | ||
23 | 19 | |||
24 | 20 | |||
25 | 21 | |||
26 | 22 | models = { | ||
27 | 23 | 'auth.group': { | ||
28 | 24 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
29 | 25 | 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), | ||
30 | 26 | 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) | ||
31 | 27 | }, | ||
32 | 28 | 'auth.permission': { | ||
33 | 29 | 'Meta': {'unique_together': "(('content_type', 'codename'),)"}, | ||
34 | 30 | 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
35 | 31 | 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), | ||
36 | 32 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
37 | 33 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) | ||
38 | 34 | }, | ||
39 | 35 | 'auth.user': { | ||
40 | 36 | 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), | ||
41 | 37 | 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), | ||
42 | 38 | 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), | ||
43 | 39 | 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), | ||
44 | 40 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
45 | 41 | 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}), | ||
46 | 42 | 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}), | ||
47 | 43 | 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}), | ||
48 | 44 | 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), | ||
49 | 45 | 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), | ||
50 | 46 | 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), | ||
51 | 47 | 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), | ||
52 | 48 | 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) | ||
53 | 49 | }, | ||
54 | 50 | 'contenttypes.contenttype': { | ||
55 | 51 | 'Meta': {'unique_together': "(('app_label', 'model'),)", 'db_table': "'django_content_type'"}, | ||
56 | 52 | 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
57 | 53 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
58 | 54 | 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
59 | 55 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) | ||
60 | 56 | }, | ||
61 | 57 | 'teams.continent': { | ||
62 | 58 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
63 | 59 | 'name': ('django.db.models.fields.TextField', [], {'max_length': '50'}) | ||
64 | 60 | }, | ||
65 | 61 | 'teams.country': { | ||
66 | 62 | 'continents': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['teams.Continent']", 'symmetrical': 'False'}), | ||
67 | 63 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
68 | 64 | 'name': ('django.db.models.fields.TextField', [], {'max_length': '100'}) | ||
69 | 65 | }, | ||
70 | 66 | 'teams.language': { | ||
71 | 67 | 'code': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True'}), | ||
72 | 68 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
73 | 69 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '150', 'null': 'True'}) | ||
74 | 70 | }, | ||
75 | 71 | 'teams.team': { | ||
76 | 72 | 'Meta': {'db_table': "'teams'"}, | ||
77 | 73 | 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}), | ||
78 | 74 | 'admin_profiles': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['userprofiles.UserProfile']", 'symmetrical': 'False'}), | ||
79 | 75 | 'approved': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}), | ||
80 | 76 | 'approved_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), | ||
81 | 77 | 'city': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}), | ||
82 | 78 | 'contact_profiles': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['userprofiles.UserProfile']", 'symmetrical': 'False'}), | ||
83 | 79 | 'countries': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['teams.Country']", 'symmetrical': 'False'}), | ||
84 | 80 | 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'null': 'True', 'blank': 'True'}), | ||
85 | 81 | 'expires_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), | ||
86 | 82 | 'flickr_id': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), | ||
87 | 83 | 'forum_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), | ||
88 | 84 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
89 | 85 | 'irc_chan': ('django.db.models.fields.CharField', [], {'max_length': '25', 'null': 'True', 'blank': 'True'}), | ||
90 | 86 | 'languages': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['teams.Language']", 'symmetrical': 'False'}), | ||
91 | 87 | 'lp_name': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True'}), | ||
92 | 88 | 'microbloghashtag': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}), | ||
93 | 89 | 'ml_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), | ||
94 | 90 | 'mugshot_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), | ||
95 | 91 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '80', 'null': 'True'}), | ||
96 | 92 | 'owner_profile': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'owner'", 'null': 'True', 'to': "orm['userprofiles.UserProfile']"}), | ||
97 | 93 | 'picasa_id': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), | ||
98 | 94 | 'pixie_id': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), | ||
99 | 95 | 'provides_support': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}), | ||
100 | 96 | 'spr': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}), | ||
101 | 97 | 'web_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), | ||
102 | 98 | 'wiki_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}) | ||
103 | 99 | }, | ||
104 | 100 | 'userprofiles.userprofile': { | ||
105 | 101 | 'aim': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}), | ||
106 | 102 | 'blog': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), | ||
107 | 103 | 'facebook': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}), | ||
108 | 104 | 'flickr': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}), | ||
109 | 105 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
110 | 106 | 'identica': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}), | ||
111 | 107 | 'irc': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}), | ||
112 | 108 | 'picasa': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}), | ||
113 | 109 | 'realname': ('django.db.models.fields.CharField', [], {'max_length': '150', 'blank': 'True'}), | ||
114 | 110 | 'twitter': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}), | ||
115 | 111 | 'tz': ('django.db.models.fields.CharField', [], {'default': "'UTC'", 'max_length': '32'}), | ||
116 | 112 | 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}), | ||
117 | 113 | 'xmpp': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}) | ||
118 | 114 | } | ||
119 | 115 | } | ||
120 | 116 | |||
121 | 117 | complete_apps = ['teams'] | ||
122 | 0 | 118 | ||
123 | === modified file 'loco_directory/teams/models.py' | |||
124 | --- loco_directory/teams/models.py 2010-11-27 04:33:33 +0000 | |||
125 | +++ loco_directory/teams/models.py 2010-12-25 16:58:13 +0000 | |||
126 | @@ -97,6 +97,7 @@ | |||
127 | 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")) |
128 | 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, |
129 | 99 | help_text=_("Your Pix.ie Username")) | 99 | help_text=_("Your Pix.ie Username")) |
130 | 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) | ||
131 | 100 | active = models.BooleanField(_("Active Team"), default=True) | 101 | active = models.BooleanField(_("Active Team"), default=True) |
132 | 101 | 102 | ||
133 | 102 | objects = TeamManager() | 103 | objects = TeamManager() |
134 | 103 | 104 | ||
135 | === modified file 'loco_directory/templates/teams/team_detail.html' | |||
136 | --- loco_directory/templates/teams/team_detail.html 2010-12-02 08:06:16 +0000 | |||
137 | +++ loco_directory/templates/teams/team_detail.html 2010-12-25 16:58:13 +0000 | |||
138 | @@ -14,6 +14,7 @@ | |||
139 | 14 | 14 | ||
140 | 15 | 15 | ||
141 | 16 | {% block extrahead %}{{ block.super }} | 16 | {% block extrahead %}{{ block.super }} |
142 | 17 | <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}/css/twidenash.css" /> | ||
143 | 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 %} |
144 | 18 | <script type="text/javascript" src="{{MEDIA_URL}}jquery/jquery.js"></script> | 19 | <script type="text/javascript" src="{{MEDIA_URL}}jquery/jquery.js"></script> |
145 | 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> |
146 | @@ -21,7 +22,7 @@ | |||
147 | 21 | <script type="text/javascript"> | 22 | <script type="text/javascript"> |
148 | 22 | $(function() { | 23 | $(function() { |
149 | 23 | var apiKey = '{{ flickr_api_key }}'; | 24 | var apiKey = '{{ flickr_api_key }}'; |
151 | 24 | var perPage = '27'; | 25 | var perPage = '16'; |
152 | 25 | {% endif %} | 26 | {% endif %} |
153 | 26 | {% if team.flickr_id %} | 27 | {% if team.flickr_id %} |
154 | 27 | var flickr_userId = '{{ team.flickr_id }}'; | 28 | var flickr_userId = '{{ team.flickr_id }}'; |
155 | @@ -227,8 +228,10 @@ | |||
156 | 227 | <img id="locobranding" src="{{ team.mugshot_url }}" alt="" title="{{ team.name }}" /> | 228 | <img id="locobranding" src="{{ team.mugshot_url }}" alt="" title="{{ team.name }}" /> |
157 | 228 | </article> | 229 | </article> |
158 | 229 | 230 | ||
159 | 231 | <hr class="divide" /> | ||
160 | 232 | |||
161 | 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 %} |
163 | 231 | <article class="minor-content alone" style="width:95%;"> | 234 | <article class="minor-content alone"> |
164 | 232 | <h2>{% trans "Photos from" %} {{ team.name }}</h2> | 235 | <h2>{% trans "Photos from" %} {{ team.name }}</h2> |
165 | 233 | <div style="width:100%;" id="flickr"> </div> | 236 | <div style="width:100%;" id="flickr"> </div> |
166 | 234 | <div style="width:100%;" id="picasa"> </div> | 237 | <div style="width:100%;" id="picasa"> </div> |
167 | @@ -236,6 +239,13 @@ | |||
168 | 236 | </article> | 239 | </article> |
169 | 237 | {% endif %} | 240 | {% endif %} |
170 | 238 | 241 | ||
171 | 242 | {% if team.microbloghashtag %} | ||
172 | 243 | <article class="minor-content"> | ||
173 | 244 | <h2>{% trans "Microblogging" %} #{{team.microbloghashtag}}</h2> | ||
174 | 245 | <p><script src="{{MEDIA_URL}}js/twidenash.js?{{team.microbloghashtag}}"></script></p> | ||
175 | 246 | </article> | ||
176 | 247 | {% endif %} | ||
177 | 248 | |||
178 | 239 | {% endblock %} | 249 | {% endblock %} |
179 | 240 | {% block general %} | 250 | {% block general %} |
180 | 241 | {% if team.irc_chan %} | 251 | {% if team.irc_chan %} |
I think you forgot to create the migration script for the "microbloghashtag" field.