David H
.
yes
It’s no.
You don’t have a url named dashboard in there. Add it or remove it from the template if you don’t need it.
David H
.
🧚♂️
David H
Okey, imagine a simple case in which you have an init and end date. So, now, you are requested to store the time range between the dates in each querystet object's.
(It's not a real use case, only for this explanation)
David H
The options I said are good choices, but I don't really know it there is a better one
David H
.
LOGIN_REDIRECT_URL = 'dashboard'
That’s not defining a url name in urls.py, that’s called defining a variable in settings.py
You didn’t do the urls.py part that’s why you’re getting that error.
Once again if you don’t need that url just remove it from the template where you’re calling that url.
David H
Annotate 'delegates' the processing in the SQL engine and @property in your own server
.
01110010
How can I host Django on alwaysdata hosting platform , their docs ain’t helping much
01110010
It’s just don’t work
01110010
Thanks for your help tho,
I’m gonna begin the process again and figure out what went wrong
01110010
What website ?
Bekhruzbek
Write the name of a site that teaches how to work with media files in Django
Charly
Bekhruzbek
Mh
How to pass variables between views in django
01110010
using sessions
01110010
request.session
Mh
Can you give the syntax
Mh
Ok
01110010
Here
request.session["has_commented"] = True
There’s more here
https://docs.djangoproject.com/en/4.2/topics/http/sessions/
SATISH
Anyone can solve my problem django related
SATISH
If I login button click then only Login person data show
SATISH
Charly
How
Filter in the view by request.user
SATISH
def loginpage(request):
if request.method=='POST':
username = request.POST.get('username')
password1 = request.POST.get('password1')
user=authenticate(request,username=username,password=password1)
if user is not None:
login(request,user)
return redirect('select')
else:
return HttpResponse("Username and Password Incorrect")
return render(request,'login.html')
SATISH
see the code
José Jorge
SATISH
After Login i mention Your all data show (only login Person) or and write data Two button mention
Charly
SATISH
def selectpage(request):
return render(request,'select.html')
SATISH
def displaypage(request,id):
data = ArticalData.objects.get(id=id)
return render (request,'display.html',{'data':data})
SATISH
Charly
Charly
José Jorge
ya i mention but not got ans
You need filter the data by the login user just Like Charly Román tell you, after that you Can show the data.
Charly
José Jorge
You Can use Django Forms to improve your code and make that more efficency
José Jorge
Django have a model form for user
SATISH
Reverse for 'display' with no arguments not found. 1 pattern(s) tried: ['display/(?P<id>[^/]+)\\Z']
Charly
José Jorge
SATISH
<a href="{% url 'display' %}" class="btn btn-outline-info btn-lg ml-5">Display All Articals</a>
here any changes
SATISH
path('display/<id>',views.displaypage,name='display'),
and Url
José Jorge
When you want show specifies data of a user you need have a identificator. When you go to show that data you Filter all data by the identificator(flag). The identificator the most times will Be the id of the user.
Bekhruzbek
Watch a video tutorial on how to post a video pls
Vorke
Is it possible to change user groups from Django admin dashboard?
Param
Tamerlan
Who can give advice cms for content management?
Tamerlan
Doragonsureiyā
In django
Adding the word Django to your Off-Topic question doesn't magically turn it to a Django related question, so move to @PythonOfftopic group and ask there.
Masoud
def delete_number(request, contact_id):
contact_delete = Contact.objects.get(id=contact_id)
contact_delete.delete()
return redirect('contacts:list')
David H
Hi, I have a question!
Is it possible to iterate in parallell over a queryset in django?
Masoud
Shahzodbek
Assalam alaykum guys.
What are the most secure authentication for django. Currently, I am using rest framework jwt authentication but I am not quite sure if it is safe.
Mirco
Shahzodbek
I am using django jwt auth in my front end application. As you might know, jwt token holds user information and it is visible in browser. Therefore, I am kinda worried about it, or is that OK?
Mirco
Shahzodbek
Mirco
Doragonsureiyā
Dullah
Hi
I have a django crud application working just fine, what i want is to add the delete confirmation form as a pop modal to the list view (im using function based view) without using bootstrap.