Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
from feincms.module.blog.models import Entry
urlpatterns = patterns(
'',
url(
r'^(?P\d+)/',
generic.DetailView.as_view(
queryset=Entry.objects.all(),
),
name='blog_entry_detail'
),
url(
r'^$',
generic.ListView.as_view(
queryset=Entry.objects.all(),
),
name='blog_entry_list'
),
from feincms.module.blog.models import Entry
urlpatterns = [
url(
r'^(?P\d+)/',
generic.DetailView.as_view(
queryset=Entry.objects.all(),
),
name='blog_entry_detail'
),
url(
r'^$',
generic.ListView.as_view(
queryset=Entry.objects.all(),
),
name='blog_entry_list'
)
def create_entries(self):
entry = self.create_entry()
Entry.objects.create(
published=True,
title='Something 2',
slug='something-2',
language='de',
translation_of=entry)
Entry.objects.create(
published=True,
title='Something 3',
slug='something-3',
language='de')
def create_entries(self):
entry = self.create_entry()
Entry.objects.create(
published=True,
title='Something 2',
slug='something-2',
language='de',
translation_of=entry)
Entry.objects.create(
published=True,
title='Something 3',
slug='something-3',
language='de')
from django.conf.urls import patterns, url
from django.views import generic
from feincms.module.blog.models import Entry
urlpatterns = patterns(
'',
url(
r'^(?P\d+)/',
generic.DetailView.as_view(
queryset=Entry.objects.all(),
),
name='blog_entry_detail'
),
url(
r'^$',
generic.ListView.as_view(
queryset=Entry.objects.all(),
),
name='blog_entry_list'
),
from django.conf.urls import url
from django.views import generic
from feincms.module.blog.models import Entry
urlpatterns = [
url(
r'^(?P\d+)/',
generic.DetailView.as_view(
queryset=Entry.objects.all(),
),
name='blog_entry_detail'
),
url(
r'^$',
generic.ListView.as_view(
queryset=Entry.objects.all(),
),
name='blog_entry_list'
)
from django.conf.urls import patterns, url
from django.views import generic
from feincms.module.blog.models import Entry
urlpatterns = patterns(
'',
url(r'^(?P\d+)/', generic.DetailView.as_view(
queryset=Entry.objects.all(),
), name='blog_entry_detail'),
url(r'^$', generic.ListView.as_view(
queryset=Entry.objects.all(),
), name='blog_entry_list'),
)
from django.conf.urls import patterns, url
from django.views import generic
from feincms.module.blog.models import Entry
urlpatterns = patterns(
'',
url(r'^(?P\d+)/', generic.DetailView.as_view(
queryset=Entry.objects.all(),
), name='blog_entry_detail'),
url(r'^$', generic.ListView.as_view(
queryset=Entry.objects.all(),
), name='blog_entry_list'),
)
def children(self, page, **kwargs):
for entry in Entry.objects.all():
yield PagePretender(
title=entry.title,
url=app_reverse(
'blog_entry_detail', 'blog_urls', kwargs={'pk': entry.id}),
level=page.level + 1,
)