How to render data from populated database (no user input) to html

2020-01-19 Thread nmaxbe...@gmail.com
I would like to render data from a populated database into a HTML (homepage_view). I am not sure if I create a GET method from the database (and if so how) or use (fix) the code listed below. The ultimate outcome is to have a table with three columns (models.py) with six rows. Note: In the

Re: How to render data from populated database (no user input) to html

2020-01-19 Thread maninder singh Kumar
Your path is as follows : urlpatterns = [ path('', views.homepage_view), but your view file is def currentReps_view(request) Make the change in the urls.py ] [image: --] Maninder Kumar [image: http://]about.me/maninder.s.kumar On Mon,

Re: How to render data from populated database (no user input) to html

2020-01-28 Thread Suraj
On Monday, January 20, 2020 at 11:59:01 AM UTC+5:30, nmax...@gmail.com wrote: > > I would like to render data from a populated database into a HTML > (homepage_view). I am not sure if I create a GET method from the > database (and if so how) or use (fix) the code listed below. > > The ultimat

Re: How to render data from populated database (no user input) to html

2020-01-28 Thread maninder singh Kumar
{% csrf_token %} views -- formView (request): if request.method == "GET" and 'q' in request.method: - your view code --- return render(request, template_name, context = {'text' : *database_text, ... . ., ., , ,}* HTML (use bootstrap i