Skip to content
Advertisement

I want to get data from the user without them using a form

I’m currently working on a website which posts a web novel. I need a system to make user send the chapter id and get the chapter which uses that id maybe like:

JavaScript

I don’t want to create a specific html page for every novel chapter that we posts and use a system to maybe get the links “/chapter/id” part or send the id when clicked to an element and pull data from the database using the id given. I searched up in the net and couldn’t find anything useful.

Note: The database is like this;

JavaScript

Advertisement

Answer

You should be able to use a URL dispatcher like you mentioned in your description

JavaScript

The ID entered there can essentially be used to get the associated chapter in views.py

JavaScript

Then you can render them in your HTML template

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement