[mezzanine-users] Tracking page revisions
I have a growing client mezzanine site at crossculturalconsult.com. The site is multi-lingual and uses markdown for editing page content. There are a number of content editors. I've been asked to provide change revision tracking for pages much like the tracking that exists on media-wiki so that revisions can be reviewed and undone if necessary. I installed django_reversion to see if it can help and I've set it up to use revisions always (using its middleware) and used the patch_admin utility to patch the Page admin. Changes to pages in admin do not seem to create versions. If I explicitly create a version: In [1]: from mezzanine.pages.models import Page In [2]: import reversion In [3]: page = Page.objects.get(title='About CCCS revised') In [4]: reversion.register(Page) Out[4]: mezzanine.pages.models.Page In [5]: with reversion.create_revision(): page.title_en = 'About CCCS' page.save() ...: In [6]: reversion.get_for_object(page) Out[6]: [Version: About CCCS] I don't see anything about the version in admin anywhere. Am I missing something? Has anyone any experience with this? Cheers, Paul -- 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 mezzanine-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [mezzanine-users] Modify author post
All things are possible with more or less work, depending on the specifics of your problem and desired outcome. Modifying the DB directly is the fastest and easiest solution for one-off modification. Using the Django shell (or django-extensions excellent shell_plus) would be the fastest and easiest solution for scripting bulk modifications. Finally, you can create a new custom BlogPostAdmin with the author field enabled and editable. You have to write a custom `save` method for the BlogPost model to override the method which sets the author as the current user. hth, ken On Thu, Oct 23, 2014 at 8:34 AM, Emmanuelle HELLY e.he...@gmail.com wrote: Hello, Is it possible to modify the author of a blog post in Mezzanine ? And how (I mean anyway but directly in DB) thanks in advance, Emmanuelle Helly / numahell -- 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 mezzanine-users+unsubscr...@googlegroups.com. 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 mezzanine-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[mezzanine-users] Changing PAGE_MENU_TEMPLATES causes migration
mezzanine.pages.fields.MenusField sets its choices and default on the basis of hte PAGE_MENU_TEMPLATES setting (see here:https://github.com/stephenmcd/mezzanine/blob/e2b0aa6d6fbf699f3e1c68a4a522f5abaf40bbb6/mezzanine/pages/fields.py#L14). This means that if this menu is changed and then the migrations framework is run, an AlterField operation is added. Here's an example of a migration that is added by this change: https://dpaste.de/iiAv To put it another way: If you blank the migrations for the pages app and run them again, you get a different initial migration for the field. Here's the output: https://dpaste.de/GocA Do we want this? Or do we need to figure out how to silence it somehow? -- 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 mezzanine-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [mezzanine-users] User's choice of shipping method in cartridge
Thanks for this Josh. I managed to get an implementation working using the ideas you have suggested. Seeya. Danny. On Thursday, 9 October 2014 01:11:55 UTC+10:30, Josh Cartmell wrote: Hey Danny, I don't have code available that I could let you look at right now, but I have done something similar. To do this I made a custom order form for Cartridge using the setting SHOP_CHECKOUT_FORM_CLASS. Make it inherit from the default OrderForm and then add a field allowing the user to select a shipping method: from cartridge.shop.forms import OrderForm class CustomOrderForm(OrderForm): shipping_method = forms.ChoiceField(choices=SHIPPING_CHOICES) The following will assume you have the checkout steps split. 1. In your shipping handler calculate the cost of each shipping method, at that point I would store it in the session, since the user hasn't selected a shipping method yet, don't set the shipping. 2. In the init for your Custom order form check if you are on the payment step and if the session data that is stored by the shipping handler, is present, if so update the choices for shipping method to have their associated costs. At this point I would probably delete the data from the session in case the user later goes back in the checkout process and changes their address. 3. Display the shipping method select on the payment screen. 4. In the payment handler do the normal payment stuff, but also call the Cartridge set_shipping method ^ that's not exactly what you are supposed to do, but I don't think there is anything preventing you from calling set_shipping not in the shipping handler. In my case, I didn't have the checkout steps split and didn't precalculate the shipping costs, I just let the user see the shipping cost on order confirm page but I think the above should work to do what you want. On Tue, Oct 7, 2014 at 6:19 PM, Danny S mol...@gmail.com javascript: wrote: Hi, I was just wondering if anyone has previously implemented an add-on to cartridge which allows a user to select the shipping method? I know that with a billship_handler I could use a shipping address to determine the available types of shipping and their costs, but what if there's a choice of more than one? e.g Pick up (free), basic ($X), express ($Y). Ideally, after the user has completed their address info, they would be presented with a dropdown to choose their preferred shipping method, and then that gets added to the cart total before moving to the payment step of checkout. If anyone has done something similar, is it possible for me to take a look at your code? Thanks, Seeya. Danny. -- 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 mezzanine-use...@googlegroups.com javascript:. 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 mezzanine-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.