Commit 9276b7b89a8e71ce14085f2108fb404ac8a9149b
1 parent
5354852580
Exists in
master
Nitpicky cleanup. Also to make jenkins rebuild
Showing 3 changed files with 36 additions and 8 deletions Side-by-side Diff
flashcards/migrations/0006_auto_20150512_0042.py
View file @
9276b7b
1 | +# -*- coding: utf-8 -*- | |
2 | +from __future__ import unicode_literals | |
3 | + | |
4 | +from django.db import models, migrations | |
5 | +import flashcards.fields | |
6 | + | |
7 | + | |
8 | +class Migration(migrations.Migration): | |
9 | + | |
10 | + dependencies = [ | |
11 | + ('flashcards', '0005_auto_20150510_1458'), | |
12 | + ] | |
13 | + | |
14 | + operations = [ | |
15 | + migrations.AlterField( | |
16 | + model_name='flashcard', | |
17 | + name='mask', | |
18 | + field=flashcards.fields.MaskField(help_text=b'The mask on the card', max_length=255, null=True, blank=True), | |
19 | + ), | |
20 | + migrations.AlterField( | |
21 | + model_name='userflashcard', | |
22 | + name='mask', | |
23 | + field=flashcards.fields.MaskField(help_text=b'The user-specific mask on the card', max_length=255, null=True, blank=True), | |
24 | + ), | |
25 | + migrations.DeleteModel( | |
26 | + name='FlashcardMask', | |
27 | + ), | |
28 | + ] |
flashcards/models.py
View file @
9276b7b
1 | -from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin, AbstractUser, UserManager | |
1 | +from django.contrib.auth.models import AbstractUser, UserManager | |
2 | 2 | from django.db.models import * |
3 | 3 | from django.utils.timezone import now |
4 | 4 | from simple_email_confirmation import SimpleEmailConfirmationUserMixin |
... | ... | @@ -79,7 +79,6 @@ |
79 | 79 | :return:Whether the flashcard is in the user's deck |
80 | 80 | """ |
81 | 81 | return self.pulled and not self.unpulled |
82 | - | |
83 | 82 | |
84 | 83 | |
85 | 84 | """ |
flashcards/tests/test_models.py
View file @
9276b7b
1 | +from datetime import datetime | |
2 | + | |
1 | 3 | from django.test import TestCase |
2 | 4 | from flashcards.models import User, Section, Flashcard |
3 | -from datetime import datetime | |
4 | 5 | |
5 | 6 | |
6 | 7 | class RegistrationTests(TestCase): |
7 | 8 | |
... | ... | @@ -39,16 +40,16 @@ |
39 | 40 | def setUp(self): |
40 | 41 | user = User.objects.create_user(email="none@none.com", password="1234") |
41 | 42 | section = Section.objects.create(department='dept', |
42 | - course_num='101a', | |
43 | - course_title='how 2 test', | |
44 | - instructor='George Lucas', | |
45 | - quarter='SP15') | |
43 | + course_num='101a', | |
44 | + course_title='how 2 test', | |
45 | + instructor='George Lucas', | |
46 | + quarter='SP15') | |
46 | 47 | Flashcard.objects.create(text="This is the text of the Flashcard", |
47 | 48 | section=section, |
48 | 49 | author=user, |
49 | 50 | material_date=datetime.now(), |
50 | 51 | previous=None, |
51 | - mask={(0,4), (24,34)}) | |
52 | + mask={(0, 4), (24, 34)}) | |
52 | 53 | |
53 | 54 | def test_mask_field(self): |
54 | 55 | user = User.objects.get(email="none@none.com") |