Django for Designers/CRUD: Difference between revisions
Content added Content deleted
imported>Aldeka |
imported>Aldeka |
||
Line 100: | Line 100: | ||
Right now, if you try to submit bookmarks with this form, it'll just reload the page. That's because we haven't told the view to do anything with any form data that gets sent to it! |
Right now, if you try to submit bookmarks with this form, it'll just reload the page. That's because we haven't told the view to do anything with any form data that gets sent to it! |
||
Let's edit ''views.py''. First, let's add |
Let's edit ''views.py''. First, let's add a redirect import to the top (keeping the existing imports there): |
||
<source lang="python"> |
<source lang="python"> |
||
from django.shortcuts import redirect |
from django.shortcuts import render, get_object_or_404, redirect |
||
</source> |
</source> |
||