models.ForeignKey to Page, use page's URL in template. On Friday, 6 November 2015 19:02:07 UTC+13, Geoff P wrote: > > Hello, I'm trying to create a chunk of content for a homepage. I've got > the admin.py and models.py working together so the heading and the caption > are editable in the admin, but I'm also trying to add a link to each chunk. > I'd like the link to be selectable in the admin and the link options based > on the pages that have been created for the site so far. I've looked into > django's model field reference and found 'choices'. Is there a way to > combine the choices attribute with perhaps a tuple of the pages that have > been created? Been stuck for several hours, seems like there could be > something built in for this that I'm missing. Any tips? Thanks! >
-- You received this message because you are subscribed to the Google Groups "Mezzanine Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
