Hey,
I previously worked with an organization which had it's back-end
implemented using Django. The developers there with did not use the
serializers most of the time, I think i must mention that the code base had
evolved for the past 4-5 years and the data requested in the APIs was quite
com
custom_sponsored_book.obj =
> sponsored_book
> final_sponsored_books.append(
> custom_sponsored_book)
> if len(final_sponsored_books) == 6:
> break
> final_sponsored_books.sort(key=lambda x: x.points,
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
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
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
The documentation provides some ways to extend the functionality of the
user model But the thing I didn't know at first was that once you have your
application working and all, it's quite difficult to make changes to the
user model. So I always prefer to make a CustomUser model at the start of a
6 matches
Mail list logo