I need to know how to optimize this?

2020-06-13 Thread Himanshu Pharawal
# This code is use for match the interests of current user to saved SponsoredBook-keywords # If same book match with two keywords we increase it's priority by increasing it's points and finally sort them on the basis of their points #Please reach out to me if you need more information on the sam

I need to know how to optimize this?

2020-06-13 Thread Himanshu Pharawal
#This code is use to match current user interests to SponsoredBook.keywords and if it matches more than one keyword we increase it's points and finally we sort this on the basis of points and pass it to the templates. #For a small amount of data this works fine as will data will grow this is goi

Regarding sending the link to reset the password

2020-06-13 Thread Devendra reddy
Hi to all I am working on the api side using python django.now i have the one requirement. i want to send the link to reset the password while clicking on the forgot password link on the ui. from api side i want to send the mail by the link of reset password to the respected user.please help me

Re: Regarding sending the link to reset the password

2020-06-13 Thread Agnese Camellini
I have set a temporary password when they give me the email. By the update on the user i check in the password field if there is the temporary password and if it is there i send the reset link by email. I have an api with django rest framework and django. Agnese Il Sab 13 Giu 2020, 20:44 Devendra

How to add a user ratings feature in djnago application?

2020-06-13 Thread learn code
Hello Everyone, Can anyone tell me how to add a star rating feature in Django application? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr

Re: How to add a user ratings feature in djnago application?

2020-06-13 Thread Rupesh Dahal
You can save rating on database and show them with the help of JS. On Sun, Jun 14, 2020 at 12:52 AM learn code wrote: > Hello Everyone, > > Can anyone tell me how to add a star rating feature in Django application? > > -- > You received this message because you are subscribed to the Google Group

Re: How to add a user ratings feature in djnago application?

2020-06-13 Thread learn code
Thank you for your reply. Can you tell me more details how can I do that? On Sat, Jun 13, 2020, 12:21 PM Rupesh Dahal wrote: > You can save rating on database and show them with the help of JS. > > On Sun, Jun 14, 2020 at 12:52 AM learn code > wrote: > >> Hello Everyone, >> >> Can anyone tell

Django - How works different level users and its authorizations

2020-06-13 Thread Jayakumar Selvan
Hi Friends, I need some information about Django. Basically i'm PHP developer. nowadays moving to python with micro services. But i need to know how to handle user authorization in Django. For example is, The site have two different users logins. One for front users and site administrators use

Re: Regarding sending the link to reset the password

2020-06-13 Thread Kasper Laudrup
Hi Devendra, On 13/06/2020 20.43, Devendra reddy wrote: Hi to all  I am working on the api side using python django.now i have the one requirement. i want  to send the link to reset the password while clicking on the forgot password link on the ui. from api side  i want to send the mail by

Re: I need to know how to optimize this?

2020-06-13 Thread Gs_1001
Hey, I was having a bit trouble trying to understand the idea. - The SponsporedBooks model has user field which isn't being used here. Where do you plan to user this ? - The CustomSponsoredBooks model does not have a user field. Are you not trying to store the points for the books (possible for

Re: I need to know how to optimize this?

2020-06-13 Thread Gs_1001
Hey, I was having a bit trouble trying to understand the idea. - The SponsporedBooks model has user field which isn't being used here. Where do you plan to user this ? - The CustomSponsoredBooks model does not have a user field. Are you not trying to store the points for the books (possible for

Re: How to add a user ratings feature in djnago application?

2020-06-13 Thread Gs_1001
Hey, A rating feature for a peer reviewed books website would look somewhat like: - A books model having "no_of_reviews" and "rating" field Every time a user rates a book no_of_reviews field would be incremented and rating field would be updated. If you think I somehow missed the point then pl

Updating a date field

2020-06-13 Thread Clive Bruton
I am trying to update an existing date field, however when I do that I get the following exception: Exception Type: TypeError Exception Value: expected string or bytes-like object The query looks like this: queryset = Item.edit.filter(**kwargs).update (expires=set_expires,is_acti

Re: I need to know how to optimize this?

2020-06-13 Thread Himanshu Pharawal
Yes your assumptions are right. I am sorry for irrelevant models code i ma posting, please check in re-post codes. #This code is use to match current user interests to SponsoredBook.keywords and if it matches more than one keyword we increase it's points and finally we sort this on the basis of