All Questions
28 questions
0
votes
1
answer
28
views
How to resolve possibly conflicting urls in webpage rendering
When I try to load a page, I get another page instead...
I try to load a page called wikiPage as shown in my urls description that follows, but I get another url patterns linking to a view called ...
-2
votes
1
answer
57
views
im working on a django project as a total beginner . block content end block is not working and the browser renders raw code
here is my directory ![workspace]
.core
---templates
-- core
- base.html
-frontpage.html
![base.html]
<title>{% block title %}{% endblock %}Djangochat</title>
![frontpage.html]
{% ...
1
vote
1
answer
41
views
How can I display multiple render calls on webpage?
I'm getting started with the Django framework but can't figure out how to have multiple render calls from the views python file appear on my webpage.
Within the url python file, I tried adding a new ...
1
vote
1
answer
80
views
Django views.py Exception Value: Could not parse the remainder:
I get an Exception Value error:
Could not parse the remainder: '(column)' from 'item.get(column)'
views.py:
def home(request):
position = DjangoEmail.objects.get(Email=request.user).Position
...
2
votes
0
answers
765
views
Django render_to_string not including certain context variables when rendering
I have searched here and not found anything so far that helps.
When using render_to_string and providing context variables, one of these variables gets used by the template as expected, however, ...
0
votes
1
answer
509
views
Django button click rendered View twice
i am really new with Django and still learning. I will try to explain my problem as well as possible. On a button click in my template i want to work with some values & variables:
<form method='...
1
vote
1
answer
39
views
An issue making addition through models.py making a simple calculation
Hello guys im practicing on django by now developping a simple expense tracker for a main project expample: Buying a flippable car for X amount and adding all the other expenses to get a single total.
...
0
votes
1
answer
524
views
(React and Django) Displaying products on the homepage is working fine, but when I click on any particular product, then the rendering is wrong
this post is the third part of the following series - (You can skip these first two parts, however - it can serve as a reference)
A large number of problems with React, Django, Django REST and Axios
...
1
vote
1
answer
47
views
How to render to template with dropdownbox in django?
I'm a beginner Django. And I got a problem with rendering to the template.
I have a model(models.py) which has the class "FuelInfo"; includes ForeignKey.
from django.db import models
class ...
0
votes
0
answers
261
views
Why aren't my custom routes in django recognized?
I'm trying this Django tutorial
https://www.javatpoint.com/django-crud-application
Here is how my view is defined:
def show(request):
employees = Employee.objects.all()
return render(request, &...
1
vote
1
answer
2k
views
How to get a string from HttpResponse or render to a string in Python/Django?
Currently, I have the following code:
from django.shortcuts import render
# ...
def prerender(js: json) -> str:
# ...
response = render(None, 'partial/name.html', context)
return ...
1
vote
1
answer
116
views
Django - How can I render a value from views that matches a different value?
I have two lists: one consists of user added flashcards, which have a question and an answer field (from my Flashcard model). The other consists of words in a song. Then I've made a new list that ...
0
votes
1
answer
150
views
Display just 3 records instead of all in django
I want to display three records and randomly three record from model. But if I do this,
{% for service in services.all %}
{{service.title}}<br/>
{{service.summary}}<br/>...
0
votes
2
answers
347
views
How can I make Django render in the browser?
I'm trying to utilize Django forms.ModelForm function. However, I can not get it to render in the browser (Firefox and Chrome tested). In both browser inspection of code, the table\form does not show ...
0
votes
2
answers
802
views
django widget tweaks form control not action
when Making django board, I met the problem.
django version is 3.
I wanted form like this. but my code can't alert me "This field is required"
But widget tweaks form-control wasn't working.
which ...