Django for Designers/CRUD: Difference between revisions

imported>Aldeka
imported>Aldeka
Line 374:
Reload your development server and your web page, and try creating a bookmark. It should appear right away on the page now!
 
Try submitting the form with a tag but no URL. <div class="instructor">Nothing happens, right?Eek.</div> IfWe you checksee the serverbrowser logtry into yourrender terminalthe entire page inside the window,page--because youwe'llre seeredirecting back to the annormal errorindex message:view!
 
Eek. Our index view doesn't properly handle the case where the request is a POST, but the form doesn't validate, and Django noticed this and returned an error. Let's fix this by editing the ''index'' function in ''views.py'' again:
<source lang="bash">
ValueError: The view bookmarks.views.index didn't return an HttpResponse object.
</source>
 
Eek. Our index view doesn't handle the case where the request is a POST, but the form doesn't validate, and Django noticed this and returned an error. Let's fix this by editing the ''index'' function in ''views.py'' again:
 
<source lang="python">
Anonymous user