diff --git a/questionnaire/migrations/0005_move_nonces.py b/questionnaire/migrations/0005_move_nonces.py index 0a02172b..afe01feb 100644 --- a/questionnaire/migrations/0005_move_nonces.py +++ b/questionnaire/migrations/0005_move_nonces.py @@ -5,19 +5,24 @@ from south.v2 import DataMigration from django.db import models class Migration(DataMigration): + ''' migrated from a module that has since been blown away depends_on = ( ("survey", "0001_initial"), ) needed_by = ( ("survey", "0002_auto__del_landing"), ) - + ''' + def forwards(self, orm): + ''' oldLanding=orm['survey.Landing'] Landing=orm['questionnaire.Landing'] for landing in oldLanding.objects.all(): - Landing.objects.create(nonce=landing.nonce, label=landing.label, content_type=landing.content_type, object_id=landing.object_id) - + Landing.objects.create(nonce=landing.nonce, label=landing.label, content_type=landing.content_type, object_id=landing.object_id) + ''' + pass + def backwards(self, orm): pass @@ -145,5 +150,6 @@ class Migration(DataMigration): } } - complete_apps = ['survey', 'questionnaire'] - symmetrical = True + #complete_apps = ['survey', 'questionnaire'] + complete_apps = ['questionnaire'] + #symmetrical = True diff --git a/settings/common.py b/settings/common.py index 9aee508b..6f1e6bbe 100644 --- a/settings/common.py +++ b/settings/common.py @@ -175,7 +175,6 @@ INSTALLED_APPS = ( 'transmeta', 'regluit.questionnaire', 'regluit.questionnaire.page', - 'regluit.survey', ) # A sample logging configuration. The only tangible logging diff --git a/survey/__init__.py b/survey/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/survey/admin.py b/survey/admin.py deleted file mode 100644 index b730fd7b..00000000 --- a/survey/admin.py +++ /dev/null @@ -1,8 +0,0 @@ -from django.contrib import admin -from .models import Landing - -# new in dj1.7 -# @admin.register(Landing) -class LandingAdmin(admin.ModelAdmin): - pass - diff --git a/survey/migrations/0001_initial.py b/survey/migrations/0001_initial.py deleted file mode 100644 index a93c1124..00000000 --- a/survey/migrations/0001_initial.py +++ /dev/null @@ -1,47 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - needed_by = ( - ("questionnaire", "0005_move_nonces"), - ) - def forwards(self, orm): - # Adding model 'Landing' - db.create_table('survey_landing', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('nonce', self.gf('django.db.models.fields.CharField')(max_length=32, null=True)), - ('content_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['contenttypes.ContentType'], null=True)), - ('object_id', self.gf('django.db.models.fields.PositiveIntegerField')(null=True)), - ('label', self.gf('django.db.models.fields.CharField')(max_length=64, null=True)), - )) - db.send_create_signal('survey', ['Landing']) - - - def backwards(self, orm): - # Deleting model 'Landing' - db.delete_table('survey_landing') - - - models = { - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'survey.landing': { - 'Meta': {'object_name': 'Landing'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']", 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True'}), - 'nonce': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), - 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}) - } - } - - complete_apps = ['survey'] \ No newline at end of file diff --git a/survey/migrations/0002_auto__del_landing.py b/survey/migrations/0002_auto__del_landing.py deleted file mode 100644 index 8291f69f..00000000 --- a/survey/migrations/0002_auto__del_landing.py +++ /dev/null @@ -1,33 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - depends_on = ( - ("questionnaire", "0005_move_nonces"), - ) - def forwards(self, orm): - # Deleting model 'Landing' - db.delete_table('survey_landing') - - - def backwards(self, orm): - # Adding model 'Landing' - db.create_table('survey_landing', ( - ('nonce', self.gf('django.db.models.fields.CharField')(max_length=32, null=True)), - ('object_id', self.gf('django.db.models.fields.PositiveIntegerField')(null=True)), - ('label', self.gf('django.db.models.fields.CharField')(max_length=64, null=True)), - ('content_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['contenttypes.ContentType'], null=True)), - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - )) - db.send_create_signal('survey', ['Landing']) - - - models = { - - } - - complete_apps = ['survey'] \ No newline at end of file diff --git a/survey/migrations/__init__.py b/survey/migrations/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/survey/models.py b/survey/models.py deleted file mode 100644 index 266ef5aa..00000000 --- a/survey/models.py +++ /dev/null @@ -1,9 +0,0 @@ -import hashlib -import uuid -from datetime import datetime -from django.conf import settings -from django.contrib.contenttypes.generic import GenericForeignKey -from django.contrib.contenttypes.models import ContentType -from django.db import models -from django.db.models.signals import post_save - diff --git a/survey/templates/survey/generic.html b/survey/templates/survey/generic.html deleted file mode 100644 index 7eb5bedd..00000000 --- a/survey/templates/survey/generic.html +++ /dev/null @@ -1,14 +0,0 @@ -{% extends 'basedocumentation.html' %} -{% load url from future %} - -{% block title %}Tell us Stuff!{% endblock %} - -{% block doccontent %} - -

Tell us stuff!

-

We are excited that this is Open Access book and really hope that it will be shared around, read by lots of people all over the world, and used in lots of exciting new ways. We would love to hear about you and how you are using it - please would you share your story with us using this link: (it will only take about 3 minutes - and you could just get a free book as well ….)

-

But comeback again, our survey for {{landing.label}} isn't ready yet.

- -{% endblock %} - - diff --git a/survey/urls.py b/survey/urls.py deleted file mode 100644 index 24dd7f9f..00000000 --- a/survey/urls.py +++ /dev/null @@ -1,7 +0,0 @@ -from django.conf.urls import patterns, url, include -from .views import SurveyView - - -urlpatterns = patterns('', - url(r'^landing/(?P\w+)/$', SurveyView.as_view(), name="landing"), -) diff --git a/survey/views.py b/survey/views.py deleted file mode 100644 index ee8b6821..00000000 --- a/survey/views.py +++ /dev/null @@ -1,20 +0,0 @@ -import logging - -from django.shortcuts import get_object_or_404 -from django.views.generic.base import TemplateView - -from .models import Landing - - - -class SurveyView(TemplateView): - template_name = "survey/generic.html" - - def get_context_data(self, **kwargs): - context = super(SurveyView, self).get_context_data(**kwargs) - - nonce = self.kwargs['nonce'] - landing = get_object_or_404(Landing, nonce=nonce) - context["landing"] = landing - - return context