diff options
author | Madhusudan.C.S | 2010-07-22 19:55:14 +0530 |
---|---|---|
committer | Madhusudan.C.S | 2010-07-22 19:55:14 +0530 |
commit | 7ebdffb8910da824bb6e26e0cb970821238d5bd8 (patch) | |
tree | cd2fd4aebccd6d1958ed744333b879564678784a | |
parent | 172ca6a44b7acb10e32b3674a293f6d914b3009f (diff) | |
download | scipycon-7ebdffb8910da824bb6e26e0cb970821238d5bd8.tar.gz scipycon-7ebdffb8910da824bb6e26e0cb970821238d5bd8.tar.bz2 scipycon-7ebdffb8910da824bb6e26e0cb970821238d5bd8.zip |
Added sitemaps framework and robots framework.
-rw-r--r-- | buildout.cfg | 11 | ||||
-rw-r--r-- | initial_fixture.json | 1 | ||||
-rw-r--r-- | project/development.py | 4 | ||||
-rw-r--r-- | project/production.py | 4 | ||||
-rw-r--r-- | project/urls.py | 8 |
5 files changed, 22 insertions, 6 deletions
diff --git a/buildout.cfg b/buildout.cfg index e42274a..cc20536 100644 --- a/buildout.cfg +++ b/buildout.cfg @@ -1,16 +1,23 @@ [buildout] -parts = django tagging +parts = django tagging django-robots eggs = Werkzeug PIL + docutils [django] recipe = djangorecipe version = 1.2.1 settings = production eggs = ${buildout:eggs} -pythonpath = ${tagging:location} +pythonpath = + ${tagging:location} + ${django-robots:location} [tagging] recipe = infrae.subversion urls = http://django-tagging.googlecode.com/svn/trunk/ . + +[django-robots] +recipe = mercurialrecipe +repository = http://bitbucket.org/jezdez/django-robots/ diff --git a/initial_fixture.json b/initial_fixture.json new file mode 100644 index 0000000..039e572 --- /dev/null +++ b/initial_fixture.json @@ -0,0 +1 @@ +[{"pk": 1, "model": "sites.site", "fields": {"domain": "example.com", "name": "example.com"}}, {"pk": 2, "model": "sites.site", "fields": {"domain": "localhost:8000", "name": "localhost:8000"}}, {"pk": 3, "model": "sites.site", "fields": {"domain": "scipy.in", "name": "scipy.in"}}] diff --git a/project/development.py b/project/development.py index e6aad51..df95ac1 100644 --- a/project/development.py +++ b/project/development.py @@ -4,7 +4,7 @@ from project.settings import * DEBUG=True TEMPLATE_DEBUG=DEBUG -SITE_ID = 1 +SITE_ID = 2 INSTALLED_APPS = ( 'django.contrib.auth', @@ -15,6 +15,7 @@ INSTALLED_APPS = ( 'django.contrib.sites', 'django.contrib.flatpages', 'django.contrib.markup', + 'django.contrib.sitemaps', 'project.scipycon', 'project.scipycon.base', 'project.scipycon.proceedings', @@ -22,6 +23,7 @@ INSTALLED_APPS = ( 'project.scipycon.user', 'project.scipycon.talk', 'tagging', + 'robots', ) DATABASE_ENGINE = 'sqlite3' diff --git a/project/production.py b/project/production.py index b809fcf..c7b55c7 100644 --- a/project/production.py +++ b/project/production.py @@ -3,7 +3,7 @@ from project.settings import * DEBUG=False TEMPLATE_DEBUG=DEBUG -SITE_ID = 1 +SITE_ID = 3 INSTALLED_APPS = ( 'django.contrib.auth', @@ -14,6 +14,7 @@ INSTALLED_APPS = ( 'django.contrib.sites', 'django.contrib.flatpages', 'django.contrib.markup', + 'django.contrib.sitemaps', 'project.scipycon', 'project.scipycon.base', 'project.scipycon.proceedings', @@ -21,6 +22,7 @@ INSTALLED_APPS = ( 'project.scipycon.talk', 'project.scipycon.user', 'tagging', + 'robots', ) DATABASE_ENGINE = 'mysql' diff --git a/project/urls.py b/project/urls.py index d7d34f5..f04ffa8 100644 --- a/project/urls.py +++ b/project/urls.py @@ -14,11 +14,15 @@ EVENT_PATTERN_CORE =r'(?:[0-9a-z]|_[0-9a-z])*' SCOPE_ARG_PATTERN = r'(?P<scope>%s/%s)' % ( PROGRAM_PATTERN_CORE, EVENT_PATTERN_CORE) +sitemaps = {} + # Admin urlpatterns = patterns('', - url(r'^$', redirect_to, {'url': '/%s/' % (settings.CURRENT_SCOPE)}), - (r'^comments/', include('django.contrib.comments.urls')), (r'^admin/(.*)', admin.site.root), + (r'^comments/', include('django.contrib.comments.urls')), + (r'^robots\.txt$', include('robots.urls')), + (r'^sitemap\.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps}), + url(r'^$', redirect_to, {'url': '/%s/' % (settings.CURRENT_SCOPE)}), url(r'^%s/$' % (SCOPE_ARG_PATTERN), direct_to_template, {"template": "home.html"}, name='home'), ) |