Hi Lorenzo, To programmatically generate a Link, the following should, more or less, work.
>>> from mezzanine.pages.models import Link >>> menus = [] >>> new_link = Link.objects.get_or_create(title='New Link', slug=' http://www.example.com', in_menus=list(menus)) I feel like I am not getting to the heart of your question. Help me understand your goals, your experience, and what you have tried. -ken On Tue, Nov 10, 2015 at 4:01 AM, Lorenzo D'Agostino < [email protected]> wrote: > Hi, > I want to create a "command" to populate my website with a default menu > (in this case page_link). > I found in documentation > * class *mezzanine.pages.models.Link(**args*, ***kwargs*) > but i don't undestand how to use. > > I can't find anywhere an example that explains how to use these > instruction and what are the parameters that I have to give. > > Thanks for your help > > > Il giorno lunedì 9 novembre 2015 16:53:31 UTC+1, Lorenzo D'Agostino ha > scritto: > >> Does anybody know how to create a page_link via code? >> >> -- > 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. > -- 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.
