Merge lp:~mhall119/ubuntu-accomplishments-web/add-south into lp:ubuntu-accomplishments-web
- add-south
- Merge into trunk
Proposed by
Michael Hall
Status: | Merged |
---|---|
Merged at revision: | 228 |
Proposed branch: | lp:~mhall119/ubuntu-accomplishments-web/add-south |
Merge into: | lp:ubuntu-accomplishments-web |
Prerequisite: | lp:~mhall119/ubuntu-accomplishments-web/local-settings |
Diff against target: |
432 lines (+373/-1) 6 files modified
README.md (+2/-1) common/migrations/0001_initial.py (+273/-0) gallery/migrations/0001_initial.py (+20/-0) pip.txt (+1/-0) settings.py (+1/-0) users/migrations/0001_initial.py (+76/-0) |
To merge this branch: | bzr merge lp:~mhall119/ubuntu-accomplishments-web/add-south |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
ubuntu-accomplishments-web-editor-drivers | Pending | ||
Review via email: mp+129994@code.launchpad.net |
Commit message
Description of the change
Adds dependency on South for database migration. Includes initial migration scripts for the existing models.
To post a comment you must log in.
Revision history for this message
Janos Gyerik (janos-gyerik) wrote : | # |
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'README.md' |
2 | --- README.md 2012-10-16 21:48:22 +0000 |
3 | +++ README.md 2012-10-16 21:48:22 +0000 |
4 | @@ -14,11 +14,12 @@ |
5 | |
6 | 3. Install required python modules |
7 | |
8 | - sudo apt-get install python-django-openid-auth |
9 | + sudo apt-get install python-django-openid-auth python-django-south |
10 | |
11 | 4. Create database (sqlite3), and admin account |
12 | |
13 | ./manage.py syncdb --noinput |
14 | + ./manage.py migrate --noinput |
15 | |
16 | 5. Import accomplishments into Django's database |
17 | |
18 | |
19 | === added directory 'common/migrations' |
20 | === added file 'common/migrations/0001_initial.py' |
21 | --- common/migrations/0001_initial.py 1970-01-01 00:00:00 +0000 |
22 | +++ common/migrations/0001_initial.py 2012-10-16 21:48:22 +0000 |
23 | @@ -0,0 +1,273 @@ |
24 | +# -*- coding: utf-8 -*- |
25 | +import datetime |
26 | +from south.db import db |
27 | +from south.v2 import SchemaMigration |
28 | +from django.db import models |
29 | + |
30 | + |
31 | +class Migration(SchemaMigration): |
32 | + |
33 | + def forwards(self, orm): |
34 | + # Adding model 'Lang' |
35 | + db.create_table('common_lang', ( |
36 | + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), |
37 | + ('locale_name', self.gf('django.db.models.fields.SlugField')(max_length=7)), |
38 | + ('language_code', self.gf('django.db.models.fields.SlugField')(max_length=7)), |
39 | + ('display_name', self.gf('django.db.models.fields.CharField')(max_length=50)), |
40 | + )) |
41 | + db.send_create_signal('common', ['Lang']) |
42 | + |
43 | + # Adding unique constraint on 'Lang', fields ['locale_name', 'language_code'] |
44 | + db.create_unique('common_lang', ['locale_name', 'language_code']) |
45 | + |
46 | + # Adding model 'Collection' |
47 | + db.create_table('common_collection', ( |
48 | + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), |
49 | + ('descriptor', self.gf('django.db.models.fields.CharField')(unique=True, max_length=256)), |
50 | + ('label', self.gf('django.db.models.fields.CharField')(max_length=128)), |
51 | + )) |
52 | + db.send_create_signal('common', ['Collection']) |
53 | + |
54 | + # Adding model 'Category' |
55 | + db.create_table('common_category', ( |
56 | + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), |
57 | + ('collection', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['common.Collection'])), |
58 | + ('label', self.gf('django.db.models.fields.CharField')(max_length=50)), |
59 | + )) |
60 | + db.send_create_signal('common', ['Category']) |
61 | + |
62 | + # Adding model 'Icon' |
63 | + db.create_table('common_icon', ( |
64 | + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), |
65 | + ('collection', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['common.Collection'])), |
66 | + ('filename', self.gf('django.db.models.fields.CharField')(max_length=100)), |
67 | + )) |
68 | + db.send_create_signal('common', ['Icon']) |
69 | + |
70 | + # Adding model 'Accomplishment' |
71 | + db.create_table('common_accomplishment', ( |
72 | + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), |
73 | + ('descriptor', self.gf('django.db.models.fields.CharField')(unique=True, max_length=512)), |
74 | + ('collection', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['common.Collection'])), |
75 | + ('accomid', self.gf('django.db.models.fields.CharField')(unique=True, max_length=100)), |
76 | + ('needs_information', self.gf('django.db.models.fields.TextField')()), |
77 | + ('icon', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['common.Icon'])), |
78 | + ('needs_signing', self.gf('django.db.models.fields.BooleanField')(default=False)), |
79 | + )) |
80 | + db.send_create_signal('common', ['Accomplishment']) |
81 | + |
82 | + # Adding unique constraint on 'Accomplishment', fields ['collection', 'descriptor'] |
83 | + db.create_unique('common_accomplishment', ['collection_id', 'descriptor']) |
84 | + |
85 | + # Adding M2M table for field categories on 'Accomplishment' |
86 | + db.create_table('common_accomplishment_categories', ( |
87 | + ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), |
88 | + ('accomplishment', models.ForeignKey(orm['common.accomplishment'], null=False)), |
89 | + ('category', models.ForeignKey(orm['common.category'], null=False)) |
90 | + )) |
91 | + db.create_unique('common_accomplishment_categories', ['accomplishment_id', 'category_id']) |
92 | + |
93 | + # Adding M2M table for field depends on 'Accomplishment' |
94 | + db.create_table('common_accomplishment_depends', ( |
95 | + ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), |
96 | + ('from_accomplishment', models.ForeignKey(orm['common.accomplishment'], null=False)), |
97 | + ('to_accomplishment', models.ForeignKey(orm['common.accomplishment'], null=False)) |
98 | + )) |
99 | + db.create_unique('common_accomplishment_depends', ['from_accomplishment_id', 'to_accomplishment_id']) |
100 | + |
101 | + # Adding model 'AccomplishmentTranslation' |
102 | + db.create_table('common_accomplishmenttranslation', ( |
103 | + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), |
104 | + ('accomplishment', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['common.Accomplishment'])), |
105 | + ('lang', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['common.Lang'])), |
106 | + ('title', self.gf('django.db.models.fields.CharField')(max_length=128)), |
107 | + ('description', self.gf('django.db.models.fields.CharField')(max_length=512)), |
108 | + ('summary', self.gf('django.db.models.fields.TextField')()), |
109 | + ('steps', self.gf('django.db.models.fields.TextField')()), |
110 | + ('links', self.gf('django.db.models.fields.TextField')(default='', blank=True)), |
111 | + ('helpres', self.gf('django.db.models.fields.TextField')(default='', blank=True)), |
112 | + ('tips', self.gf('django.db.models.fields.TextField')(default='', blank=True)), |
113 | + ('pitfalls', self.gf('django.db.models.fields.TextField')(default='', blank=True)), |
114 | + )) |
115 | + db.send_create_signal('common', ['AccomplishmentTranslation']) |
116 | + |
117 | + # Adding unique constraint on 'AccomplishmentTranslation', fields ['accomplishment', 'lang'] |
118 | + db.create_unique('common_accomplishmenttranslation', ['accomplishment_id', 'lang_id']) |
119 | + |
120 | + # Adding model 'AccomplishmentProposal' |
121 | + db.create_table('common_accomplishmentproposal', ( |
122 | + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), |
123 | + ('descriptor', self.gf('django.db.models.fields.CharField')(unique=True, max_length=512)), |
124 | + ('collection', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['common.Collection'])), |
125 | + ('accomid', self.gf('django.db.models.fields.CharField')(unique=True, max_length=100)), |
126 | + ('needs_information', self.gf('django.db.models.fields.TextField')()), |
127 | + ('icon', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['common.Icon'])), |
128 | + ('needs_signing', self.gf('django.db.models.fields.BooleanField')(default=False)), |
129 | + ('accomplishment', self.gf('django.db.models.fields.related.ForeignKey')(related_name='proposals', to=orm['common.Accomplishment'])), |
130 | + ('user', self.gf('django.db.models.fields.CharField')(max_length=50)), |
131 | + ('rejected_date', self.gf('django.db.models.fields.DateField')(null=True)), |
132 | + )) |
133 | + db.send_create_signal('common', ['AccomplishmentProposal']) |
134 | + |
135 | + # Adding unique constraint on 'AccomplishmentProposal', fields ['collection', 'descriptor'] |
136 | + db.create_unique('common_accomplishmentproposal', ['collection_id', 'descriptor']) |
137 | + |
138 | + # Adding M2M table for field categories on 'AccomplishmentProposal' |
139 | + db.create_table('common_accomplishmentproposal_categories', ( |
140 | + ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), |
141 | + ('accomplishmentproposal', models.ForeignKey(orm['common.accomplishmentproposal'], null=False)), |
142 | + ('category', models.ForeignKey(orm['common.category'], null=False)) |
143 | + )) |
144 | + db.create_unique('common_accomplishmentproposal_categories', ['accomplishmentproposal_id', 'category_id']) |
145 | + |
146 | + # Adding M2M table for field depends on 'AccomplishmentProposal' |
147 | + db.create_table('common_accomplishmentproposal_depends', ( |
148 | + ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), |
149 | + ('accomplishmentproposal', models.ForeignKey(orm['common.accomplishmentproposal'], null=False)), |
150 | + ('accomplishment', models.ForeignKey(orm['common.accomplishment'], null=False)) |
151 | + )) |
152 | + db.create_unique('common_accomplishmentproposal_depends', ['accomplishmentproposal_id', 'accomplishment_id']) |
153 | + |
154 | + # Adding model 'TrophyCache' |
155 | + db.create_table('common_trophycache', ( |
156 | + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), |
157 | + ('share_dirname', self.gf('django.db.models.fields.CharField')(max_length=256)), |
158 | + ('accomplishment', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['common.Accomplishment'])), |
159 | + ('date_accomplished', self.gf('django.db.models.fields.DateTimeField')()), |
160 | + )) |
161 | + db.send_create_signal('common', ['TrophyCache']) |
162 | + |
163 | + # Adding unique constraint on 'TrophyCache', fields ['share_dirname', 'accomplishment'] |
164 | + db.create_unique('common_trophycache', ['share_dirname', 'accomplishment_id']) |
165 | + |
166 | + |
167 | + def backwards(self, orm): |
168 | + # Removing unique constraint on 'TrophyCache', fields ['share_dirname', 'accomplishment'] |
169 | + db.delete_unique('common_trophycache', ['share_dirname', 'accomplishment_id']) |
170 | + |
171 | + # Removing unique constraint on 'AccomplishmentProposal', fields ['collection', 'descriptor'] |
172 | + db.delete_unique('common_accomplishmentproposal', ['collection_id', 'descriptor']) |
173 | + |
174 | + # Removing unique constraint on 'AccomplishmentTranslation', fields ['accomplishment', 'lang'] |
175 | + db.delete_unique('common_accomplishmenttranslation', ['accomplishment_id', 'lang_id']) |
176 | + |
177 | + # Removing unique constraint on 'Accomplishment', fields ['collection', 'descriptor'] |
178 | + db.delete_unique('common_accomplishment', ['collection_id', 'descriptor']) |
179 | + |
180 | + # Removing unique constraint on 'Lang', fields ['locale_name', 'language_code'] |
181 | + db.delete_unique('common_lang', ['locale_name', 'language_code']) |
182 | + |
183 | + # Deleting model 'Lang' |
184 | + db.delete_table('common_lang') |
185 | + |
186 | + # Deleting model 'Collection' |
187 | + db.delete_table('common_collection') |
188 | + |
189 | + # Deleting model 'Category' |
190 | + db.delete_table('common_category') |
191 | + |
192 | + # Deleting model 'Icon' |
193 | + db.delete_table('common_icon') |
194 | + |
195 | + # Deleting model 'Accomplishment' |
196 | + db.delete_table('common_accomplishment') |
197 | + |
198 | + # Removing M2M table for field categories on 'Accomplishment' |
199 | + db.delete_table('common_accomplishment_categories') |
200 | + |
201 | + # Removing M2M table for field depends on 'Accomplishment' |
202 | + db.delete_table('common_accomplishment_depends') |
203 | + |
204 | + # Deleting model 'AccomplishmentTranslation' |
205 | + db.delete_table('common_accomplishmenttranslation') |
206 | + |
207 | + # Deleting model 'AccomplishmentProposal' |
208 | + db.delete_table('common_accomplishmentproposal') |
209 | + |
210 | + # Removing M2M table for field categories on 'AccomplishmentProposal' |
211 | + db.delete_table('common_accomplishmentproposal_categories') |
212 | + |
213 | + # Removing M2M table for field depends on 'AccomplishmentProposal' |
214 | + db.delete_table('common_accomplishmentproposal_depends') |
215 | + |
216 | + # Deleting model 'TrophyCache' |
217 | + db.delete_table('common_trophycache') |
218 | + |
219 | + |
220 | + models = { |
221 | + 'common.accomplishment': { |
222 | + 'Meta': {'unique_together': "(('collection', 'descriptor'),)", 'object_name': 'Accomplishment'}, |
223 | + 'accomid': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), |
224 | + 'categories': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['common.Category']", 'null': 'True', 'blank': 'True'}), |
225 | + 'collection': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['common.Collection']"}), |
226 | + 'depends': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['common.Accomplishment']", 'null': 'True', 'blank': 'True'}), |
227 | + 'descriptor': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '512'}), |
228 | + 'icon': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['common.Icon']"}), |
229 | + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
230 | + 'needs_information': ('django.db.models.fields.TextField', [], {}), |
231 | + 'needs_signing': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) |
232 | + }, |
233 | + 'common.accomplishmentproposal': { |
234 | + 'Meta': {'unique_together': "(('collection', 'descriptor'),)", 'object_name': 'AccomplishmentProposal'}, |
235 | + 'accomid': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), |
236 | + 'accomplishment': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'proposals'", 'to': "orm['common.Accomplishment']"}), |
237 | + 'categories': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['common.Category']", 'null': 'True', 'blank': 'True'}), |
238 | + 'collection': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['common.Collection']"}), |
239 | + 'depends': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['common.Accomplishment']", 'null': 'True', 'blank': 'True'}), |
240 | + 'descriptor': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '512'}), |
241 | + 'icon': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['common.Icon']"}), |
242 | + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
243 | + 'needs_information': ('django.db.models.fields.TextField', [], {}), |
244 | + 'needs_signing': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), |
245 | + 'rejected_date': ('django.db.models.fields.DateField', [], {'null': 'True'}), |
246 | + 'user': ('django.db.models.fields.CharField', [], {'max_length': '50'}) |
247 | + }, |
248 | + 'common.accomplishmenttranslation': { |
249 | + 'Meta': {'unique_together': "(('accomplishment', 'lang'),)", 'object_name': 'AccomplishmentTranslation'}, |
250 | + 'accomplishment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['common.Accomplishment']"}), |
251 | + 'description': ('django.db.models.fields.CharField', [], {'max_length': '512'}), |
252 | + 'helpres': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), |
253 | + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
254 | + 'lang': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['common.Lang']"}), |
255 | + 'links': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), |
256 | + 'pitfalls': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), |
257 | + 'steps': ('django.db.models.fields.TextField', [], {}), |
258 | + 'summary': ('django.db.models.fields.TextField', [], {}), |
259 | + 'tips': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), |
260 | + 'title': ('django.db.models.fields.CharField', [], {'max_length': '128'}) |
261 | + }, |
262 | + 'common.category': { |
263 | + 'Meta': {'ordering': "('label',)", 'object_name': 'Category'}, |
264 | + 'collection': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['common.Collection']"}), |
265 | + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
266 | + 'label': ('django.db.models.fields.CharField', [], {'max_length': '50'}) |
267 | + }, |
268 | + 'common.collection': { |
269 | + 'Meta': {'object_name': 'Collection'}, |
270 | + 'descriptor': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '256'}), |
271 | + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
272 | + 'label': ('django.db.models.fields.CharField', [], {'max_length': '128'}) |
273 | + }, |
274 | + 'common.icon': { |
275 | + 'Meta': {'object_name': 'Icon'}, |
276 | + 'collection': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['common.Collection']"}), |
277 | + 'filename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), |
278 | + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) |
279 | + }, |
280 | + 'common.lang': { |
281 | + 'Meta': {'ordering': "('locale_name',)", 'unique_together': "(('locale_name', 'language_code'),)", 'object_name': 'Lang'}, |
282 | + 'display_name': ('django.db.models.fields.CharField', [], {'max_length': '50'}), |
283 | + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
284 | + 'language_code': ('django.db.models.fields.SlugField', [], {'max_length': '7'}), |
285 | + 'locale_name': ('django.db.models.fields.SlugField', [], {'max_length': '7'}) |
286 | + }, |
287 | + 'common.trophycache': { |
288 | + 'Meta': {'unique_together': "(('share_dirname', 'accomplishment'),)", 'object_name': 'TrophyCache'}, |
289 | + 'accomplishment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['common.Accomplishment']"}), |
290 | + 'date_accomplished': ('django.db.models.fields.DateTimeField', [], {}), |
291 | + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
292 | + 'share_dirname': ('django.db.models.fields.CharField', [], {'max_length': '256'}) |
293 | + } |
294 | + } |
295 | + |
296 | + complete_apps = ['common'] |
297 | \ No newline at end of file |
298 | |
299 | === added file 'common/migrations/__init__.py' |
300 | === added directory 'gallery/migrations' |
301 | === added file 'gallery/migrations/0001_initial.py' |
302 | --- gallery/migrations/0001_initial.py 1970-01-01 00:00:00 +0000 |
303 | +++ gallery/migrations/0001_initial.py 2012-10-16 21:48:22 +0000 |
304 | @@ -0,0 +1,20 @@ |
305 | +# -*- coding: utf-8 -*- |
306 | +import datetime |
307 | +from south.db import db |
308 | +from south.v2 import SchemaMigration |
309 | +from django.db import models |
310 | + |
311 | + |
312 | +class Migration(SchemaMigration): |
313 | + |
314 | + def forwards(self, orm): |
315 | + pass |
316 | + |
317 | + def backwards(self, orm): |
318 | + pass |
319 | + |
320 | + models = { |
321 | + |
322 | + } |
323 | + |
324 | + complete_apps = ['gallery'] |
325 | \ No newline at end of file |
326 | |
327 | === added file 'gallery/migrations/__init__.py' |
328 | === modified file 'pip.txt' |
329 | --- pip.txt 2012-06-25 05:15:35 +0000 |
330 | +++ pip.txt 2012-10-16 21:48:22 +0000 |
331 | @@ -5,3 +5,4 @@ |
332 | django_openid_auth>=0.4 |
333 | pygpgme==0.2 |
334 | python-openid==2.2.5 |
335 | +South>=0.7 |
336 | |
337 | === modified file 'settings.py' |
338 | --- settings.py 2012-10-16 21:48:22 +0000 |
339 | +++ settings.py 2012-10-16 21:48:22 +0000 |
340 | @@ -145,6 +145,7 @@ |
341 | # Uncomment the next line to enable admin documentation: |
342 | # 'django.contrib.admindocs', |
343 | 'django_openid_auth', |
344 | + 'south', |
345 | ) |
346 | |
347 | # A sample logging configuration. The only tangible logging |
348 | |
349 | === added directory 'users/migrations' |
350 | === added file 'users/migrations/0001_initial.py' |
351 | --- users/migrations/0001_initial.py 1970-01-01 00:00:00 +0000 |
352 | +++ users/migrations/0001_initial.py 2012-10-16 21:48:22 +0000 |
353 | @@ -0,0 +1,76 @@ |
354 | +# -*- coding: utf-8 -*- |
355 | +import datetime |
356 | +from south.db import db |
357 | +from south.v2 import SchemaMigration |
358 | +from django.db import models |
359 | + |
360 | + |
361 | +class Migration(SchemaMigration): |
362 | + |
363 | + def forwards(self, orm): |
364 | + # Adding model 'UserProfile' |
365 | + db.create_table('users_userprofile', ( |
366 | + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), |
367 | + ('user', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['auth.User'], unique=True)), |
368 | + ('username', self.gf('django.db.models.fields.SlugField')(unique=True, max_length=50)), |
369 | + ('share_id', self.gf('django.db.models.fields.CharField')(max_length=200, blank=True)), |
370 | + ('share_name', self.gf('django.db.models.fields.CharField')(max_length=200, blank=True)), |
371 | + ('share_dirname', self.gf('django.db.models.fields.CharField')(max_length=200, blank=True)), |
372 | + )) |
373 | + db.send_create_signal('users', ['UserProfile']) |
374 | + |
375 | + |
376 | + def backwards(self, orm): |
377 | + # Deleting model 'UserProfile' |
378 | + db.delete_table('users_userprofile') |
379 | + |
380 | + |
381 | + models = { |
382 | + 'auth.group': { |
383 | + 'Meta': {'object_name': 'Group'}, |
384 | + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
385 | + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), |
386 | + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) |
387 | + }, |
388 | + 'auth.permission': { |
389 | + 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, |
390 | + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), |
391 | + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), |
392 | + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
393 | + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) |
394 | + }, |
395 | + 'auth.user': { |
396 | + 'Meta': {'object_name': 'User'}, |
397 | + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), |
398 | + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), |
399 | + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), |
400 | + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), |
401 | + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
402 | + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), |
403 | + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), |
404 | + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), |
405 | + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), |
406 | + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), |
407 | + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), |
408 | + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), |
409 | + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) |
410 | + }, |
411 | + 'contenttypes.contenttype': { |
412 | + 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, |
413 | + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), |
414 | + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
415 | + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), |
416 | + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) |
417 | + }, |
418 | + 'users.userprofile': { |
419 | + 'Meta': {'object_name': 'UserProfile'}, |
420 | + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
421 | + 'share_dirname': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}), |
422 | + 'share_id': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}), |
423 | + 'share_name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}), |
424 | + 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}), |
425 | + 'username': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}) |
426 | + } |
427 | + } |
428 | + |
429 | + complete_apps = ['users'] |
430 | \ No newline at end of file |
431 | |
432 | === added file 'users/migrations/__init__.py' |
Thanks a lot Mike, both very nice branches!