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 | + |
6 | +from south.db import db |
7 | +from django.db import models |
8 | +from teams.models import * |
9 | + |
10 | +class Migration: |
11 | + |
12 | + def forwards(self, orm): |
13 | + |
14 | + # Adding field 'Team.microbloghashtag' |
15 | + db.add_column('teams', 'microbloghashtag', orm['teams.team:microbloghashtag']) |
16 | + |
17 | + |
18 | + |
19 | + def backwards(self, orm): |
20 | + |
21 | + # Deleting field 'Team.microbloghashtag' |
22 | + db.delete_column('teams', 'microbloghashtag') |
23 | + |
24 | + |
25 | + |
26 | + models = { |
27 | + 'auth.group': { |
28 | + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
29 | + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), |
30 | + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) |
31 | + }, |
32 | + 'auth.permission': { |
33 | + 'Meta': {'unique_together': "(('content_type', 'codename'),)"}, |
34 | + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), |
35 | + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), |
36 | + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
37 | + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) |
38 | + }, |
39 | + 'auth.user': { |
40 | + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), |
41 | + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), |
42 | + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), |
43 | + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), |
44 | + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
45 | + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}), |
46 | + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}), |
47 | + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}), |
48 | + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), |
49 | + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), |
50 | + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), |
51 | + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), |
52 | + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) |
53 | + }, |
54 | + 'contenttypes.contenttype': { |
55 | + 'Meta': {'unique_together': "(('app_label', 'model'),)", 'db_table': "'django_content_type'"}, |
56 | + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), |
57 | + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
58 | + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), |
59 | + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) |
60 | + }, |
61 | + 'teams.continent': { |
62 | + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
63 | + 'name': ('django.db.models.fields.TextField', [], {'max_length': '50'}) |
64 | + }, |
65 | + 'teams.country': { |
66 | + 'continents': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['teams.Continent']", 'symmetrical': 'False'}), |
67 | + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
68 | + 'name': ('django.db.models.fields.TextField', [], {'max_length': '100'}) |
69 | + }, |
70 | + 'teams.language': { |
71 | + 'code': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True'}), |
72 | + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
73 | + 'name': ('django.db.models.fields.CharField', [], {'max_length': '150', 'null': 'True'}) |
74 | + }, |
75 | + 'teams.team': { |
76 | + 'Meta': {'db_table': "'teams'"}, |
77 | + 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}), |
78 | + 'admin_profiles': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['userprofiles.UserProfile']", 'symmetrical': 'False'}), |
79 | + 'approved': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}), |
80 | + 'approved_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), |
81 | + 'city': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}), |
82 | + 'contact_profiles': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['userprofiles.UserProfile']", 'symmetrical': 'False'}), |
83 | + 'countries': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['teams.Country']", 'symmetrical': 'False'}), |
84 | + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'null': 'True', 'blank': 'True'}), |
85 | + 'expires_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), |
86 | + 'flickr_id': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), |
87 | + 'forum_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), |
88 | + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
89 | + 'irc_chan': ('django.db.models.fields.CharField', [], {'max_length': '25', 'null': 'True', 'blank': 'True'}), |
90 | + 'languages': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['teams.Language']", 'symmetrical': 'False'}), |
91 | + 'lp_name': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True'}), |
92 | + 'microbloghashtag': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}), |
93 | + 'ml_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), |
94 | + 'mugshot_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), |
95 | + 'name': ('django.db.models.fields.CharField', [], {'max_length': '80', 'null': 'True'}), |
96 | + 'owner_profile': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'owner'", 'null': 'True', 'to': "orm['userprofiles.UserProfile']"}), |
97 | + 'picasa_id': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), |
98 | + 'pixie_id': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), |
99 | + 'provides_support': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}), |
100 | + 'spr': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}), |
101 | + 'web_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), |
102 | + 'wiki_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}) |
103 | + }, |
104 | + 'userprofiles.userprofile': { |
105 | + 'aim': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}), |
106 | + 'blog': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), |
107 | + 'facebook': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}), |
108 | + 'flickr': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}), |
109 | + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
110 | + 'identica': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}), |
111 | + 'irc': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}), |
112 | + 'picasa': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}), |
113 | + 'realname': ('django.db.models.fields.CharField', [], {'max_length': '150', 'blank': 'True'}), |
114 | + 'twitter': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}), |
115 | + 'tz': ('django.db.models.fields.CharField', [], {'default': "'UTC'", 'max_length': '32'}), |
116 | + 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}), |
117 | + 'xmpp': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}) |
118 | + } |
119 | + } |
120 | + |
121 | + complete_apps = ['teams'] |
122 | |
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 | help_text=_("Ex. toto@gmail.com, so your Picasa id is : toto")) |
128 | pixie_id = models.CharField(_("Pix.ie User ID"), max_length=20, null=True, blank=True, |
129 | help_text=_("Your Pix.ie Username")) |
130 | + 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 | active = models.BooleanField(_("Active Team"), default=True) |
132 | |
133 | objects = TeamManager() |
134 | |
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 | |
140 | |
141 | {% block extrahead %}{{ block.super }} |
142 | +<link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}/css/twidenash.css" /> |
143 | {% if team.flickr_id or team.picasa_id or team.pixie_id %} |
144 | <script type="text/javascript" src="{{MEDIA_URL}}jquery/jquery.js"></script> |
145 | <script type="text/javascript" src="{{MEDIA_URL}}js/jquery.lightbox-0.5.min.js"></script> |
146 | @@ -21,7 +22,7 @@ |
147 | <script type="text/javascript"> |
148 | $(function() { |
149 | var apiKey = '{{ flickr_api_key }}'; |
150 | - var perPage = '27'; |
151 | + var perPage = '16'; |
152 | {% endif %} |
153 | {% if team.flickr_id %} |
154 | var flickr_userId = '{{ team.flickr_id }}'; |
155 | @@ -227,8 +228,10 @@ |
156 | <img id="locobranding" src="{{ team.mugshot_url }}" alt="" title="{{ team.name }}" /> |
157 | </article> |
158 | |
159 | +<hr class="divide" /> |
160 | + |
161 | {% if team.flickr_id or team.picasa_id or team.pixie_id %} |
162 | -<article class="minor-content alone" style="width:95%;"> |
163 | +<article class="minor-content alone"> |
164 | <h2>{% trans "Photos from" %} {{ team.name }}</h2> |
165 | <div style="width:100%;" id="flickr"> </div> |
166 | <div style="width:100%;" id="picasa"> </div> |
167 | @@ -236,6 +239,13 @@ |
168 | </article> |
169 | {% endif %} |
170 | |
171 | +{% if team.microbloghashtag %} |
172 | +<article class="minor-content"> |
173 | + <h2>{% trans "Microblogging" %} #{{team.microbloghashtag}}</h2> |
174 | + <p><script src="{{MEDIA_URL}}js/twidenash.js?{{team.microbloghashtag}}"></script></p> |
175 | +</article> |
176 | +{% endif %} |
177 | + |
178 | {% endblock %} |
179 | {% block general %} |
180 | {% if team.irc_chan %} |
I think you forgot to create the migration script for the "microbloghashtag" field.