Forums

Django Model Data not coming through on the Tempate, Why?

I am having this really weird problem. On the Django development server {{site}} in the template as a string passed by a view. But when I upload to the pythonanywhere server it comes out blank on the template.

Yet the forms are okay and are displayed correctlyl..

i don't know who to ask about this..

this is the code im passing to the template..

def base0(request):
    login_form = LoginForm()
    referee_form = RefereeKeyForm()
    site = 'blah'
    return render(request ,'base0.html', {'referee_form':referee_form, 'site':site})

That's strange, it should definitely work on pretty much any version of Django. Can I take a look at the code? We can see it from our side, but we always ask permission first. If I can look, just let me know which file is causing the problem.

I just deleted the, db.db and ran ./manage.py syncdb and it works fine now. Sorry for the trouble. Thanks anyway :)

How odd! Glad it works now, anyway :-)