[mezzanine-users] Consult one design
Guys, I am trying to customize homepage these days. I have succeeded to make homepage editable in admin. Here just wanna consult one design case. Firstly, show u guys the homepage structure: https://lh4.googleusercontent.com/-vKo_-blDkS0/U3MTNbsv12I/AFk/QDQfNtzT05U/s1600/QQ%E5%9B%BE%E7%89%8720140514145244.jpg So, just see the ColumnX part, now , I wanna these columns editable during the admin homepage editing, that is, columns number and each column content, so, I think the ColumnX part should be a page, eh? How to desigh this? Thanks. Wesley -- 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] Consult one design
Hi Luc, Just check out the package and involved to my project as App. Set it to installed_app and in one of my template, I use {% flatblock My Awesome Block %}. But no context displayed neither in site page nor in admin... Here is src generated by {% flatblock My Awesome Block %} div class=flatblock block-my-awesome-block form style=display:none; class=editable-form method=post action=/edit/ id=1b97c8ef-57b6-4c08-864a-44fe01a42b2f input type=hidden name=csrfmiddlewaretoken value=wvCUOpF4swQFlakrtOOJlAQjyOlZ1DdH p label for=content-1b97c8ef-57b6-4c08-864a-44fe01a42b2fContent/labelbrtextarea class= charfield cols=40 id=content-1b97c8ef-57b6-4c08-864a-44fe01a42b2f name=content rows=10/textarea /p p style=display:none; label for=app-1b97c8ef-57b6-4c08-864a-44fe01a42b2fApp/labelbrinput class= charfield id=app-1b97c8ef-57b6-4c08-864a-44fe01a42b2f name=app type=hidden value=mezzanine_blocks /p p style=display:none; label for=model-1b97c8ef-57b6-4c08-864a-44fe01a42b2fModel/labelbrinput class= charfield id=model-1b97c8ef-57b6-4c08-864a-44fe01a42b2f name=model type=hidden value=block /p p style=display:none; label for=id-1b97c8ef-57b6-4c08-864a-44fe01a42b2fId/labelbrinput class= charfield id=id-1b97c8ef-57b6-4c08-864a-44fe01a42b2f name=id type=hidden value=1 /p p style=display:none; label for=fields-1b97c8ef-57b6-4c08-864a-44fe01a42b2fFields/labelbrinput class= charfield id=fields-1b97c8ef-57b6-4c08-864a-44fe01a42b2f name=fields type=hidden value=content /p input type=submit value=Save class=btn btn-primary btn-lg input type=button value=Cancel class=btn btn-default btn-lg /form div class=editable-original div class=content/div /div a style=visibility: hidden; top: 545px; left: -32px; class=editable-link href=# rel=#1b97c8ef-57b6-4c08-864a-44fe01a42b2fEdit/a div style=visibility: hidden; width: 1140px; height: 0px; top: 545px; left: 15px; class=editable-highlight/div /div 在 2014年5月14日星期三UTC+8下午3时12分45秒,Luc Milland写道: Hi Wesley, you could use something like https://github.com/renyi/mezzanine-blocks for that use. Luc Le mardi 13 mai 2014 à 23:58 -0700, Wesley a écrit : Guys, I am trying to customize homepage these days. I have succeeded to make homepage editable in admin. Here just wanna consult one design case. Firstly, show u guys the homepage structure: https://lh4.googleusercontent.com/-vKo_-blDkS0/U3MTNbsv12I/AFk/QDQfNtzT05U/s1600/QQ%E5%9B%BE%E7%89%8720140514145244.jpg So, just see the ColumnX part, now , I wanna these columns editable during the admin homepage editing, that is, columns number and each column content, so, I think the ColumnX part should be a page, eh? How to desigh this? Thanks. Wesley -- 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
I learned something from #5. I’ll try to play with conf.models and see what happens. For #1, I was simply suggesting to change the text of the button. At least for my setup, when the text is “Submit” for the english language or “Wyślij” for polish, it display the french (default) button_text field whatever the active language is. But if I change the text to something else, it gets displayed properly. Le mardi 13 mai 2014 22:49:28 UTC+2, Eduardo Rivas a écrit : Sorry, I didn't understand your explanation on point 1. Could you elaborate a little bit more? The issue I was describing is that the Submit button is not showing the active language text in the form, but rather the default language value. About number 2, I actually had this working a while back using Django's set_languagehttps://docs.djangoproject.com/en/dev/topics/i18n/translation/#set-language-redirect-viewview. I created a gist https://gist.github.com/jerivas/8f9873c36cd8a895cd4a with some code that can go directly into base.html or (even better) in a small template in includes/. Please note that settings.USE_I18N must be included in TEMPLATE_ACCESSIBLE_SETTINGS. Finally, the reason I brought up #5 was because some Settings are indeed model instances stored in the database. See: https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/conf/models.py. However, they are a special case, as we wouldn't want to translate all Settings instances. It would be good to include it in the ToDo just to keep it in mind. -- 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] Deploy
Hello, On Wed, 14 May 2014 06:37:05 +1000 Stephen McDonald st...@jupo.org wrote: The fabric script expects a REPO_URL setting, defining a git or mercurial url it can clone your project from. You'll see this briefly mentioned in the fabric settings example: http://mezzanine.jupo.org/docs/deployment.html#fabric But for a upload on my Server? There stand something from bitbucket? I want not share my page there or over git. Or need this too for local? Super how make it. Thank You Nice Day Silvio Silvio Siefke siefkesil...@gmail.com -- 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] Deploy
Hey Silvio, you could make it a private repository on Github or Bitbucket, that way only you would have access. When you run the fabric script it tries to pull in your project from the repo url you have in the settings. On Wed, May 14, 2014 at 9:18 AM, Silvio Siefke siefkesil...@gmail.comwrote: Hello, On Wed, 14 May 2014 06:37:05 +1000 Stephen McDonald st...@jupo.org wrote: The fabric script expects a REPO_URL setting, defining a git or mercurial url it can clone your project from. You'll see this briefly mentioned in the fabric settings example: http://mezzanine.jupo.org/docs/deployment.html#fabric But for a upload on my Server? There stand something from bitbucket? I want not share my page there or over git. Or need this too for local? Super how make it. Thank You Nice Day Silvio Silvio Siefke siefkesil...@gmail.com -- 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: modeltranslations - round 2
commits for #2 and #4 have been pushed Le mercredi 14 mai 2014 13:28:06 UTC+2, Mathias Ettinger a écrit : I learned something from #5. I’ll try to play with conf.models and see what happens. For #1, I was simply suggesting to change the text of the button. At least for my setup, when the text is “Submit” for the english language or “Wyślij” for polish, it display the french (default) button_text field whatever the active language is. But if I change the text to something else, it gets displayed properly. Le mardi 13 mai 2014 22:49:28 UTC+2, Eduardo Rivas a écrit : Sorry, I didn't understand your explanation on point 1. Could you elaborate a little bit more? The issue I was describing is that the Submit button is not showing the active language text in the form, but rather the default language value. About number 2, I actually had this working a while back using Django's set_languagehttps://docs.djangoproject.com/en/dev/topics/i18n/translation/#set-language-redirect-viewview. I created a gist https://gist.github.com/jerivas/8f9873c36cd8a895cd4a with some code that can go directly into base.html or (even better) in a small template in includes/. Please note that settings.USE_I18N must be included in TEMPLATE_ACCESSIBLE_SETTINGS. Finally, the reason I brought up #5 was because some Settings are indeed model instances stored in the database. See: https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/conf/models.py. However, they are a special case, as we wouldn't want to translate all Settings instances. It would be good to include it in the ToDo just to keep it in mind. -- 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
Aaaahh, I get what you mean for #1, and yes, changing the value in non-default languages to something other than the direct translation of Submit fixes it. #2 and #4 look like they've been fixed, thanks a lot. #5 is looking pretty great. However, I don't thinks SHOP_CURRENCY_LOCALE should be translatable, since it is not editable, and non-editable settings don't have DB entries (I think). The other problem I see is that users will have to run python manage.py schemamigration conf --auto every time they add a new language. Also, these migrations seem to be stored in Mezzanine's source so they might be a problem for upgrades and deployment. At least that's what I had to do to get rid of a column does not exist error. Am I missing something? -- 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.