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*
> {% extends 'base.html' %}                                                 
>                                                                             
>                                                                             
>       
>   {% block content %}
>   test
>       {% for home in home_list %}
>       {{home.description|safe}}
>       {% endfor %}
>   {% endblock %}
>
> when I just go to mysite.com, I only get "test", whereas when I go to 
> mysite.com/index.html, I get "test" as well as the home variable.
>
> It almost seems like something isn't loading in the proper order?
>
> Thanks
> Kyle
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/66e05589-6e70-4fea-9060-70dab7f6fefb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to