Skip to content

Commit

Permalink
Upgraded to Django 1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Clinton Blackburn committed Nov 13, 2014
1 parent 9b23fed commit af79e1d
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 12 deletions.
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ COVERAGE = $(ROOT)/build/coverage
PACKAGES = analyticsdataserver analytics_data_api
DATABASES = default analytics

.PHONY: requirements develop clean diff.report view.diff.report quality syncdb
.PHONY: requirements develop clean diff.report view.diff.report quality

requirements:
pip install -q -r requirements/base.txt
Expand Down Expand Up @@ -46,17 +46,17 @@ quality:

validate: test.requirements test quality

syncdb:
$(foreach db_name,$(DATABASES),./manage.py syncdb --migrate --noinput --database=$(db_name);)
migrate:
$(foreach db_name,$(DATABASES),./manage.py migrate --noinput --database=$(db_name);)

loaddata: syncdb
loaddata: migrate
python manage.py loaddata problem_response_answer_distribution --database=analytics
python manage.py generate_fake_course_data

demo: clean requirements loaddata
python manage.py set_api_key edx edx

travis: clean requirements syncdb
travis: clean requirements migrate
python manage.py set_api_key edx edx
python manage.py loaddata problem_response_answer_distribution --database=analytics
python manage.py generate_fake_course_data --num-weeks=1
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ Getting Started

::

$ ./manage.py syncdb --migrate --noinput
$ ./manage.py syncdb --migrate --noinput --database=analytics
$ ./manage.py migrate --noinput
$ ./manage.py migrate --noinput --database=analytics

3. Create a user and authentication token. Note that the user will be
created if one does not exist.
Expand Down
2 changes: 1 addition & 1 deletion analyticsdataserver/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def db_for_write(self, model, **hints): # pylint: disable=unused-argument
def allow_relation(self, obj1, obj2, **hints): # pylint: disable=unused-argument
return self._get_database(obj1) == self._get_database(obj2)

def allow_syncdb(self, database, model):
def allow_migrate(self, database, model):
dest_db = self._get_database(model)
if dest_db is not None:
return database == dest_db
Expand Down
1 change: 0 additions & 1 deletion analyticsdataserver/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@
)

THIRD_PARTY_APPS = (
'south',
'rest_framework',
'rest_framework.authtoken',
'rest_framework_swagger',
Expand Down
3 changes: 1 addition & 2 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
Django==1.6.6 # BSD License
Django==1.7.1 # BSD License
Markdown==2.4.1 # BSD
South==1.0 # Apache License
django-model-utils==1.4.0 # BSD
djangorestframework==2.4.4 # BSD
ipython==2.1.0 # BSD
Expand Down
2 changes: 1 addition & 1 deletion requirements/local.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Local development dependencies go here
-r base.txt
django-debug-toolbar==1.2.1
django-debug-toolbar==1.2.2

0 comments on commit af79e1d

Please sign in to comment.