[mezzanine-users] Re: modeltranslations - round 2

2014-06-10 Thread Mathias Ettinger
Just corrected a few things for the front-end language selector and pushed 
an updated version of cartridge as well.

I tried the TabbedExternalJqueryTranslationAdmin class instead of 
TranslationAdmin and couldn’t get the meta tag area to show. Does it happen 
for you too? Or is there something else to do in order to get it working?

If it is not possible to show extra area like this that are hidden by 
default, we definitely need to write our own custom class on top of 
TranslationAdmin (meaning: core.BaseTranslationModelAdmin). I’m also unsure 
if Translation{Tabular,Stacked}Inline also need to integrates some 
tabbing-awareness code (wether it is a global switch or a per field one). 
But I modified a little bit their admin classes to help integrate it if 
needed.


Le samedi 7 juin 2014 02:26:50 UTC+2, Eduardo Rivas a écrit :

 Hey everybody. I've been trying out Mathias master branch and everything 
 is working smoothly. As I said, I'm also exploring ways to enable toggling 
 translation fields in the Admin. Turns out Model Translation (MT) provides 
 two admin classes (docs 
 https://django-modeltranslation.readthedocs.org/en/latest/admin.html#tabbed-translation-fields-admin-classes)
  
 to include the required static resources for this purpose: 
 TabbedTranslationAdmin 
 and TabbedExternalJqueryTranslationAdmin. The first one seems to fail as 
 it uses Django's jQuery, but the second one works as expected (though it 
 looks kinda ugly in Grappelli) by using external jQuery resources.

 I have a couple of questions at this point:

1. Should we use these classes or create our own (considering 
Mezzanine already includes jQuery and jQuery UI)?
2. Should we create a toggle for each field (as MT does), or just a 
global toggle to hide/show all fields of a specified language? I favor 
the second option, as giving each field it's own toggle seems overly messy 
and confusing for the end user.

 Hope to hear from you soon. BTW, if you want to try out MT's default 
 implementation, simply replace all occurrences of TranslationAdmin with 
 TabbedExternalJqueryTranslationAdmin 
 in mezzanine.core.admin.


-- 
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] disabling threaded comments

2014-06-10 Thread Josh Cartmell
Hey James, the comment functionality is baked into Mezzanine (part of
mezzanine.generic), but comments are only present on the blog by default.
As long as you don't add it to anything you create there won't be any
outward facing comments on the site.

Since you've also unregistered them from the admin it looks like you've
accomplished everything you wanted to!

Good work =)


On Tue, Jun 10, 2014 at 9:55 AM, James Larkin james.lar...@gmail.com
wrote:

 Introduction: I'm pretty new Django / Mezzanine (generally I'm more
 involved in designing but I'm trying to get up to speed on everything)

 I'm struggling with a few things so what hell might as well ask

 I want to disable comments and the blog.

 I've removed the blog from the INSTALLED_APPS settings and this works fine

 However the comments seem to be more part of the core of Mezzanine unless
 I'm misunderstanding things?

 Could anyone tell me what's the best way to go around removing them?

 At the moment I've created a new app for my project I'm working on and
 into admin.py I've put the following

 from django.contrib import admin

 from mezzanine.generic.models import ThreadedComment

 admin.site.unregister(ThreadedComment)


 This works for what I want and comments are removed from the admin
 interface.

 Am I missing something or have I gone about it the completely wrong way?
 (I Googled this to bits as well before posting and struggled to find an
 answer that made sense)

 Thanks in advance

 James

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


Re: [mezzanine-users] disabling threaded comments

2014-06-10 Thread James Larkin
Thanks Josh (want to try and make sure I'm using best practices) also I see 
I have your website open in another tab :) 

It bugs me it's not a simple case of just removing it like with the blog 
app but oh well. I also don't like having things present if they don't need 
to be ( hence a loose comments tab that isn't required in the admin 
interface bugs me )

Now to start hacking flexipages as a starting point for world domination 

On Tuesday, 10 June 2014 16:30:22 UTC+2, Josh Cartmell wrote:

 Hey James, the comment functionality is baked into Mezzanine (part of 
 mezzanine.generic), but comments are only present on the blog by default.  
 As long as you don't add it to anything you create there won't be any 
 outward facing comments on the site.

 Since you've also unregistered them from the admin it looks like you've 
 accomplished everything you wanted to!

 Good work =)


 On Tue, Jun 10, 2014 at 9:55 AM, James Larkin james@gmail.com 
 javascript: wrote:

 Introduction: I'm pretty new Django / Mezzanine (generally I'm more 
 involved in designing but I'm trying to get up to speed on everything) 

 I'm struggling with a few things so what hell might as well ask

 I want to disable comments and the blog.

 I've removed the blog from the INSTALLED_APPS settings and this works fine

 However the comments seem to be more part of the core of Mezzanine unless 
 I'm misunderstanding things?

 Could anyone tell me what's the best way to go around removing them?

 At the moment I've created a new app for my project I'm working on and 
 into admin.py I've put the following

 from django.contrib import admin

 from mezzanine.generic.models import ThreadedComment

 admin.site.unregister(ThreadedComment)


 This works for what I want and comments are removed from the admin 
 interface.

 Am I missing something or have I gone about it the completely wrong way? 
 (I Googled this to bits as well before posting and struggled to find an 
 answer that made sense) 

 Thanks in advance 

 James

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


[mezzanine-users] Re: database error while running migration

2014-06-10 Thread Federico Bruni
Any pointer?
I don't want to destroy the project and re-deploy from scratch.

Il giorno mercoledì 4 giugno 2014 12:05:17 UTC+2, Federico Bruni ha scritto:

 Hi all

 I have a problem with the database migration during a deployment.

 I have changed only the LANGUAGE_CODE variable in settings.py
 When I launch 'fab deploy' I get this error:

 '''
 out: django.db.utils.ProgrammingError: ERROR:  the relation conf_setting 
 already exists
 [xx.xx.xx.xx] out: 
 [xx.xx.xx.xx] out: 

 Fatal error: run() received nonzero return code 1 while executing!

 Requested: /home/fede/.virtualenvs/test/bin/python 
 /home/fede/.virtualenvs/test/project/manage.py migrate --noinput
 Executed: /bin/bash -l -c cd /home/fede/.virtualenvs/test/project  
 source /home/fede/.virtualenvs/test/bin/activate  
 /home/fede/.virtualenvs/test/bin/python 
 /home/fede/.virtualenvs/test/project/manage.py migrate --noinput

 Aborting.
 '''

 What should I check?
 Thanks in advance
 Federico




-- 
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: database error while running migration

2014-06-10 Thread Josh Cartmell
Hey Federico, shot in the dark here, but was South definitely installed
when you deployed in the first place?  I'm wondering if some of the records
of migrations are missing.

I could be totally off and I'm not sure how changing the language code
would affect the db.


On Tue, Jun 10, 2014 at 12:07 PM, Federico Bruni fedel...@gmail.com wrote:

 Any pointer?
 I don't want to destroy the project and re-deploy from scratch.

 Il giorno mercoledì 4 giugno 2014 12:05:17 UTC+2, Federico Bruni ha
 scritto:

 Hi all

 I have a problem with the database migration during a deployment.

 I have changed only the LANGUAGE_CODE variable in settings.py
 When I launch 'fab deploy' I get this error:

 '''
 out: django.db.utils.ProgrammingError: ERROR:  the relation
 conf_setting already exists
 [xx.xx.xx.xx] out:
 [xx.xx.xx.xx] out:

 Fatal error: run() received nonzero return code 1 while executing!

 Requested: /home/fede/.virtualenvs/test/bin/python
 /home/fede/.virtualenvs/test/project/manage.py migrate --noinput
 Executed: /bin/bash -l -c cd /home/fede/.virtualenvs/test/project 
 source /home/fede/.virtualenvs/test/bin/activate 
 /home/fede/.virtualenvs/test/bin/python 
 /home/fede/.virtualenvs/test/project/manage.py
 migrate --noinput

 Aborting.
 '''

 What should I check?
 Thanks in advance
 Federico


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


Re: [mezzanine-users] Re: database error while running migration

2014-06-10 Thread Federico Bruni
Hey Josh

no, South was not installed. I thought it was a dependency of Mezzanine,
but I see that it's optional:
https://pypi.python.org/pypi/Mezzanine/3.1.5

I've installed it, added it to the requirements and pushed to the
repository, but I'm getting the same error.

I've deployed from scratch. I'll see next time..

Thank you
Federico

2014-06-10 18:19 GMT+02:00 Josh Cartmell joshcar...@gmail.com:

 Hey Federico, shot in the dark here, but was South definitely installed
 when you deployed in the first place?  I'm wondering if some of the records
 of migrations are missing.

 I could be totally off and I'm not sure how changing the language code
 would affect the db.


 On Tue, Jun 10, 2014 at 12:07 PM, Federico Bruni fedel...@gmail.com
 wrote:

 Any pointer?
 I don't want to destroy the project and re-deploy from scratch.

 Il giorno mercoledì 4 giugno 2014 12:05:17 UTC+2, Federico Bruni ha
 scritto:

 Hi all

 I have a problem with the database migration during a deployment.

 I have changed only the LANGUAGE_CODE variable in settings.py
 When I launch 'fab deploy' I get this error:

 '''
 out: django.db.utils.ProgrammingError: ERROR:  the relation
 conf_setting already exists
 [xx.xx.xx.xx] out:
 [xx.xx.xx.xx] out:

 Fatal error: run() received nonzero return code 1 while executing!

 Requested: /home/fede/.virtualenvs/test/bin/python
 /home/fede/.virtualenvs/test/project/manage.py migrate --noinput
 Executed: /bin/bash -l -c cd /home/fede/.virtualenvs/test/project 
 source /home/fede/.virtualenvs/test/bin/activate 
 /home/fede/.virtualenvs/test/bin/python 
 /home/fede/.virtualenvs/test/project/manage.py
 migrate --noinput

 Aborting.
 '''

 What should I check?
 Thanks in advance
 Federico


  --
 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 a topic in the
 Google Groups Mezzanine Users group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/mezzanine-users/7Hz_5DK_Q0Q/unsubscribe.
 To unsubscribe from this group and all its topics, 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.


Re: [mezzanine-users] Re: pg_restore error

2014-06-10 Thread Federico Bruni
I've just had this same problem and the command above didn't work at first.
It worked when I switched the local to english:

export LANG=C
pg_restore -c -d DATABASE FILE

Maybe it's just a coincidence?



2014-03-27 20:30 GMT+01:00 Federico Bruni fedel...@gmail.com:

 I've resolved following the suggestion of Ken in this thread: using the
 commands present in fabfile.py, that is:

 pg_dump -Fc DATABASE  FILE
 pg_restore -c -d DATABASE FILE

 Though I can't remember exactly what I used before.. probably I didn't use
 the -c  option in pg_restore:

 -c, --clean
Clean (drop) database objects before recreating them. (This
 might
generate some harmless error messages, if any objects were not
 present
in the destination database.)




 2014-03-27 18:15 GMT+01:00 Neum Schmickrath n...@pageworthy.com:

 What are the pg_ commands you are using? These are the commands I use to
 dump and then restore and I've never had a problem.

 pg_dump -U USERNAME -F t -f NAMEOF.backup DATABASE-NAME

 pg_restore -d DATABASE-NAME -O -U USERNAME NAMEOF.backup



 On Monday, March 24, 2014 2:28:41 AM UTC-6, Federico Bruni wrote:

 I've made the dump of the local database and I've tried to restore it on
 the server, but I'm getting the error below.
 BTW, how can I force the output to be in english? I've tried LANG=C but
 didn't work. Should I change the locale on the server?

 Any help appreciated.

 _restore: [archiviatore (db)] Errore nella voce TOC 2142; 2606 26962 FK
 CONSTRAINT to_blogpost_id_refs_id_6404941b fede
 pg_restore: [archiviatore (db)] could not execute query: ERRORE:  il
 vincolo to_blogpost_id_refs_id_6404941b per la relazione
 blog_blogpost_related_posts esiste già
 Command was: ALTER TABLE ONLY blog_blogpost_related_posts
 ADD CONSTRAINT to_blogpost_id_refs_id_6404941b FOREIGN KEY
 (to_blogpost_id)...
 pg_restore: [archiviatore (db)] Errore nella voce TOC 2172; 2606 26967
 FK CONSTRAINT twitter_tweet_query_id_fkey fede
 pg_restore: [archiviatore (db)] could not execute query: ERRORE:  il
 vincolo twitter_tweet_query_id_fkey per la relazione twitter_tweet
 esiste già
 Command was: ALTER TABLE ONLY twitter_tweet
 ADD CONSTRAINT twitter_tweet_query_id_fkey FOREIGN KEY (query_id)
 REFERENCES twitter_quer...
 pg_restore: [archiviatore (db)] Errore nella voce TOC 2133; 2606 26972
 FK CONSTRAINT user_id_refs_id_40c41112 fede
 pg_restore: [archiviatore (db)] could not execute query: ERRORE:  il
 vincolo user_id_refs_id_40c41112 per la relazione auth_user_groups
 esiste già
 Command was: ALTER TABLE ONLY auth_user_groups
 ADD CONSTRAINT user_id_refs_id_40c41112 FOREIGN KEY (user_id)
 REFERENCES auth_user(id)...
 pg_restore: [archiviatore (db)] Errore nella voce TOC 2135; 2606 26977
 FK CONSTRAINT user_id_refs_id_4dc23c39 fede
 pg_restore: [archiviatore (db)] could not execute query: ERRORE:  il
 vincolo user_id_refs_id_4dc23c39 per la relazione
 auth_user_user_permissions esiste già
 Command was: ALTER TABLE ONLY auth_user_user_permissions
 ADD CONSTRAINT user_id_refs_id_4dc23c39 FOREIGN KEY (user_id)
 REFERENCES aut...
 ATTENZIONE: errore ignorato durante il ripristino: 219

  --
 You received this message because you are subscribed to a topic in the
 Google Groups Mezzanine Users group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/mezzanine-users/otAYtS2qLuE/unsubscribe
 .
 To unsubscribe from this group and all its topics, 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] Re: Mezzanine-Cartridge Problem when view product image

2014-06-10 Thread green
Hi Ken,
Thank you.  That helps a lot.  It is now working perfectly. 
Kind regards,
Jane

On Monday, 9 June 2014 13:55:02 UTC+1, green wrote:

 Not sure what went wrong and where to start.  I have 
 Cartridge==0.9.3
 Django==1.6.4
 Mezzanine==3.1.4

 Problem:  When click on product image in a full site, I do not get a 
 floating/overlay image window as seen in the Mezzanine demo site. Instead, 
 I get the display image, see attached, added on top of the current view 
 pushing down all other content. 


 https://lh5.googleusercontent.com/-u75J_-oLjRE/U5WuTi5Bh3I/BRQ/oS-pMW5IjPI/s1600/image.tiff
 Any suggestion on where I should start looking would be much appreciated.

 Thank you in advance.


-- 
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] disabling threaded comments

2014-06-10 Thread James Larkin
Hi Danny,

My problem with just removing from templates ... it's just visually not 
available but the code possibly still exists to process the comments or am 
I wrong? 

I could have tweaked things with a display:none bit of css to just remove 
it visually from the admin menu but I'm still not happy with that.

James

On Tuesday, 10 June 2014 23:30:11 UTC+2, Danny S wrote:

 On 11/06/2014 12:32 AM, James Larkin wrote: 
  Thanks Josh (want to try and make sure I'm using best practices) also I 
  see I have your website open in another tab :) 
  
  It bugs me it's not a simple case of just removing it like with the blog 
  app but oh well. I also don't like having things present if they don't 
  need to be ( hence a loose comments tab that isn't required in the admin 
  interface bugs me ) 

 I didn't want comments on my site either and the easiest thing to do was 
 to just comment out/remove those sections from the relevant templates. 


  
  Now to start hacking flexipages as a starting point for world domination 
  
  On Tuesday, 10 June 2014 16:30:22 UTC+2, Josh Cartmell wrote: 
  
  Hey James, the comment functionality is baked into Mezzanine (part 
  of mezzanine.generic), but comments are only present on the blog by 
  default.  As long as you don't add it to anything you create there 
  won't be any outward facing comments on the site. 
  
  Since you've also unregistered them from the admin it looks like 
  you've accomplished everything you wanted to! 
  
  Good work =) 
  
  
  On Tue, Jun 10, 2014 at 9:55 AM, James Larkin james@gmail.com 
  javascript: wrote: 
  
  Introduction: I'm pretty new Django / Mezzanine (generally I'm 
  more involved in designing but I'm trying to get up to speed on 
  everything) 
  
  I'm struggling with a few things so what hell might as well ask 
  
  I want to disable comments and the blog. 
  
  I've removed the blog from the INSTALLED_APPS settings and this 
  works fine 
  
  However the comments seem to be more part of the core of 
  Mezzanine unless I'm misunderstanding things? 
  
  Could anyone tell me what's the best way to go around removing 
 them? 
  
  At the moment I've created a new app for my project I'm working 
  on and into admin.py I've put the following 
  
  from django.contrib import admin 
  
  from mezzanine.generic.models import ThreadedComment 
  
  admin.site.unregister(ThreadedComment) 
  
  
  This works for what I want and comments are removed from the 
  admin interface. 
  
  Am I missing something or have I gone about it the completely 
  wrong way? (I Googled this to bits as well before posting and 
  struggled to find an answer that made sense) 
  
  Thanks in advance 
  
  James 
  
  -- 
  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 
  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-use...@googlegroups.com javascript: 
  mailto:mezzanine-users+unsubscr...@googlegroups.com javascript:. 
  For more options, visit https://groups.google.com/d/optout. 



 -- 
 Email: mol...@gmail.com javascript: 


-- 
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] Re: Fabric file and related resources for deploying Mezzanine to Webfaction

2014-06-10 Thread Eduardo Rivas
Thanks for the interest guys. Ibn, I recommend you take a look at the 
Webfaction docs and read the fabfile to have an idea of what it does. Some 
knowledge of Postgres and Git will also be useful. Finally, when you 
deploy, keep in mind many settings have default values in fabsettings.py, 
so just comment out any particular setting to use the default. This will 
maintain the settings you actually need to touch to a minimum.

-- 
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: can_move permission (was: page_move signals)

2014-06-10 Thread Stephen McDonald
On Sun, Jun 8, 2014 at 8:18 AM, Ahmad Khayyat akhay...@gmail.com wrote:

 There is one issue with the current approach. The exception message is
 shown using Django messages, which displays the message at the top of the
 page. If the page tree is scrolled down, the user will see that the illegal
 move move was reverted, but will not see the message, which is unsettling!

 Perhaps we should scroll to the top when the message is displayed? Any
 better solutions? or is it not big of an issue?


Unless I'm missing something from when I tested it, this isn't an issue -
since you call location.reload() on error the user should always be put
back to the top of the screen, where they'll see the message.


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