Various bug fixes and one new feature for version 0.4.2

This commit is contained in:
Benjamin Liles
2011-02-21 15:27:10 -06:00
parent 44920b813f
commit 830bce2918
8 changed files with 29 additions and 9 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ develop =
[django]
recipe = djangorecipe
version = 1.2.1
version = 1.2.5
settings = settings
eggs = ${buildout:eggs}
test = djangopypi
+2 -2
View File
@@ -1,8 +1,8 @@
{% extends "base_site.html" %}
{% block content %}
<form method="post" action="">
<form method="post" action="">{% csrf_token %}
{{form.as_p}}
<input type="submit" value="Login">
<input type="submit" value="Login" />
</form>
{% endblock %}
@@ -2,7 +2,8 @@
{% block content %}
<h1>Register</h1>
<form method="post" action="">
<form method="post" action="">{% csrf_token %}
{{form.as_p}}
<input type="submit" value="Register">
<input type="submit" value="Register" />
</form>
{% endblock %}
+2 -1
View File
@@ -1,10 +1,11 @@
History
=======
0.4.2 (2011-02-08)
0.4.2 (2011-02-21)
------------------
* Added CSRF support for Django>=1.2
* Added conditional support to proxy packages not indexed
0.4.1 (2010-06-17)
------------------
+10
View File
@@ -97,3 +97,13 @@ if not hasattr(settings,'DJANGOPYPI_ACTION_VIEWS'):
"submit": distutils.register_or_upload, #``register`` command
"list_classifiers": distutils.list_classifiers, #``list_classifiers`` command
}
""" These settings enable proxying of packages that are not in the local index
to another index, http://pypi.python.org/ by default. This feature is disabled
by default and can be enabled by setting DJANGOPYPI_PROXY_MISSING to True in
your settings file. """
if not hasattr(settings, 'DJANGOPYPI_PROXY_BASE_URL'):
settings.DJANGOPYPI_PROXY_BASE_URL = 'http://pypi.python.org/simple'
if not hasattr(settings, 'DJANGOPYPI_PROXY_MISSING'):
settings.DJANGOPYPI_PROXY_MISSING = False
+1 -1
View File
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from django.conf.urls.defaults import patterns, url, include
from django.conf.urls.defaults import patterns, url
from djangopypi.feeds import ReleaseFeed
urlpatterns = patterns("djangopypi.views",
+9 -1
View File
@@ -1,5 +1,6 @@
from django.conf import settings
from django.db.models.query import Q
from django.http import Http404, HttpResponseRedirect
from django.forms.models import inlineformset_factory
from django.shortcuts import get_object_or_404, render_to_response
from django.template import RequestContext
@@ -27,7 +28,14 @@ def details(request, package, **kwargs):
def simple_details(request, package, **kwargs):
kwargs.setdefault('template_name', 'djangopypi/package_detail_simple.html')
return details(request, package, **kwargs)
try:
return details(request, package, **kwargs)
except Http404, e:
if settings.DJANGOPYPI_PROXY_MISSING:
return HttpResponseRedirect('%s/%s/' %
(settings.DJANGOPYPI_PROXY_BASE_URL.rstrip('/'),
package))
raise e
def doap(request, package, **kwargs):
kwargs.setdefault('template_name', 'djangopypi/package_doap.xml')
+1 -1
View File
@@ -1,2 +1,2 @@
[bdist_rpm]
doc_files = AUTHORS CHANGELOG LICENSE README TODO
doc_files = AUTHORS Changelog LICENSE README TODO