Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixes #12699 -- Updating the versioning for the documentation on the …

…homepage.
  • Loading branch information...
commit 026881863411495ee41a1b7a14ea8e7ed841bd45 1 parent 74eab7e
@justinabrahms justinabrahms authored
View
4 django_website/context_processors.py
@@ -0,0 +1,4 @@
+from django.conf import settings
+
+def recent_release(request):
+ return {'RECENT_RELEASE': settings.RECENT_RELEASE}
View
2  django_website/settings/www.py
@@ -85,6 +85,7 @@
"django.core.context_processors.debug",
"django.core.context_processors.i18n",
"django.core.context_processors.media",
+ "django_website.context_processors.recent_release",
]
@@ -99,6 +100,7 @@
# setting for documentation root path
DJANGO_DOCUMENT_ROOT_PATH = "/home/html/djangoproject.com/docs/"
DJANGO_TESTS_PATH = "/home/html/djangoproject.com/tests/"
+RECENT_RELEASE = "1.2"
# XXX What's this for?
DJANGO_SVN_ROOT = "http://code.djangoproject.com/svn/django/"
View
20 django_website/templates/homepage.html
@@ -11,22 +11,22 @@
<h2 class="deck">Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.</h2>
<p>Developed four years ago by a fast-moving online-news operation, Django was designed to handle two challenges: the intensive deadlines of a newsroom and the stringent requirements of the experienced Web developers who wrote it. It lets you build high-performing, elegant Web applications quickly.</p>
<p>Django focuses on automating as much as possible and adhering to the <a href="http://c2.com/cgi/wiki?DontRepeatYourself"><abbr title="Don't Repeat Yourself">DRY</abbr> principle</a>.</p>
-<p>Dive in by <a href="http://docs.djangoproject.com/en/dev/intro/overview/">reading the overview &rarr;</a></p>
-<p>When you're ready to code, read the <a href="http://docs.djangoproject.com/en/dev/intro/install/">installation guide</a> and <a href="http://docs.djangoproject.com/en/dev/intro/tutorial01/">tutorial</a>.</p>
+<p>Dive in by <a href="http://docs.djangoproject.com/en/{{ RECENT_RELEASE }}/intro/overview/">reading the overview &rarr;</a></p>
+<p>When you're ready to code, read the <a href="http://docs.djangoproject.com/en/{{ RECENT_RELEASE }}/intro/install/">installation guide</a> and <a href="http://docs.djangoproject.com/en/{{ RECENT_RELEASE }}/intro/tutorial01/">tutorial</a>.</p>
<div id="content-secondary">
<h2>The Django framework</h2>
<h3>Object-relational mapper</h3>
- <p>Define your <a href="http://docs.djangoproject.com/en/dev/topics/db/models/">data models</a> entirely in Python. You get a rich, <a href="http://docs.djangoproject.com/en/dev/topics/db/queries/">dynamic database-access API</a> for free &mdash; but you can still write SQL if needed.</p>
+ <p>Define your <a href="http://docs.djangoproject.com/en/{{ RECENT_RELEASE }}/topics/db/models/">data models</a> entirely in Python. You get a rich, <a href="http://docs.djangoproject.com/en/{{ RECENT_RELEASE }}/topics/db/queries/">dynamic database-access API</a> for free &mdash; but you can still write SQL if needed.</p>
<h3>Automatic admin interface</h3>
- <p>Save yourself the tedious work of creating interfaces for people to add and update content. <a href="http://docs.djangoproject.com/en/dev/intro/tutorial02/">Django does that automatically</a>, and it's production-ready.</p>
+ <p>Save yourself the tedious work of creating interfaces for people to add and update content. <a href="http://docs.djangoproject.com/en/{{ RECENT_RELEASE }}/intro/tutorial02/">Django does that automatically</a>, and it's production-ready.</p>
<h3>Elegant URL design</h3>
- <p>Design pretty, <a href="http://docs.djangoproject.com/en/dev/topics/http/urls/">cruft-free URLs</a> with no framework-specific limitations. Be as flexible as you like.</p>
+ <p>Design pretty, <a href="http://docs.djangoproject.com/en/{{ RECENT_RELEASE }}/topics/http/urls/">cruft-free URLs</a> with no framework-specific limitations. Be as flexible as you like.</p>
<h3>Template system</h3>
- <p>Use Django's powerful, extensible and designer-friendly <a href="http://docs.djangoproject.com/en/dev/topics/templates/">template language</a> to separate design, content and Python code.</p>
+ <p>Use Django's powerful, extensible and designer-friendly <a href="http://docs.djangoproject.com/en/{{ RECENT_RELEASE }}/topics/templates/">template language</a> to separate design, content and Python code.</p>
<h3>Cache system</h3>
- <p>Hook into memcached or other cache frameworks for <a href="http://docs.djangoproject.com/en/dev/topics/cache/">super performance</a> &mdash; caching is as granular as you need.</p>
+ <p>Hook into memcached or other cache frameworks for <a href="http://docs.djangoproject.com/en/{{ RECENT_RELEASE }}/topics/cache/">super performance</a> &mdash; caching is as granular as you need.</p>
<h3>Internationalization</h3>
- <p>Django has full support for <a href="http://docs.djangoproject.com/en/dev/topics/i18n/">multi-language applications</a>, letting you specify translation strings and providing hooks for language-specific functionality.</p>
+ <p>Django has full support for <a href="http://docs.djangoproject.com/en/{{ RECENT_RELEASE }}/topics/i18n/">multi-language applications</a>, letting you specify translation strings and providing hooks for language-specific functionality.</p>
</div>
<!-- END #content-secondary -->
{% endblock %}
@@ -40,8 +40,8 @@ <h2 class="deck">Django is a high-level Python Web framework that encourages rap
<p>Open source, <a href="http://code.djangoproject.com/browser/django/trunk/LICENSE">BSD license</a></p>
<h2>Documentation</h2>
<ul class="linklist">
- <li><a href="http://docs.djangoproject.com/en/dev/intro/install/">Installation guide</a></li>
- <li><a href="http://docs.djangoproject.com/en/dev/intro/tutorial01/">Tutorial</a></li>
+ <li><a href="http://docs.djangoproject.com/en/{{ RECENT_RELEASE }}/intro/install/">Installation guide</a></li>
+ <li><a href="http://docs.djangoproject.com/en/{{ RECENT_RELEASE }}/intro/tutorial01/">Tutorial</a></li>
<li><a href="http://docs.djangoproject.com/">Full index...</a></li>
</ul>
<h2>Sites that use Django</h2>
Please sign in to comment.
Something went wrong with that request. Please try again.