Re: [mezzanine-users] Re: modeltranslations - round 2

2014-05-23 Thread Mathias Ettinger
I had some thoughts about what tests to add and how to write them. But 
everything lead to the same question: how is it possible to configure 
several languages for the tests without hardcoding them into settings.py?

-- 
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] Re: modeltranslations - round 2

2014-05-23 Thread Eduardo Rivas
I should have read the whole Stack Overflow thread! It looks like Django
has built in ways of doing it.
https://docs.djangoproject.com/en/1.6/topics/testing/tools/#overriding-settings

-- 
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] Re: modeltranslations - round 2

2014-05-23 Thread Eduardo Rivas
I think you can access the settings module like every other place in the code 
base. This example recommends the setup and teardown methods for modifying 
settings in unit tests: http://stackoverflow.com/a/913596. Hope that helps :-) 

-- 
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] Re: Proposal: page_move signals

2014-05-23 Thread Stephen McDonald
Sounds like a good idea, go for it.


On Sat, May 24, 2014 at 6:19 AM, Josh Cartmell joshcar...@gmail.com wrote:

 I think this sounds really cool, I've definitely wanted to do things along
 these lines before.


 On Fri, May 23, 2014 at 4:08 PM, Ahmad Khayyat akhay...@gmail.com wrote:

 T​​
 o complete the thought, here is what I’m doing now with what I described
 earlier:

  diff --git a/mezzanine/pages/static/mezzanine/js/admin/page_tree.js 
 b/mezzanine/pages/static/mezzani--- 
 a/mezzanine/pages/static/mezzanine/js/admin/page_tree.js+++ 
 b/mezzanine/pages/static/mezzanine/js/admin/page_tree.js@@ -91,7 +91,10 @@

  $.post(window.__page_ordering_url, args, function(data) {
  if (String(data).substr(0, 2) !== ok) {-
 alert(Error occured:  + data + \nOrdering wasn't updated.);+ 
location.reload();+}+else {+
 $(.messagelist).remove();
  }
  });

 This will result in the page tree being reverted if the page move is
 aborted. Also, a django-messages error message is shown (done elsewhere
 right now, but ideally should be done in the admin_page_ordering view.
 Upon a successful page move, the message is reset.
 ​

 --
 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.




-- 
Stephen McDonald
http://jupo.org

-- 
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] Collecting additional information on a per product basis in Cartridge

2014-05-23 Thread Stephen McDonald
Great post Josh, thanks!


On Sat, May 24, 2014 at 5:17 AM, Josh Cartmell joshcar...@gmail.com wrote:

 Hey all, I just wrote up a blog post on how I had Cartridge collect extra
 information when particular products were added to a user's cart.  I
 thought I would share and hope it's helpful for someone:


 http://bitofpixels.com/blog/collecting-additional-information-on-a-per-product-basis-in-cartridge/

 --
 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.




-- 
Stephen McDonald
http://jupo.org

-- 
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] Re: Proposal: page_move signals

2014-05-23 Thread Ahmad Khayyat


Here we go:
https://bitbucket.org/stephenmcd/mezzanine/pull-request/62/

Create and send pre_page_move and post_page_move signals.
Any value returned by any receiver of the pre_page_move signal will abort 
the move. The value is considered an error message, and will be displayed. 
The first value received aborts further processing.

Needs to be documented.

Receivers can subscribe to moves of specific content types using the 
senderargument.

Example:

from mezzanine.pages.signals import pre_page_move
@receiver(pre_page_move, sender=MyPage)def my_move_constraints(sender, page, 
new_parent, **kwargs):

...

​

-- 
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.