I have a Post model that requires a certain category before adding to the database, and I want the category to be generated automatically. When you click the addPost button, you get to another page, and therefore the category will be determined by the acceptance of part of the previous page URL.
Is there a way to get the previous page url?
thanks
Edit: I added my AddPost button here.
<aside class="addPost"> <article> <form action="/Forum/addPost"> <input type="submit" name="submit" value="Add Post"/> </form> </article> </aside>
python url django
tryingtolearn
source share