Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add documentation and rename things properly

  • Loading branch information...
commit f58f2fdadd2042fe292175c3b6a1ccf986aef64d 1 parent 79eda8f
Nicolas Kuttler authored
View
26 LICENSE
@@ -0,0 +1,26 @@
+Copyright (c) Nicolas Kuttler.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
View
37 README.rst
@@ -0,0 +1,37 @@
+===========
+README
+===========
+
+This django application allows various webmaster tools to quickly verify that the site is managed by you.
+
+Currently Google and Bing webmaster tools are supported.
+
+Usage
+-----
+
+Get ``django-webmaster-verification`` into your python path::
+
+ pip install django-webmaster-verification
+
+Add ``webmaster_verification`` to your INSTALLED_APPS in settings.py::
+
+ INSTALLED_APPS = (
+ ...
+ 'webmaster_verification',
+ ...
+ )
+
+Add ``wembaster_verification`` to your root urlconf (urls.py)::
+
+ urlpatterns = patterns('',
+ ...,
+ url(r'', include('webmaster_verification.urls')),
+ ...,
+ )
+
+Add settings just as::
+
+ WEBMASTER_VERIFICATION = {
+ 'google': '<google verification code>',
+ 'bing': '<bing verification code>',
+ }
View
3  models.py
@@ -1,3 +0,0 @@
-from django.db import models
-
-# Create your models here.
View
25 tests.py
@@ -1,25 +0,0 @@
-from django.core.urlresolvers import reverse
-from django.test import TestCase
-from django.test.client import Client
-
-
-class GoogleVerifyTest(TestCase):
- def setUp(self):
- self.client = Client()
- url = reverse('google_verify')
- self.r = self.client.get(url)
-
- def test_google_verification_file_can_be_accessed(self):
- self.assertEqual(
- self.r.status_code,
- 200,
- "Couldn't access the google verification file, got %d"
- % self.r.status_code
- )
-
- def test_google_verification_file_has_right_content(self):
- self.assertRegexpMatches(
- self.r.content,
- 'google-site-verification: google833377565a0bbef2.html',
- 'fuck'
- )
View
0  __init__.py → webmaster_verification/__init__.py
File renamed without changes
View
0  templates/bing_verify_template.xml → ...r_verification/templates/bing_verify_template.xml
File renamed without changes
View
0  templates/google_verify_template.html → ...erification/templates/google_verify_template.html
File renamed without changes
View
0  urls.py → webmaster_verification/urls.py
File renamed without changes
View
2  views.py → webmaster_verification/views.py
@@ -12,7 +12,7 @@ class VerificationView(TemplateView):
def get_context_data(self, **kwargs):
context = super(VerificationView, self).get_context_data(**kwargs)
try:
- context['%s_verification' % self.provider] = settings.VERIFICATION[self.provider]
+ context['%s_verification' % self.provider] = settings.WEBMASTER_VERIFICATION[self.provider]
except KeyError:
raise Http404
return context
Please sign in to comment.
Something went wrong with that request. Please try again.