So in my template, I have the following code:
<span class="state-txt">{{ state }}</span>
In my views.py, it's handled with the following if/else loop:
if user is not None:
if user.is_active:
login(request, user)
state = "You're successfully logged in!"
return render_to_response('uc/portal/index.html', {'state':state, 'username':username}, context_instance=RequestContext(request))
else:
state = "Your account is not active, please contact UC admin."
else:
state = "Your username and/or password were incorrect."
Essentially, it's working fine at the moment but I want each state to be able to contain different <img> tags, but when I just type state = "<img src="some.jpg"> Your username and/or password were incorrect." The html doesn't render correctly. Is there some way to do what I'm trying to do in Django, or am I barking up the wrong tree?
:)