Commit 48acdc13 authored by Adrián Ribao's avatar Adrián Ribao

remove patterns from url

parent 06c02b28
Pipeline #1580 passed with stage
in 1 minute and 27 seconds
# -*- coding: utf-8 -*-
from django.conf.urls import patterns
from django.contrib import admin
from django.db.models import Count
from django.utils.translation import ugettext_lazy as _
......@@ -95,13 +94,13 @@ class EmailTemplateAdmin(admin.ModelAdmin):
def get_urls(self):
urls = super(EmailTemplateAdmin, self).get_urls()
my_urls = patterns(
my_urls = [
'',
(r'^add/$',
self.admin_site.admin_view(CreateTemplateView.as_view())),
(r'^(?P<pk>\d+)/change/$',
self.admin_site.admin_view(UpdateTemplateView.as_view()))
)
]
return my_urls + urls
......
# -*- coding: utf-8 -*-
from django.conf.urls import url, patterns
from cartero.views import (PreviewTemplate, SaveTemplateData, UnsubscribeView, GotoView,
MailTrackView)
from django.conf.urls import url
from cartero.views import (
PreviewTemplate, SaveTemplateData, UnsubscribeView, GotoView,
MailTrackView
)
urlpatterns = patterns(
'',
urlpatterns = [
url(r'^template-preview/(?P<pk>\d+)/$',
PreviewTemplate.as_view(),
name='preview_template'),
......@@ -24,4 +25,4 @@ urlpatterns = patterns(
url(r'^track/(?P<mailtrack_id>.+)\.png$',
MailTrackView.as_view(),
name='track'),
)
]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment