Re: working fine with sqllite but not showing result in mysql

2019-01-18 Thread tribhuvan kishor
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

Re: working fine with sqllite but not showing result in mysql

2019-01-18 Thread tribhuvan kishor
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', >

Re: working fine with sqllite but not showing result in mysql

2019-01-14 Thread Danylo K.
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

Re: working fine with sqllite but not showing result in mysql

2019-01-14 Thread Danylo K.
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

Re: working fine with sqllite but not showing result in mysql

2019-01-14 Thread Alex Kimeu
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

Re: working fine with sqllite but not showing result in mysql

2019-01-14 Thread tribhuvan kishor
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

Re: working fine with sqllite but not showing result in mysql

2019-01-14 Thread Alex Kimeu
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