Alex
minute
sufiyan
Sure brother and thank you for giving me you're valuable time!!
sufiyan
I have checked the admin my owner is listed to all the projects also
Alex
ок
sufiyan
what should i do?
Alex
<p>
<a class="project__author" href="{% url 'user-profile' pk=project.owner %}">By {{project.owner.name}}</a>
</p>
Alex
or
<form action="{% url 'user-profile' pk=project.owner %}" method="POST">
{% csrf_token %}
<button style="--clr:#4cd80f" type="submit">By {{project.owner.name}}</button>
</form>
sufiyan
i need to pass the owner id
sufiyan
so it can redirect to the profile/<str:pk>
Alex
This is clear
Now I'll show you how I did it
sufiyan
if you need anything i can share
sufiyan
sufiyan
I tried this but it's still not redirecting me to profile/id
Alex
https://linkode.org/#dXDTJPN3ScyYiWTHXVQ6T1
Alex
maybe <int:pk> ?
sufiyan
sufiyan
I'm not able to fully understand you're code
sufiyan
Any suggestion what should i do, because i'm not able to understand why I'm getting this error
sufiyan
For an example if remover href and fetch the id like this my pagge get render and id is showing<p>
<a class="project__author" >By {{project.owner.id}}</a>
</p>
Rajat
Rajat
sufiyan
But I have already included both app urls in admin url
sufiyan
sufiyan
it's not getting fixed
sufiyan
Apart from this everything is working fine
Alda
Use the app name, { url 'app_name:url' project.owner_id} defined your urls file.
Alexey
Hello, I have project with postgresql, how can I use another schema not default - public?
The Inspired
Alexey
The Inspired
no... if you are using postgresql, there is a 'NAME' option inside the 'DATABASES' dictionary.
Check the documentation for details
Alexey
Ok, thx
EdisonMolina
can i implement push notifications from django to android?
Charly
EdisonMolina
EdisonMolina
functionality with firebase
Charly
Sunil
What will be the good resources to follow for learning Django channels
cj
Avii
Avii
iplogger
why there are so many questions about the basics of Django and in most cases even about its documentation. wouldn't it be easier to look at django topics before asking a question?
Nav
Can anyone explain to me how to use the update function in django
iplogger
Shilpa
Django
Doragonsureiyā
Hello
Hey! I try to show a list of products (this object ). The second object is hold email and the product object as manytomany field . How to work with this field when it’s manytomany define in models ??
Aakash
Can anyone please help me. How can I solve these
As a user
- I can signup either as Librarian and Member using username password
- I can login username/password and get jwt access token
As a Librarian
- I can add, update, and remove books from the system
- I can add update, view and remove member from system
As a Member
- I can view, borrow and return available books
- Once a book is borrowed, its status will change to Borrowed
- Once a book is returned, its status will change to Available
- I can delete my account.
All I want is how can I create a models.py for these scenario. Rest of the part I can manage. Please help guys
$_u_d_d_y
Alex
Hi! Got a question: is it necessary for me as a backend dev learning django to know jinja, or it's frontend part?
Alex
Thank you)
Alex
Ugh, okay, got it, thanks!
Hello
How to use queryset when you send it to HTML? (the template )
Hello
It doesn't work
Charly
Alex
I haven't really learnt django yet, but if there's anything I know about programming is that official snippets must work :)
Hello
I try to get a list of products that are on the same row with a specific user email. So I did try and except if I got a DoesNotExist error. And it's all the time go to the error
Charly
$_u_d_d_y
$_u_d_d_y
it does not generate an error .... it just returns an empty list
Hello
Can I send here the code? Legally?
Hello
this is my func in the views .
Hello
Ive object on models that call FavoriteList
Hello
and also a object that call Product . I connect them by the ManytoMany field
Hello
someone understand why the func 'productlist' not working?
Ali
Hello
it always enter to the excpet block , also if the object exsit
Hello
so I dont know how to solve it...
Hello
this is the model - https://dpaste.org/KtqEf
Hello
https://dpaste.org/qWAEE this is part of the views
Hello
em is a global var that is the input from the user . I keep this from the second func ‘ask_productlist’