Re: [mezzanine-users] HOST_THEMES working example?
to be importable the name has to be valid i.e. no periods and the __init__.py file is required. Is there anything else I should check? -- 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/groups/opt_out.
Re: [mezzanine-users] HOST_THEMES working example?
I'd suggest checking the debugging instructions I provided on the github issue and following through with those. On Thu, Jan 23, 2014 at 7:31 AM, Radomir Wojcik radzh...@gmail.com wrote: to be importable the name has to be valid i.e. no periods and the __init__.py file is required. Is there anything else I should check? -- 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/groups/opt_out. -- 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/groups/opt_out.
Re: [mezzanine-users] HOST_THEMES working example?
Radomir, the code searches through HOST_THEMES and returns on the first match, so you must be hitting it with a host of 127.0.0.1? I put print statements in the code the other day and could get it to match on the second entry. I was testing with a production test case, so I had real domains to use. In my case I have a nonprofit's website, call it main.org, and two associated domains that need their own themes (these are not subdomains), and it would be great to switch Sites within one Mezzanine process to edit each of the three. Each theme layout is similar, with the same styling of the menu at top, three thumbnail images at the top, a right panel with varied content, and with a carousel above the footer. In addition to the different themes, if it would work, there should be one single cartridge shop in main.org. If use of HOST_THEMES is inappropriate for this, then I could have separate processes for the three, and link to the the shop on main.org. But that requires maintainers to have three log-ins, while having some benefits. Or, perhaps I could use rewrite rules to point the two secondary domains to folders within main.org, and use urlpattern entries and direct_to_template to associate themes. It is possible that HOST_THEMES could figure in here, as themes could be associated to main.org/one, main.org/two? Whatever the most appropriate approach for my problem, I do not yet understand the use case and limitations for HOST_THEMES. I have pledged to help with docs on this, but must gain a better broad understanding first. I am using nginx, which I think was configured correctly in one of my tests to tie the secondary domains to the same gunicorn/mezz process. That end of it could use description too. Jeff On Jan 22, 2014, at 2:31 PM, Radomir Wojcik radzh...@gmail.com wrote: to be importable the name has to be valid i.e. no periods and the __init__.py file is required. Is there anything else I should check? -- 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/groups/opt_out. -- 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/groups/opt_out.
Re: [mezzanine-users] HOST_THEMES working example?
I am hitting with both 127.0.0.1 and localhost, the page content changes correctly but not the theme. I will try the debug instructions next. I think HOST_THEMES should do what you want but since I haven't ever got it working I will stay out of the discussion until I fix it. I can try doing it with real domains but I doubt it would make a difference here. localhost and 127.0.0.1 are valid -- 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/groups/opt_out.
Re: [mezzanine-users] HOST_THEMES working example?
Is there any way someone could create a quick example project with this working using localhost and 127.0.0.1 ? As simple as just changing the tag line in base.html for each theme would suffice. -- 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/groups/opt_out.
Re: [mezzanine-users] HOST_THEMES working example?
I'm not using index.html though, I can get rid of that file I just want to get base.html going, that one doesn't extend anything. Couldn't find the template loader, is this it: https://github.com/pconerly/pc/blob/master/mezzanine/template/loader.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/groups/opt_out.
Re: [mezzanine-users] HOST_THEMES working example?
The TemplateForHostMiddleware is there in my settings but when debugging I added some print statements to see if it is hit and it doesn't look like it is using my configuration.. I can create a compact example on bitbucket and share it, hopefully you guys can help me fix it and it can be used as a working example for others. -- 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/groups/opt_out.
Re: [mezzanine-users] HOST_THEMES working example?
You can see the code that I worked on for the template loader at: https://bitbucket.org/stephenmcd/mezzanine/pull-request/35/site_theme-loader Take another read through that thread I posted, the only way you will get base.html to work with the HOST_THEMES is if you directly render base.html from a view (which wouldn't make very much sense because base.html is meant to be the basis for almost all your other templates). The middleware approach of HOST_THEMES is limited because not all uses of a template result in process_template_response middleware being called. On Wed, Jan 22, 2014 at 5:09 PM, Radomir Wojcik radzh...@gmail.com wrote: The TemplateForHostMiddleware is there in my settings but when debugging I added some print statements to see if it is hit and it doesn't look like it is using my configuration.. I can create a compact example on bitbucket and share it, hopefully you guys can help me fix it and it can be used as a working example for others. -- 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/groups/opt_out. -- 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/groups/opt_out.
Re: [mezzanine-users] HOST_THEMES working example?
Thanks Josh! It looks interesting, I will try it out tomorrow :) -- 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/groups/opt_out.
Re: [mezzanine-users] HOST_THEMES working example?
No problem, you don't need to use the particular fork of Mezzanine either, it should be easy enough to pull the loader out and add it to your own. On Wed, Jan 22, 2014 at 7:08 PM, Radomir Wojcik radzh...@gmail.com wrote: Thanks Josh! It looks interesting, I will try it out tomorrow :) -- 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/groups/opt_out. -- 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/groups/opt_out.