Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Replace the download flatpage with a real view.

  • Loading branch information...
commit f16239c3e9dbb6425e86a85942c16e3e9cdfc177 1 parent 2dc3222
@aaugustin aaugustin authored
View
1  django_www/urls.py
@@ -48,7 +48,6 @@
url(r'^sitemap\.xml$', cache_page(60 * 60 * 6)(sitemap_views.sitemap), {'sitemaps': sitemaps}),
url(r'^weblog/', include('blog.urls')),
- url(r'^download$', flatpage, {'url': 'download'}, name="download"),
url(r'^download/', include('releases.urls')),
url(r'^svntogit/', include('svntogit.urls')),
url(r'', include('legacy.urls')),
View
5 releases/urls.py
@@ -2,8 +2,9 @@
from django.conf.urls import patterns
-from .views import download_redirect
+from .views import index, redirect
urlpatterns = patterns('',
- (r'^([0-9a-z_.-]+)/(tarball|checksum|egg)/$', download_redirect),
+ (r'^$', index),
+ (r'^([0-9a-z_.-]+)/(tarball|checksum|egg)/$', redirect),
)
View
8 releases/views.py
@@ -1,12 +1,16 @@
from __future__ import absolute_import, unicode_literals
from django.http import HttpResponsePermanentRedirect, Http404
-from django.shortcuts import get_object_or_404
+from django.shortcuts import get_object_or_404, render
from .models import Release
-def download_redirect(request, version, kind):
+def index(request):
+ return render(request, 'releases/download.html')
+
+
+def redirect(request, version, kind):
release = get_object_or_404(Release, version=version)
try:
redirect_url = release.get_redirect_url(kind)
View
7 templates/base_download.html
@@ -1,7 +0,0 @@
-{% extends "base_2col.html" %}
-
-{% block sectionid %}download{% endblock %}
-
-{% block title %}Download{% endblock %}
-
-{% block billboard %}<h2>Download</h2>{% endblock %}
View
40 templates/flatpages/download.html → templates/releases/download.html
@@ -1,9 +1,43 @@
-{% extends "base_download.html" %}
+{% extends "base_2col.html" %}
+
+{% block sectionid %}download{% endblock %}
+
+{% block title %}Download{% endblock %}
+
+{% block billboard %}<h2>Download</h2>{% endblock %}
{% block content %}
-<h1>{{ flatpage.title }}</h1>
+<h1>How to get Django</h1>
+
+<p>Django is available open-source under the <a href="https://github.com/django/django/blob/master/LICENSE">BSD license</a>. It requires Python version 2.6.5 or higher, but it has no dependencies on other Python libraries. There are several ways you can get it:</p>
+
+<h2>Option 1. Get the latest official version</h2>
+
+<p>The latest official version is 1.5. You can get it by direct download:
+
+<p>First, download <a href="https://www.djangoproject.com/download/1.5/tarball/">Django-1.5.tar.gz</a> (<a href="https://www.djangoproject.com/download/1.5/checksum/">checksums</a>). Then:</p>
+
+<pre class="literal-block"><code>tar xzvf Django-1.5.tar.gz
+cd Django-1.5
+sudo python setup.py install</code></pre>
+
+<p>You can also use <a href="http://www.pip-installer.org/en/latest/">pip</a>:
+
+<pre class="literal-block"><code>pip install Django==1.5</code></pre>
+
+<h2>Option 2. Get the latest development version</h2>
+
+<p>The latest and greatest Django version is the one that's in our Git repository (our revision-control system). Get it using this shell command, which requires <a href="http://git-scm.com/">Git</a>:</p>
+
+<p class="literal-block"><code>git clone https://github.com/django/django.git</code></p>
+
+<p>You can also download <a href="https://github.com/django/django/zipball/master">a zipped archive</a> of the development version.</p>
+
+<h2>After you get it</h2>
+
+<p>See the <a href="https://docs.djangoproject.com/en/stable/intro/install/">installation guide</a> for further instructions. Make sure you read the documentation that corresponds to the version of Django you've just installed.</p>
-{{ flatpage.content }}
+<p>And be sure to sign up for the <a href="/r/django-users/">django-users mailing list</a>, where other Django users and the Django developers themselves all hang out to help each other.</p>
{% endblock %}
{% block content-related %}
Please sign in to comment.
Something went wrong with that request. Please try again.