Hello Kyle,
I have no clue of what's happening at your Home object request but you
have two urls sharing the same name. You can allow the two urls in the
same pattern like this:
url(r'^(index\.html/)?$', views.index, name='index'),
Here, the group (index\.html/) can be found once or not at all thanks to
the '?'.
Best Regards,
M
Le 14/11/2014 05:33, RLF_UNIQUE a écrit :
> Did some more testing, seems like it's completely skipping the views.py,
> and going straight to loading index.html, any way to force it to
> dynamically load?
>
> On Thursday, November 13, 2014 9:37:27 PM UTC-6, RLF_UNIQUE wrote:
>> Hello,
>>
>> I'm having this weird situation where if you go to my website like this
>>
www.mywebsite.com
>> vs like this
>>
www.mywebsite.com/index.html
>>
>> I'm getting different values.
>>
>> *urls.py*
>> urlpatterns += patterns('',
>> url(r'^index.html$', views.index,
>> name='index'),
>> url(r'^$', views.index,
>> name='index'),
>> )
>>
>> *view.py*
>> def index(request):
>> home_list = Home.objects.all()[:1]
>>
>>
>>
>> context = {'home_list': home_list}
>> return render_to_response('index.html', context)
>>
>> *index.html*