Permalink
Browse files

more cleanup

  • Loading branch information...
1 parent 8f8dd2c commit 08fe7b70a1547277fea630d35257c7d6bc937d10 @tuxcanfly tuxcanfly committed Jul 5, 2010
Showing with 0 additions and 1,168 deletions.
  1. 0 __init__.py
  2. 0 commentor/__init__.py
  3. +0 −4 commentor/models.py
  4. +0 −31 commentor/templates/commentor/index.html
  5. +0 −23 commentor/tests.py
  6. 0 commentor/urls.py
  7. +0 −22 commentor/views.py
  8. +0 −17 example/README
  9. 0 example/__init__.py
  10. +0 −5 example/admin.py
  11. +0 −12 example/models.py
  12. +0 −22 example/templates/comments/example/form.html
  13. +0 −10 example/templates/comments/example/list.html
  14. +0 −19 example/templates/example/post_detail.html
  15. +0 −16 example/templates/example/post_list.html
  16. +0 −23 example/tests.py
  17. +0 −9 example/urls.py
  18. +0 −15 example/views.py
  19. +0 −12 example_comments/__init__.py
  20. +0 −3 example_comments/models.py
  21. +0 −23 example_comments/tests.py
  22. +0 −8 example_comments/views.py
  23. +0 −246 ez_setup.py
  24. +0 −95 localsettings.example.py
  25. +0 −11 manage.py
  26. +0 −44 media/css/openid.css
  27. +0 −73 media/css/socialauth.css
  28. BIN media/images/aol.gif
  29. BIN media/images/blogger.ico
  30. BIN media/images/claimid.ico
  31. BIN media/images/facebook.gif
  32. BIN media/images/flickr.ico
  33. BIN media/images/google.gif
  34. BIN media/images/linkedin.jpg
  35. BIN media/images/livejournal.ico
  36. BIN media/images/myopenid.ico
  37. BIN media/images/openid-inputicon.gif
  38. BIN media/images/openid.gif
  39. BIN media/images/technorati.ico
  40. BIN media/images/twitter.png
  41. BIN media/images/verisign.ico
  42. BIN media/images/vidoop.ico
  43. BIN media/images/wordpress.ico
  44. BIN media/images/yahoo.gif
  45. +0 −32 media/js/jquery-1.2.6.min.js
  46. +0 −228 media/js/openid-jquery.js
  47. +0 −4 requirements.txt
  48. +0 −113 settings.example.py
  49. +0 −23 setup.py
  50. +0 −25 urls.py
View
No changes.
View
No changes.
View
@@ -1,4 +0,0 @@
-from django.db import models
-
-class Comment(models.Model):
- comment = models.TextField()
@@ -1,31 +0,0 @@
-{% extends 'base.html' %}
-
-{% block main_content %}
-
-Enter Comment
-
-{% if user.is_authenticated %}
-
-<p>You are currently logged in as <strong>{{ user.username }}</strong></p>
-
-<form action="." method="post">
- {{ form }}
- <input type="submit" name="comment_submit" value="Comment" />
-</form>
-<a href="{% url socialauth_social_logout %}">Logout</a>
-{% else %}
-
-<a href="{% url socialauth_login_page %}">Login</a>
-
-{% endif %}
-
-
-{% for comment in comments %}
-
-<p>
- {{ comment.comment }}
-</p>
-
-{% endfor %}
-
-{% endblock %}
View
@@ -1,23 +0,0 @@
-"""
-This file demonstrates two different styles of tests (one doctest and one
-unittest). These will both pass when you run "manage.py test".
-
-Replace these with more appropriate tests for your application.
-"""
-
-from django.test import TestCase
-
-class SimpleTest(TestCase):
- def test_basic_addition(self):
- """
- Tests that 1 + 1 always equals 2.
- """
- self.failUnlessEqual(1 + 1, 2)
-
-__test__ = {"doctest": """
-Another way to test that 1 + 1 is equal to 2.
-
->>> 1 + 1 == 2
-True
-"""}
-
View
No changes.
View
@@ -1,22 +0,0 @@
-from django.contrib.auth.decorators import login_required
-from django.http import HttpResponseRedirect
-from commentor.models import Comment
-from django.template import RequestContext
-from django import forms
-from django.shortcuts import render_to_response
-
-@login_required
-def leave_comment(request):
- form = CommentForm()
- if request.POST:
- form = CommentForm(data = request.POST)
- if form.is_valid():
- form.save()
- return HttpResponseRedirect('.')
-
- payload = {'form':form, 'comments':Comment.objects.all()}
- return render_to_response('commentor/index.html', payload, RequestContext(request))
-
-class CommentForm(forms.ModelForm):
- class Meta:
- model = Comment
View
@@ -1,17 +0,0 @@
-This is an example app using socialauth as authentication backend
-We use modified django comments app to allow users to login via socialauth and post comments
-
-To use this app in your project:
-
-1. Copy example and example_comments dirs to your project dir
-2. Add
- 'example',
- 'example_comments',
- to your INSTALLED_APPS
-3. Add
- (r'^comments/post/', 'example_comments.views.post_comment'),
- (r'comments/', include('django.contrib.comments.urls')),
- to your urlpatterns
-4. Add
- COMMENTS_APP = 'example_comments'
- to your settings
View
No changes.
View
@@ -1,5 +0,0 @@
-from models import Post
-from django.contrib import admin
-
-admin.site.register(Post)
-
View
@@ -1,12 +0,0 @@
-from django.db import models
-from django.contrib.auth.models import User
-# Create your models here.
-
-class Post(models.Model):
- author = models.ForeignKey(User)
- date = models.DateTimeField()
- title = models.CharField(max_length=100)
- post = models.TextField()
-
- def __unicode__(self):
- return self.title
@@ -1,22 +0,0 @@
-{% load comments i18n %}
-
-<form action="{% comment_form_target %}" method="post">{% csrf_token %}
- {% if next %}<input type="hidden" name="next" value="{{ next }}" />{% endif %}
- {% for field in form %}
- {% if field.is_hidden %}
- {{ field }}
- {% else %}
- {% if field.errors %}{{ field.errors }}{% endif %}
- <p
- {% if field.errors %} class="error"{% endif %}
- {% ifequal field.name "honeypot" %} style="display:none;"{% endifequal %}>
- {{ field.label_tag }} {{ field }}
- </p>
- {% endif %}
- {% endfor %}
- <input type="hidden" name="next" id="next" value="{{request.path}}">
- <p class="submit">
- <input type="submit" name="post" class="submit-post" value="{% trans "Post" %}" />
- <input type="submit" name="preview" class="submit-preview" value="{% trans "Preview" %}" />
- </p>
-</form>
@@ -1,10 +0,0 @@
-<dl id="comments">
- {% for comment in comment_list %}
- <dd>
- <p>{{ comment.comment }}</p>
- </dd>
- <dt id="c{{ comment.id }}">
- on {{ comment.submit_date|date }} at {{ comment.submit_date|time }} by {{ comment.name }}
- </dt>
- {% endfor %}
-</dl>
@@ -1,19 +0,0 @@
-{% load comments socialauth_tags %}
-
-<h2> {{ post }}</h2>
-<p>{{ post.post }}</p>
- <br />
- posted by {{ post.author }} on {{ post.date|date }} at {{ post.date|time }}
- <br />
- <br />
- Comments:
- <br />
- {% render_comment_list for post %}
- <br />
- {% if request.user.username %}
- Comment as {% get_calculated_username request.user %}
- (<a href="{% url socialauth_social_logout %}?next={{ request.path }}">Not {% get_calculated_username request.user %}?</a>)
- {% render_comment_form for post %}
- {% else %}
- <a href='{% url socialauth_login_page %}?next={{ request.path }}'>Login to comment</a>
- {% endif %}
@@ -1,16 +0,0 @@
-{% load comments %}
-{{ latest }}
-{% if object_list %}
- {% for post in object_list %}
- <h2>{{ post }}</h2>
- <p>{{ post.post }}</p>
- {% get_comment_count for post as comment_count %}
- <b>{{ post.author }}</b> wrote {{ post.post|wordcount }} words on {{ post.date|date }} at {{ post.date|time }}
- <br />
- <a href='{{ post.id }}'>
- {{ comment_count }} comments
- </a>
- {% endfor %}
-{% else %}
- <a href="/admin/example/post/add/">Add a new blog post</a>
-{% endif %}
View
@@ -1,23 +0,0 @@
-"""
-This file demonstrates two different styles of tests (one doctest and one
-unittest). These will both pass when you run "manage.py test".
-
-Replace these with more appropriate tests for your application.
-"""
-
-from django.test import TestCase
-
-class SimpleTest(TestCase):
- def test_basic_addition(self):
- """
- Tests that 1 + 1 always equals 2.
- """
- self.failUnlessEqual(1 + 1, 2)
-
-__test__ = {"doctest": """
-Another way to test that 1 + 1 is equal to 2.
-
->>> 1 + 1 == 2
-True
-"""}
-
View
@@ -1,9 +0,0 @@
-from django.conf.urls.defaults import *
-from models import Post
-
-urlpatterns = patterns('',
- url(r'^(?P<post_id>\d+)$', 'example.views.post_detail'),
- url(r'^$', 'django.views.generic.list_detail.object_list',
- { 'queryset' : Post.objects.all() }
- ),
-)
View
@@ -1,15 +0,0 @@
-# Create your views here.
-from django.shortcuts import render_to_response, get_object_or_404
-from django.http import HttpResponseRedirect
-from django.contrib.comments.models import Comment
-from models import Post
-from django.template import RequestContext
-
-def comment_posted(request):
- comment_id = request.GET['c']
- post_id = Comment.objects.get(id=comment_id).content_object.id
- return HttpResponseRedirect('/blog/'+str(post_id))
-
-def post_detail(request, post_id):
- post = get_object_or_404(Post, pk=post_id)
- return render_to_response('example/post_detail.html', {'post': post}, context_instance=RequestContext(request))
@@ -1,12 +0,0 @@
-from django import forms
-from django.utils.translation import ugettext_lazy as _
-from django.contrib.comments.forms import CommentDetailsForm
-
-class CommentForm(CommentDetailsForm):
- name = forms.CharField(widget=forms.HiddenInput, required=False)
- email = forms.EmailField(widget=forms.HiddenInput, required=False)
- url = forms.URLField(widget=forms.HiddenInput, required=False)
-
-
-def get_form():
- return CommentForm
@@ -1,3 +0,0 @@
-from django.db import models
-
-# Create your models here.
View
@@ -1,23 +0,0 @@
-"""
-This file demonstrates two different styles of tests (one doctest and one
-unittest). These will both pass when you run "manage.py test".
-
-Replace these with more appropriate tests for your application.
-"""
-
-from django.test import TestCase
-
-class SimpleTest(TestCase):
- def test_basic_addition(self):
- """
- Tests that 1 + 1 always equals 2.
- """
- self.failUnlessEqual(1 + 1, 2)
-
-__test__ = {"doctest": """
-Another way to test that 1 + 1 is equal to 2.
-
->>> 1 + 1 == 2
-True
-"""}
-
@@ -1,8 +0,0 @@
-# Create your views here.
-
-from django.contrib.auth.decorators import login_required
-from django.contrib.comments.views.comments import post_comment as old_post_comment
-
-@login_required
-def post_comment(request):
- return old_post_comment(request)
Oops, something went wrong.

0 comments on commit 08fe7b7

Please sign in to comment.