from django.urls import path
from . import views
app_name = 'blog'
urlpatterns = [
# post views
# path('', views.post_list, name='post_list'),
path('', views.PostListView.as_view(), name='post_list'),
path('',
views.post_detail,
name='post_detail'),
]
On Fr
its the shortcut i did that it is working. but the issue is still the same.
it just a bypass :P
On Tue, Jan 15, 2019 at 2:31 AM Danylo K. wrote:
> if you change the code to this, it will work:
>
>post = get_object_or_404(Post, slug=post,
> status='published',
>
if you change the code to this, it will work:
post = get_object_or_404(Post, slug=post,
status='published',
publish__year=year)
# publish__month=month,
# publish__day=day)
On Mo
I have the same issue. In MySQL, search works fine by the *year part*, but
not by the *month* and *day* *parts*.
Cheers!
On Mon, Jan 14, 2019 at 1:54 PM Alex Kimeu wrote:
> Have you configured MySQL correctly?
>
> On Mon, Jan 14, 2019 at 9:07 PM tribhuvan kishor <
> tribhuvankishor...@gmail.com
Kindly post your urls mappings.
On Mon, Jan 14, 2019 at 10:22 PM tribhuvan kishor <
tribhuvankishor...@gmail.com> wrote:
> yes all things are working fine like post list are working fine
>
> from django.shortcuts import render, get_object_or_404
> from django.core.paginator import Paginator, Empt
yes all things are working fine like post list are working fine
from django.shortcuts import render, get_object_or_404
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.views.generic import ListView
from .models import Post
def post_list(request):
object_lis
Have you configured MySQL correctly?
On Mon, Jan 14, 2019 at 9:07 PM tribhuvan kishor <
tribhuvankishor...@gmail.com> wrote:
> this view is retrieving data with SQlite but not fetching data in
> MySQL saying no data found.
>
>
> def post_detail(request, year, month, day, post):
> post = get_o
7 matches
Mail list logo