Changeset - 26d6d2c56c09
[Not reviewed]
0 3 0
Nicola Busanello and beba ,seba.guerzoni@gmail.com - 7 years ago 2016-12-03 16:20:22
sudo@inbitcoin.it
DJPYD-7: Updated URL configuration for application and test project to be compatible with Django 1.8 and higher. Added explicit version dependency for Django.
3 files changed with 7 insertions and 10 deletions:
0 comments (0 inline, 0 general)
django_pydenticon/urls.py
Show inline comments
 
# Django imports.
 
from django.conf.urls import patterns, url
 
from django.conf.urls import url
 

	
 
# Application imports.
 
from .views import image
 

	
 
urlpatterns = patterns(
 
    'django_pydenticon.views',
 

	
 
urlpatterns = [
 
    # View for rendering an identicon image.
 
    url(r'^image/(?P<data>.+)$', image, name="image")
 
    )
 
    ]
 

	
 
def get_patterns(instance="django_pydenticon"):
 
    """
 
    Generates URL patterns for Django Pydenticon application. The return value
 
    of this function can be used directly by the django.conf.urls.include
 
    function.
setup.py
Show inline comments
 
import os
 
from setuptools import setup, find_packages
 

	
 
README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
 
INSTALL_REQUIREMENTS = ["pydenticon", "django"]
 
INSTALL_REQUIREMENTS = ["pydenticon", "django>=1.8.0"]
 
TEST_REQUIREMENTS = []
 

	
 
# allow setup.py to be run from any path
 
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
 

	
 
setup(
testproject/testproject/urls.py
Show inline comments
 
from django.conf.urls import patterns, include, url
 
from django.conf.urls import include, url
 

	
 
from django.contrib import admin
 
admin.autodiscover()
 

	
 
# Django Pydenticon.
 
import django_pydenticon.urls
 

	
 
urlpatterns = patterns(
 
    '',
 
urlpatterns = [
 
    # Examples:
 
    # url(r'^$', 'testproject.views.home', name='home'),
 
    # url(r'^blog/', include('blog.urls')),
 

	
 
    url(r'^admin/', include(admin.site.urls)),
 

	
 
    # URLs for Django Pydenticon.
 
    url(r'^identicon/', include(django_pydenticon.urls.get_patterns())),
 
)
 
]
0 comments (0 inline, 0 general)