From b7844cf78d0b0f5a8489138732a15c4d40967c93 Mon Sep 17 00:00:00 2001 From: Jayaram Pai Date: Wed, 18 Dec 2013 12:29:04 +0530 Subject: updating wsgi.py --- drupal_auth/backend.py | 8 ----- forums/wsgi.py | 4 +-- static/website/templates/fetch_posts.html | 9 ----- static/website/templates/fetch_questions.html | 9 ----- static/website/templates/fetch_tutorials.html | 10 ------ static/website/templates/get_post.html | 12 ------- static/website/templates/get_tutorial.html | 12 ------- static/website/templates/new-post.html | 45 ------------------------ static/website/templates/recent_posts.html | 5 --- website/managers.py | 49 --------------------------- 10 files changed, 2 insertions(+), 161 deletions(-) delete mode 100644 drupal_auth/backend.py delete mode 100644 static/website/templates/fetch_posts.html delete mode 100644 static/website/templates/fetch_questions.html delete mode 100644 static/website/templates/fetch_tutorials.html delete mode 100644 static/website/templates/get_post.html delete mode 100644 static/website/templates/get_tutorial.html delete mode 100644 static/website/templates/new-post.html delete mode 100644 static/website/templates/recent_posts.html delete mode 100644 website/managers.py diff --git a/drupal_auth/backend.py b/drupal_auth/backend.py deleted file mode 100644 index e85b8b2..0000000 --- a/drupal_auth/backend.py +++ /dev/null @@ -1,8 +0,0 @@ -from django.contrib.auth.models import User - -from website.models import Test - -class DrupalAuthBackend: - def authenticate(self, username=None, password=None): - user = User.objects.get(username='admin') - return user diff --git a/forums/wsgi.py b/forums/wsgi.py index 3a52e8b..728eed4 100644 --- a/forums/wsgi.py +++ b/forums/wsgi.py @@ -24,8 +24,8 @@ sys.path.append('/Sites/venv/forums/') # os.environ["DJANGO_SETTINGS_MODULE"] = "forums.settings" os.environ["DJANGO_SETTINGS_MODULE"] = "forums.settings" -#activate_this = '/Sites/venv/bin/activate_this.py' -#execfile(activate_this, dict(__file__=activate_this)) +activate_this = '/Sites/venv/bin/activate_this.py' +execfile(activate_this, dict(__file__=activate_this)) # This application object is used by any WSGI server configured to use this # file. This includes Django's development server, if the WSGI_APPLICATION diff --git a/static/website/templates/fetch_posts.html b/static/website/templates/fetch_posts.html deleted file mode 100644 index d6d4e06..0000000 --- a/static/website/templates/fetch_posts.html +++ /dev/null @@ -1,9 +0,0 @@ -{% extends 'website/templates/base.html' %} -{% block content %} -{{ category }}, {{ tutorial }} -
-Number of posts: {{ posts|length }}
-{% for post in posts %} - {{ post.title }} -{% endfor %} -{% endblock %} diff --git a/static/website/templates/fetch_questions.html b/static/website/templates/fetch_questions.html deleted file mode 100644 index d7492fc..0000000 --- a/static/website/templates/fetch_questions.html +++ /dev/null @@ -1,9 +0,0 @@ -{% extends 'website/templates/base.html' %} -{% block content %} -{{ category }}, {{ tutorial }} -
-Number of questions: {{ questions|length }}
-{% for question in questions %} - {{ question.title }} -{% endfor %} -{% endblock %} diff --git a/static/website/templates/fetch_tutorials.html b/static/website/templates/fetch_tutorials.html deleted file mode 100644 index 246c35f..0000000 --- a/static/website/templates/fetch_tutorials.html +++ /dev/null @@ -1,10 +0,0 @@ -{% extends 'website/templates/base.html' %} -{% block content %} -{% for tut in tutorials %} -
- - {{tut.tutorial_name}} - -
-{% endfor %} -{% endblock %} diff --git a/static/website/templates/get_post.html b/static/website/templates/get_post.html deleted file mode 100644 index 359bcd2..0000000 --- a/static/website/templates/get_post.html +++ /dev/null @@ -1,12 +0,0 @@ -{% extends 'website/templates/base.html' %} -{% block content %} -

{{post.title}}

-

- {{ post.body }} -

- -Replies -{% for reply in replies %} - {{ reply.body }} -{% endfor %} -{% endblock %} diff --git a/static/website/templates/get_tutorial.html b/static/website/templates/get_tutorial.html deleted file mode 100644 index 159f342..0000000 --- a/static/website/templates/get_tutorial.html +++ /dev/null @@ -1,12 +0,0 @@ -{% extends 'website/templates/base.html' %} -{% block content %} -

{{question.title}}

-

- {{ question.body }} -

- -Replies -{% for reply in replies %} - {{ reply.body }} -{% endfor %} -{% endblock %} diff --git a/static/website/templates/new-post.html b/static/website/templates/new-post.html deleted file mode 100644 index 8487b70..0000000 --- a/static/website/templates/new-post.html +++ /dev/null @@ -1,45 +0,0 @@ -{% extends 'website/templates/base.html' %} -{% load widget_tweaks %} -{% block content %} -

- - Create a new question . . . -

-
-
- {% with WIDGET_ERROR_CLASS='field_error' %} - -

Please enter the tutorial details.

-
-
- {% render_field form.category class+="form-control"%} -
-
- {% render_field form.tutorial class+="form-control" disabled="disabled" %} -
-
- {% render_field form.minute_range class+="form-control" disabled="disabled" %} -
-
- {% render_field form.second_range class+="form-control" disabled="disabled" %} -
-
-
- -

Please enter your question details.

-
-
-
- - {% render_field form.title class+="form-control" %} -
-
- - {% render_field form.body class+="form-control" %} -
-
-
- - {% endwith %} -
-{% endblock %} diff --git a/static/website/templates/recent_posts.html b/static/website/templates/recent_posts.html deleted file mode 100644 index 3b6ad0e..0000000 --- a/static/website/templates/recent_posts.html +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/website/managers.py b/website/managers.py deleted file mode 100644 index c55b931..0000000 --- a/website/managers.py +++ /dev/null @@ -1,49 +0,0 @@ -from django.db import models -from django.contrib.auth.models import ( - BaseUserManager, AbstractBaseUser -) - -class DrupalUserManager(BaseUserManager): - def create_user(self, password=None): - user = self.model() - if not email: - raise ValueError('Users must have an email address') - - user.set_password(password) - user.save(using=self._db) - return user - - def create_superuser(self, username, password): - user = self.model() - user.username = username - user.password = password - user.is_admin = True - user.save(using=self._db) - return user - - - - - - - - - - - - - - - - - - - - - - - - - - - -- cgit