Python Forum
Initializing a Serializer in init and passing data later
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Initializing a Serializer in init and passing data later
#2
Please disregard and delete if necessary admins.

I ended up just combining both Forum and Subforum models along with combining both thread models by using the ForeignKey "self" for reference. Something I didn't know was possible until today.

Was able to shorten my code by almost 200 lines.
Reply


Messages In This Thread
RE: Initializing a Serializer in init and passing data later - by wolfman5874 - Nov-01-2022, 10:51 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Passing Request objects to a serializer in DRF Dexty 0 1,602 Aug-15-2022, 04:51 AM
Last Post: Dexty
  How to Extend a serializer in Django Rest-Framework Dexty 0 1,810 Aug-10-2022, 02:53 PM
Last Post: Dexty
  Django - Passing data from view for use client side with JavaScript in a template bountyhuntr 0 3,731 Jun-11-2018, 06:04 AM
Last Post: bountyhuntr

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020