# HG changeset patch # User Madhusudan.C.S # Date 1279808714 -19800 # Node ID f85b864f5f8b8e7dcd7c84ed088f5292aae50f9b # Parent 9e0d3287d753a0f9c422df93fed2df9a44928108 Added sitemaps framework and robots framework. diff -r 9e0d3287d753 -r f85b864f5f8b buildout.cfg --- a/buildout.cfg Thu Jul 22 19:54:31 2010 +0530 +++ b/buildout.cfg Thu Jul 22 19:55:14 2010 +0530 @@ -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 -r 9e0d3287d753 -r f85b864f5f8b initial_fixture.json --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/initial_fixture.json Thu Jul 22 19:55:14 2010 +0530 @@ -0,0 +1,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 -r 9e0d3287d753 -r f85b864f5f8b project/development.py --- a/project/development.py Thu Jul 22 19:54:31 2010 +0530 +++ b/project/development.py Thu Jul 22 19:55:14 2010 +0530 @@ -4,7 +4,7 @@ DEBUG=True TEMPLATE_DEBUG=DEBUG -SITE_ID = 1 +SITE_ID = 2 INSTALLED_APPS = ( 'django.contrib.auth', @@ -15,6 +15,7 @@ 'django.contrib.sites', 'django.contrib.flatpages', 'django.contrib.markup', + 'django.contrib.sitemaps', 'project.scipycon', 'project.scipycon.base', 'project.scipycon.proceedings', @@ -22,6 +23,7 @@ 'project.scipycon.user', 'project.scipycon.talk', 'tagging', + 'robots', ) DATABASE_ENGINE = 'sqlite3' diff -r 9e0d3287d753 -r f85b864f5f8b project/production.py --- a/project/production.py Thu Jul 22 19:54:31 2010 +0530 +++ b/project/production.py Thu Jul 22 19:55:14 2010 +0530 @@ -3,7 +3,7 @@ DEBUG=False TEMPLATE_DEBUG=DEBUG -SITE_ID = 1 +SITE_ID = 3 INSTALLED_APPS = ( 'django.contrib.auth', @@ -14,6 +14,7 @@ 'django.contrib.sites', 'django.contrib.flatpages', 'django.contrib.markup', + 'django.contrib.sitemaps', 'project.scipycon', 'project.scipycon.base', 'project.scipycon.proceedings', @@ -21,6 +22,7 @@ 'project.scipycon.talk', 'project.scipycon.user', 'tagging', + 'robots', ) DATABASE_ENGINE = 'mysql' diff -r 9e0d3287d753 -r f85b864f5f8b project/urls.py --- a/project/urls.py Thu Jul 22 19:54:31 2010 +0530 +++ b/project/urls.py Thu Jul 22 19:55:14 2010 +0530 @@ -14,11 +14,15 @@ SCOPE_ARG_PATTERN = r'(?P%s/%s)' % ( PROGRAM_PATTERN_CORE, EVENT_PATTERN_CORE) +sitemaps = {} + # Admin urlpatterns = patterns('', - url(r'^$', redirect_to, {'url': '/%s/' % (settings.CURRENT_SCOPE)}), + (r'^admin/(.*)', admin.site.root), (r'^comments/', include('django.contrib.comments.urls')), - (r'^admin/(.*)', admin.site.root), + (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'), )