-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Made all the changes so install, migrate, runserver, test work - Tried playing a game, worked fine.
- Loading branch information
1 parent
49f99f2
commit 3807e5d
Showing
11 changed files
with
243 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
|
||
from django.db import models, migrations | ||
import model_utils.fields | ||
import jsonfield.fields | ||
import django.db.models.deletion | ||
import django.utils.timezone | ||
from django.conf import settings | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='BlackCard', | ||
fields=[ | ||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), | ||
('text', models.CharField(max_length=255)), | ||
('draw', models.SmallIntegerField(default=0)), | ||
('pick', models.SmallIntegerField(default=1)), | ||
('watermark', models.CharField(max_length=100, null=True)), | ||
], | ||
options={ | ||
'db_table': 'black_cards', | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='CardSet', | ||
fields=[ | ||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), | ||
('active', models.BooleanField(default=True)), | ||
('name', models.CharField(unique=True, max_length=255)), | ||
('base_deck', models.BooleanField(default=True)), | ||
('description', models.CharField(max_length=255)), | ||
('weight', models.SmallIntegerField(default=0)), | ||
('black_card', models.ManyToManyField(to='cards.BlackCard', db_table=b'card_set_black_card')), | ||
], | ||
options={ | ||
'db_table': 'card_set', | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='Game', | ||
fields=[ | ||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), | ||
('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)), | ||
('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)), | ||
('name', models.CharField(unique=True, max_length=140)), | ||
('game_state', models.CharField(max_length=140)), | ||
('is_active', models.BooleanField(default=True)), | ||
('gamedata', jsonfield.fields.JSONField()), | ||
], | ||
options={ | ||
'abstract': False, | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='Player', | ||
fields=[ | ||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), | ||
('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)), | ||
('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)), | ||
('name', models.CharField(max_length=140)), | ||
('player_data', jsonfield.fields.JSONField(blank=True)), | ||
('wins', models.IntegerField(blank=True)), | ||
('game', models.ForeignKey(to='cards.Game')), | ||
('user', models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, blank=True, to=settings.AUTH_USER_MODEL, null=True)), | ||
], | ||
options={ | ||
'abstract': False, | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='StandardSubmission', | ||
fields=[ | ||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), | ||
('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)), | ||
('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)), | ||
('winner', models.BooleanField(default=False)), | ||
('complete_submission', models.TextField(null=True, blank=True)), | ||
('blackcard', models.ForeignKey(to='cards.BlackCard', null=True)), | ||
('game', models.ForeignKey(to='cards.Game', null=True)), | ||
], | ||
options={ | ||
'abstract': False, | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='SubmittedCard', | ||
fields=[ | ||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), | ||
('card_type', models.CharField(default=b'1', max_length=1, choices=[(b'1', b'White Card'), (b'2', b'Black Card')])), | ||
('text', models.CharField(max_length=255)), | ||
('submitter', models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, null=True)), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='WhiteCard', | ||
fields=[ | ||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), | ||
('text', models.CharField(max_length=255)), | ||
('watermark', models.CharField(max_length=100, null=True)), | ||
], | ||
options={ | ||
'db_table': 'white_cards', | ||
}, | ||
), | ||
migrations.AddField( | ||
model_name='standardsubmission', | ||
name='submissions', | ||
field=models.ManyToManyField(to='cards.WhiteCard', null=True), | ||
), | ||
migrations.AddField( | ||
model_name='cardset', | ||
name='white_card', | ||
field=models.ManyToManyField(to='cards.WhiteCard', db_table=b'card_set_white_card'), | ||
), | ||
] |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
(cards-against-django)SensitiveDependence:cards-against-django phildini$ CAH_KEY=12345 python manage.py runserver --settings=cah.settings.local | ||
Traceback (most recent call last): | ||
File "manage.py", line 17, in <module> | ||
execute_from_command_line(sys.argv) | ||
File "/Users/phildini/Repos/cards-against-django/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line | ||
utility.execute() | ||
File "/Users/phildini/Repos/cards-against-django/lib/python2.7/site-packages/django/core/management/__init__.py", line 312, in execute | ||
django.setup() | ||
File "/Users/phildini/Repos/cards-against-django/lib/python2.7/site-packages/django/__init__.py", line 18, in setup | ||
apps.populate(settings.INSTALLED_APPS) | ||
File "/Users/phildini/Repos/cards-against-django/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate | ||
app_config = AppConfig.create(entry) | ||
File "/Users/phildini/Repos/cards-against-django/lib/python2.7/site-packages/django/apps/config.py", line 86, in create | ||
module = import_module(entry) | ||
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module | ||
__import__(name) | ||
File "/Users/phildini/Repos/cards-against-django/lib/python2.7/site-packages/django_nose/__init__.py", line 4, in <module> | ||
from django_nose.runner import * | ||
File "/Users/phildini/Repos/cards-against-django/lib/python2.7/site-packages/django_nose/runner.py", line 20, in <module> | ||
from django.db.backends.creation import BaseDatabaseCreation | ||
ImportError: No module named creation | ||
|
||
========================================== | ||
|
||
(cards-against-django)SensitiveDependence:cards-against-django phildini$ CAH_KEY=12345 python manage.py runserver --settings=cah.settings.local | ||
Traceback (most recent call last): | ||
File "manage.py", line 17, in <module> | ||
execute_from_command_line(sys.argv) | ||
File "/Users/phildini/Repos/cards-against-django/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line | ||
utility.execute() | ||
File "/Users/phildini/Repos/cards-against-django/lib/python2.7/site-packages/django/core/management/__init__.py", line 312, in execute | ||
django.setup() | ||
File "/Users/phildini/Repos/cards-against-django/lib/python2.7/site-packages/django/__init__.py", line 18, in setup | ||
apps.populate(settings.INSTALLED_APPS) | ||
File "/Users/phildini/Repos/cards-against-django/lib/python2.7/site-packages/django/apps/registry.py", line 108, in populate | ||
app_config.import_models(all_models) | ||
File "/Users/phildini/Repos/cards-against-django/lib/python2.7/site-packages/django/apps/config.py", line 198, in import_models | ||
self.models_module = import_module(models_module_name) | ||
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module | ||
__import__(name) | ||
File "/Users/phildini/Repos/cards-against-django/cards/models.py", line 546, in <module> | ||
@transaction.commit_on_success | ||
AttributeError: 'module' object has no attribute 'commit_on_success' | ||
|
||
================= | ||
|
||
(cards-against-django)SensitiveDependence:cards-against-django phildini$ CAH_KEY=12345 python manage.py runserver --settings=cah.settings.local | ||
Performing system checks... | ||
|
||
System check identified some issues: | ||
|
||
WARNINGS: | ||
cards.StandardSubmission.submissions: (fields.W340) null has no effect on ManyToManyField. | ||
|
||
System check identified 1 issue (0 silenced). | ||
There is no South database module 'south.db.sqlite3' for your database. Please either choose a supported database, check for SOUTH_DATABASE_ADAPTER[S] settings, or remove South from INSTALLED_APPS. | ||
|
||
=================== | ||
|
||
(cards-against-django)SensitiveDependence:cards-against-django phildini$ CAH_KEY=12345 python manage.py runserver --settings=cah.settings.local | ||
Performing system checks... | ||
|
||
System check identified some issues: | ||
|
||
WARNINGS: | ||
cards.StandardSubmission.submissions: (fields.W340) null has no effect on ManyToManyField. | ||
|
||
System check identified 1 issue (0 silenced). | ||
|
||
You have unapplied migrations; your app may not work properly until they are applied. | ||
Run 'python manage.py migrate' to apply them. | ||
|
||
May 16, 2015 - 13:49:21 | ||
Django version 1.8.1, using settings 'cah.settings.local' | ||
Starting development server at http://127.0.0.1:8000/ | ||
Quit the server with CONTROL-C. | ||
|
||
================ | ||
|
||
(cards-against-django)SensitiveDependence:cards-against-django phildini$ CAH_KEY=12345 python manage.py migrate --fake --settings=cah.settings.local | ||
System check identified some issues: | ||
|
||
WARNINGS: | ||
cards.StandardSubmission.submissions: (fields.W340) null has no effect on ManyToManyField. | ||
Operations to perform: | ||
Synchronize unmigrated apps: staticfiles, twitter, messages, allauth, facebook, django_nose, cards, rest_framework | ||
Apply all migrations: account, sessions, admin, sites, auth, contenttypes, socialaccount | ||
Synchronizing apps without migrations: | ||
Creating tables... | ||
Running deferred SQL... | ||
Installing custom SQL... | ||
Running migrations: | ||
Rendering model states... DONE | ||
Applying auth.0001_initial... FAKED | ||
Applying account.0001_initial... FAKED | ||
Applying account.0002_auto_20150516_1527... FAKED | ||
Applying admin.0001_initial... FAKED | ||
Applying auth.0002_alter_permission_name_max_length... FAKED | ||
Applying auth.0003_alter_user_email_max_length... FAKED | ||
Applying auth.0004_alter_user_username_opts... FAKED | ||
Applying auth.0005_alter_user_last_login_null... FAKED | ||
Applying auth.0006_require_contenttypes_0002... FAKED | ||
Applying sessions.0001_initial... FAKED | ||
Applying sites.0001_initial... FAKED | ||
Applying socialaccount.0001_initial... FAKED | ||
Applying socialaccount.0002_auto_20150516_1527... FAKED | ||
(cards-against-django)SensitiveDependence:cards-against-django phildini$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters