[mezzanine-users] Re: Second blog url setup

2015-11-13 Thread Neum Schmickrath
I think you'll just need to add a new URL config in your app or Mezzanine 
similar to the one in mezzanine/urls.py  You'll see there:

# Mezzanine's Blog app.
blog_installed = "mezzanine.blog" in settings.INSTALLED_APPS
if blog_installed:
BLOG_SLUG = settings.BLOG_SLUG.rstrip("/")
blog_patterns = patterns("",
("^%s" % BLOG_SLUG, include("mezzanine.blog.urls")),
)
urlpatterns += blog_patterns

So you'll need to add a new base URL that includes your new ite blog app 
urls.py file at the URL that you want. If you haven't already I would 
recommend that you add the new blog "app" as a separate app in your 
project, which will make updating mezzanine in the future much easier. 

On Friday, November 13, 2015 at 8:36:50 AM UTC-7, Joseph Mohan wrote:
>
> I'm trying to replicate the blog model and admin so i can create a second 
> blog. 
> To do this i have literally copy and pasted from 
> http://mezzanine.readthedocs.org/en/latest/_modules/mezzanine/blog/models.html
> and swapped all 'BlogPost' for my custom 'Ite' and any 'blog_post' to 
> 'ite_post'. i dont need the commenting or rating so got rid of anything 
> relevant. All this lives in 'my_cms/models.py'
> So far so good. copied the relevant admin stuff from 
> https://raw.githubusercontent.com/stephenmcd/mezzanine/master/mezzanine/blog/admin.py
> and now i have the admin all set up working fine. 
> I just need to wrap my head round how to set up the urls.. 
>
> having trouble in the blog model with the line: 
>
> url_name = "blog_post_detail"
>
> If i change this to what i would like as a new url: 'ite_post_detail' and 
> enter a new 'Ite post' it saves fine but when i try to 'view on site' 
> obviously it goes off to the original blog and a page that doesn't exist.
>
> I assume i'll just have to set up my templates in the same format as the 
> blog (but with new names: ite_post_detail, ite_post_list)
> but don't know where to start in urls.py?
>
> Any help or links greatly appreciated
>

-- 
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] Check if page has child pages

2015-11-11 Thread Neum Schmickrath
Thanks for the reply Danny. The problem with both of those is they expect 
to be in a recursive "for" loop so I'll get back multiple results depending 
on how many children there are. I'll go ahead and create my own for now. 
Just didn't want to be adding something that was already there :)

On Wednesday, November 11, 2015 at 2:04:20 PM UTC-7, Danny S wrote:
>
> On 12/11/2015 5:22 AM, Neum Schmickrath wrote: 
> > I have a layout I'm working on that has a sidebar that displays a 
> > sub-menu of the child pages of the current page being viewed. On 
> > category pages I can easily test if there are child categories by 
> > using {% if child_categories %} and then showing the sidebar. On pages 
> > is there a similar processor that I'm missing somehow? I don't want to 
> > display an empty sidebar if there won't be any links there. 
> > 
> The navigation menu from the left hand side of Mezzanine default uses 
> this: 
>
>
> https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/pages/templates/pages/menus/tree.html#L20
>  
>
> page.has_children_in_menu 
>
> Would this work? 
>
> There's also an attribute "has_children" set on the page in the 
> page_menu template tag: 
>
>
> https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/pages/templatetags/pages_tags.py#L84
>  
>
> I'm sure both of these might point you in the right direction. 
>
> 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-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[mezzanine-users] Check if page has child pages

2015-11-11 Thread Neum Schmickrath
I have a layout I'm working on that has a sidebar that displays a sub-menu 
of the child pages of the current page being viewed. On category pages I 
can easily test if there are child categories by using {% if 
child_categories %} and then showing the sidebar. On pages is there a 
similar processor that I'm missing somehow? I don't want to display an 
empty sidebar if there won't be any links there.

-- 
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: Do djanog-oscar and django-oscar-stores integrate with Mezzanine?

2015-11-11 Thread Neum Schmickrath
I haven't heard of anything like this. Any reason you wouldn't want to just 
build off of the already integrated shopping cart module, Cartridge 
?

On Saturday, November 7, 2015 at 5:13:15 PM UTC-7, Edward Henderson wrote:
>
> Have Django Oscar been used successfully with Mezzanine?
>
> I'm particularly interested in django-oscar-stores.
>
>
>

-- 
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: Python 3 and fabric

2015-11-11 Thread Neum Schmickrath
Fabric requires Python version 2.5 - 2.7. and doesn't support 3.0 yet. From 
the fabric installation docs:


   - Fabric has not yet been tested on *Python 3.x* and is thus likely to 
   be incompatible with that line of development. However, we try to be at 
   least somewhat forward-looking (e.g. usingprint() instead of print) and 
   will definitely be porting to 3.x in the future once our dependencies do.


On Tuesday, November 10, 2015 at 12:42:03 PM UTC-7, Joshua Glenn wrote:
>
> I have installed mezzanine and deployed a working test website with it 
> (the hard way). But I wanted to check into the fabric deployment tools that 
> are included with mezzanine. But, I am using Python 3. Does fabric even 
> work with Py3?
>

-- 
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: Is USE_SOUTH still default = True

2015-11-11 Thread Neum Schmickrath
No, as of version 4.0 of Mezzanine the internal Django migrations app is 
used for migrations. Use_South is not even set anymore I don't think. 

On Sunday, November 8, 2015 at 12:38:43 AM UTC-7, Edward Henderson wrote:
>
> The documentation says USE_SOUTH Default:True. Is that still the case? 
>

-- 
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] Changing admin inline to "Orderable"

2015-10-20 Thread Neum Schmickrath
Thanks for the feedback and ideas. There are tons of these unfortunately so 
exposing the order fields wouldn't really work for me. Christian, to expose 
the _order field you should be able to edit admin.py and include the _order 
field in your inline, making it show up in your admin form (I didn't test 
this though). I went the data migration 
 
route. In case it's helpful to anyone else here is the data migration I 
used.


# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations


class Migration(migrations.Migration):

def _order_update(apps, schema_editor):
order = 0
faq = apps.get_model("shop", "ProductFaq")
for faqinline in faq.objects.all():
order += 1
faqinline._order = order
faqinline.save() 

dependencies = [
('shop', '0013_auto_20151013_0937'),
]

operations = [
migrations.RunPython(_order_update),
]

You would need to change the model name etc as necessary of course.


On Tuesday, October 13, 2015 at 11:07:39 PM UTC-6, Christian Hoffmann wrote:
>
> Hello,
> How to enable direct access to the _order field in the admin? 
> Thanks a lot...
>
>
>

-- 
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 admin inline to "Orderable"

2015-10-13 Thread Neum Schmickrath
A few years ago I added several inline classes to Cartridge products. After 
upgrading to the latest Mezzanine and Cartridge versions I want to be able 
to use the drag and drop functionality in Orderable to be able to set the 
order of these inlines. Following the example in the Forms app I've set it 
to use the Orderable class and then created the database migration to add 
the _order field to the inline. The arrows now show up in the Admin 
interface and I can drag and drop them just like images and other inlines 
that use Orderable. But when I save the product it doesn't do anything. 
Looking into it further it's apparent that's because there are no numbers 
assigned in the database on the _order column. I'm sure this is because 
these products already exist so it's not assigning them order values on 
save. 

I'm wondering what the best way would be to get the initial sort order on 
these inlines? I'm thinking of maybe a custom migration that loops through 
the products and sets the order? Any ideas what the best way to approach it 
would be?

Thanks!

-- 
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] Cartridge products not fully site related

2015-09-22 Thread Neum Schmickrath
Excellent! Thanks for the super fast fix Stephen. 

On Monday, September 21, 2015 at 5:30:49 PM UTC-6, Stephen McDonald wrote:
>
> That's a bug - I've fixed it here:
>
>
> https://github.com/stephenmcd/cartridge/commit/e67786cad0c86fbd4c3bd91661ea608e9736826f
>
> On Tue, Sep 22, 2015 at 1:59 AM, Neum Schmickrath  > wrote:
>
>> I'm having some difficulty with a new Cartridge shop. It needs to have 
>> several separate regions where products have different content and I 
>> thought that the multi-tenancy of Mezzanine would be a great fit. The 
>> problem is that Cartridge products are siteRelated through the Displayable 
>> class but product SKU's are not! This means that if you have the same 
>> product in separate sites you can't use the same SKU, which is a problem 
>> because this site uses a script to sync quantities and prices of 
>> variations. I'm not sure the best approach to this problem. Anyone have any 
>> ideas on where I should start? 
>>
>> -- 
>> 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 .
>> 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.


[mezzanine-users] Cartridge products not fully site related

2015-09-21 Thread Neum Schmickrath
I'm having some difficulty with a new Cartridge shop. It needs to have 
several separate regions where products have different content and I 
thought that the multi-tenancy of Mezzanine would be a great fit. The 
problem is that Cartridge products are siteRelated through the Displayable 
class but product SKU's are not! This means that if you have the same 
product in separate sites you can't use the same SKU, which is a problem 
because this site uses a script to sync quantities and prices of 
variations. I'm not sure the best approach to this problem. Anyone have any 
ideas on where I should start? 

-- 
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: dj-stripe vs cartridge-stripe

2015-09-19 Thread Neum Schmickrath
I've never seen any documentation for it. I've used it for years on several 
cartridge sites without issues. After someone pays successfully with Stripe 
the Stripe token is saved with the order which you can view in the admin. 
>From there it's simple to adjust or refund the order as needed in the 
stripe control panel by searching for that order token in the Stripe 
dashboard. 


On Saturday, September 19, 2015 at 4:56:54 PM UTC-6, Ryne Everett wrote:
>
> Is there some reason you don't want to use the baked in Stripe integration?
>
>
> My reason is primarily that I'd never noticed that module before. Is there 
> any documentation or did you just stumble upon it?
>
> On Fri, Sep 18, 2015 at 5:35 PM, Neum Schmickrath  > wrote:
>
>> Is there some reason you don't want to use the baked in Stripe 
>> integration? Set up a shop just last weekend and it works great. All you 
>> have to do is set the following in settings.py
>>
>> SHOP_HANDLER_PAYMENT = "cartridge.shop.payment.stripe_api.process"
>> STRIPE_API_KEY = "sk_live_..."
>>
>> You can set the STRIPE_API_KEY to the test key in local_settings.py and 
>> test away locally. You'll of course have to serve the payment pages over 
>> SSL to process live payments via Stripe. It does not create a customer in 
>> Stripe, so if you need that functionality you'll need to adapt the payment 
>> processor.
>>
>>
>>
>> On Tuesday, September 15, 2015 at 12:54:58 PM UTC-6, William Dai wrote:
>>>
>>> Need some guidance here.
>>>
>>> I am thinking to have e-commerce enabled and am wondering whether we 
>>> should go with dj-stripe to get it working with cartridge, or go with the 
>>> built-in cartridge-stripe integration.  which way is the right way to go?
>>>
>>> I have seen dj-stripe group very active but I have no idea the hidden 
>>> challenges to get payment working fine and secure.
>>>
>>> Any comments appreciated.
>>>
>>> Also by the way, we are also looking for paid consultant to help us get 
>>> website into production.  We think our website is not complicated at this 
>>> time but still feel like challenging as we are new to django eco system.  
>>> Not much time too :)  We are in US North Carolina.
>>>
>>> Thanks,
>>> William
>>>
>>> -- 
>> 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 .
>> 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: dj-stripe vs cartridge-stripe

2015-09-18 Thread Neum Schmickrath
Is there some reason you don't want to use the baked in Stripe integration? 
Set up a shop just last weekend and it works great. All you have to do is 
set the following in settings.py

SHOP_HANDLER_PAYMENT = "cartridge.shop.payment.stripe_api.process"
STRIPE_API_KEY = "sk_live_..."

You can set the STRIPE_API_KEY to the test key in local_settings.py and 
test away locally. You'll of course have to serve the payment pages over 
SSL to process live payments via Stripe. It does not create a customer in 
Stripe, so if you need that functionality you'll need to adapt the payment 
processor.



On Tuesday, September 15, 2015 at 12:54:58 PM UTC-6, William Dai wrote:
>
> Need some guidance here.
>
> I am thinking to have e-commerce enabled and am wondering whether we 
> should go with dj-stripe to get it working with cartridge, or go with the 
> built-in cartridge-stripe integration.  which way is the right way to go?
>
> I have seen dj-stripe group very active but I have no idea the hidden 
> challenges to get payment working fine and secure.
>
> Any comments appreciated.
>
> Also by the way, we are also looking for paid consultant to help us get 
> website into production.  We think our website is not complicated at this 
> time but still feel like challenging as we are new to django eco system.  
> Not much time too :)  We are in US North Carolina.
>
> Thanks,
> William
>
>

-- 
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: Creating templates for custom page types anywhere in the tree

2015-08-19 Thread Neum Schmickrath
The only thing I can think of is that you possibly have a template in the 
sub-tree that has the same name so it's overriding the custom page's 
default template. For instance in your example if you placed Page B under 
Page A and you had a template at pages/page-a/page-b.html it's going to use 
that template first instead of the default template that might be at 
pages/page-b.html. If you add the beginning of your custom class and the 
URL settings of the pages you have created it would be helpful in trying to 
figure out what is going on.

On Wednesday, August 19, 2015 at 11:36:57 AM UTC-6, Avery Laird wrote:
>
> Hi Neum,
>
> My custom templates do extend `pages/page.html`, but for some reason are 
> not being rendered. Do you know of any other possible reasons this could be 
> an issue? As far as I know, if the template is named correctly, in the 
> right directory, and extends pages/page.html, it should render properly.
>
> On Wed, Aug 19, 2015, 10:29 AM Neum Schmickrath  > wrote:
>
>> Let's say you created a custom page type and the model class is "Test" 
>> and then in your pages templates folder you placed your template at 
>> pages/test.html. In that case you should be able to create a "test" page 
>> anywhere in the tree and have it rendered using the test.html template 
>> assuming that your test.html template extends the page template like {% 
>> extends "pages/page.html" %}. Make sure and load mezzanine_tags and other 
>> tags in that template as needed as well. It sounds like you aren't 
>> extending the template so it's only overriding the specific page at that 
>> URL. 
>>
>>
>> On Tuesday, August 18, 2015 at 6:01:38 PM UTC-6, Avery Laird wrote:
>>>
>>> Hello,
>>>
>>> I've been creating some custom pages types, and templates to display 
>>> them. I've been placing the templates in `pages/` and giving them the same 
>>> name as the custom page. This works fine, except for when I place the page 
>>> somewhere else in the tree. For example, if I have two custom pages (Page A 
>>> and Page B) and place Page B under Page A in the page tree, the page is no 
>>> longer rendered using my template. Looking at the docs, I'm not sure how to 
>>> handle this. Any help would be great!
>>>
>>> Cheers
>>>
>> -- 
>> 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/26nJSXEyxMs/unsubscribe
>> .
>> To unsubscribe from this group and all its topics, send an email to 
>> mezzanine-use...@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: Creating templates for custom page types anywhere in the tree

2015-08-19 Thread Neum Schmickrath
Let's say you created a custom page type and the model class is "Test" and 
then in your pages templates folder you placed your template at 
pages/test.html. In that case you should be able to create a "test" page 
anywhere in the tree and have it rendered using the test.html template 
assuming that your test.html template extends the page template like {% 
extends "pages/page.html" %}. Make sure and load mezzanine_tags and other 
tags in that template as needed as well. It sounds like you aren't 
extending the template so it's only overriding the specific page at that 
URL. 

On Tuesday, August 18, 2015 at 6:01:38 PM UTC-6, Avery Laird wrote:
>
> Hello,
>
> I've been creating some custom pages types, and templates to display them. 
> I've been placing the templates in `pages/` and giving them the same name 
> as the custom page. This works fine, except for when I place the page 
> somewhere else in the tree. For example, if I have two custom pages (Page A 
> and Page B) and place Page B under Page A in the page tree, the page is no 
> longer rendered using my template. Looking at the docs, I'm not sure how to 
> handle this. Any help would be great!
>
> Cheers
>

-- 
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 4.0 is released

2015-07-15 Thread Neum Schmickrath
I should be able to take on the update of the changelog to a manual format. 
Did you want it in Restructured text format in the Docs? How would you like 
each change listed? Can you give me a brief example I can work from?

 

-- 
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] Old Docs

2014-05-16 Thread Neum Schmickrath
I'm working with an earlier (forked) version of Mezzanine and Cartridge and 
was wondering if there was someplace I can find docs for older versions of 
Mezzanine. Specifically this was customized from 1.4.12. Is the best way to 
just checkout the correct tag / branch from github and build the docs 
locally?

Thanks!

-- 
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] need help on extending mezzanine core/base.html in my own app templates

2014-04-07 Thread Neum Schmickrath
For anyone else maybe struggling with this, what Josh meant was you would 
change the following in views.py:

context = Context()
return HttpResponse(template.render(context))

To instead use RequestContext so you would have something like this: 
(removing the context =... line)
return render_to_response('regform/registration.html', 
context_instance=RequestContext(request))



On Friday, May 24, 2013 6:06:56 PM UTC-6, Chi-Cheong Weng wrote:
>
> I digged a little deeper. If I removed line 35 of based.html (script 
> src="{% static "mezzanine/js/"|add:settings.JQUERY_FILENAME %}">, 
> which is actually mezzanine/js/jquery-1.7.1.min.js) and line 3 of 
> includes/footer_scripts.html (i.e. {% editable_loader %}), the page can 
> render, but then I  lost the inline editable feature when I logged in as 
> admin. Apparently me the inline-editable thing is not happy with this.
>
> Any clue how my extending base.html in my template file could *cause*this 
> behavior? I see other mezzanine apps do this without causing any 
> problems (e.g. mezzanine/accounts/templates/accounts/account_form.html)
>
> I dont understand what you meant by "I need to use a RequestContext", how 
> and where do I make such change?
>
> On Saturday, May 25, 2013 2:04:26 AM UTC+8, Josh Cartmell wrote:
>>
>> I think that you need to *user a RequestContext instead of a normal 
>> Context *because the settings variable is only inserted into a 
>> RequestContext by Mezzanine.
>>
>> On Fri, May 24, 2013 at 9:02 AM, Chi-Cheong Weng wrote:
>>
>>> My goal is to use the default mezzanine layout (i.e. one top nav bar 
>>> plus three columns) for my project app.
>>> But I keep having problems when I try to extend the mezzanine's 
>>> base.html in my app templates.
>>>
>>> My new mezzanine app is called people. I added url(r"^people/", 
>>> include("people.urls")) to mysite/urls.py. I also added "people" to the end 
>>> of INSTALLED_APPS in mysite/settings.py 
>>>
>>> Here are what mysite/people/urls.py and mysite/people/views.py look:
>>>
>>> urls.py:
>>> from django.conf.urls import patterns, url
>>> from people import views
>>> urlpatterns = patterns('',
>>> # list recent reviews
>>> url(r'^$', views.index, name='index'),
>>> )
>>>
>>> views.py:
>>> from django.shortcuts import render
>>> from django.http import Http404, HttpResponse
>>> from django.template import Context, loader
>>> from people.models import Person
>>> def index(request):
>>> latest_people_list = Person.objects.order_by("-last_name")[:10]
>>> template = loader.get_template("people/index.html")
>>> context = Context()
>>> return HttpResponse(template.render(context))
>>>
>>> The index.html for http://mysite/people is located at 
>>> mysite/people/templates/people/index.html
>>> If I kept the following *two lines* at the *beginning* of my 
>>> index.html, the page would not render. If I removed those two lines, the 
>>> page renders but I lost of the default mezzanine layout, which I don’t want 
>>> to. Does anyone know what I am missing? Your help will be appreciated.
>>>
>>>
>>> *{% extends "base.html" %}{% load i18n mezzanine_tags %}*
>>>
>>> Here is the complete error message:
>>>
>>> VariableDoesNotExist at /reviews/ 
>>>
>>> Failed lookup for key [settings] in u"[{'False': False, 'None': None, 
>>> 'True': True}]"
>>>
>>>  Request Method: GET  Request URL: http://127.0.0.1:8000/reviews/  Django 
>>> Version: 1.5.1  Exception Type: VariableDoesNotExist  Exception Value: 
>>>
>>> Failed lookup for key [settings] in u"[{'False': False, 'None': None, 
>>> 'True': True}]"
>>>
>>>  Exception Location: 
>>> /home/cweng/Envs/ratecoworkers/local/lib/python2.7/site-packages/django/template/base.py
>>>  
>>> in _resolve_lookup, line 771  Python Executable: 
>>> /home/cweng/Envs/ratecoworkers/bin/python  Python Version: 2.7.1  Python 
>>> Path: 
>>>
>>> ['/home/cweng/workspace',
>>>  '/home/cweng/workspace/ratecoworkers',
>>>  
>>> '/home/cweng/Envs/ratecoworkers/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg',
>>>  
>>> '/home/cweng/Envs/ratecoworkers/local/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg',
>>>  '/home/cweng/Envs/ratecoworkers/lib/python2.7',
>>>  '/home/cweng/Envs/ratecoworkers/lib/python2.7/plat-linux2',
>>>  '/home/cweng/Envs/ratecoworkers/lib/python2.7/lib-tk',
>>>  '/home/cweng/Envs/ratecoworkers/lib/python2.7/lib-old',
>>>  '/home/cweng/Envs/ratecoworkers/lib/python2.7/lib-dynload',
>>>  '/usr/lib/python2.7',
>>>  '/usr/lib/python2.7/plat-linux2',
>>>  '/usr/lib/python2.7/lib-tk',
>>>  '/home/cweng/Envs/ratecoworkers/local/lib/python2.7/site-packages']
>>>
>>>  Server time: Fri, 24 May 2013 23:11:20 +0800  
>>> Error during template rendering 
>>>
>>>
>>> *In template 
>>> /home/cweng/Envs/ratecoworkers/local/lib/python2.7/site-packages/mezzanine/core/templates/base.html,
>>>  
>>> error at line 35 {If I remove this line (i.e. line 35) in base.html, there 
>>> will be other errors!} *
>>> (Could not get exception message)

[mezzanine-users] Re: pg_restore error

2014-03-27 Thread Neum Schmickrath
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 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] Bleach

2014-01-06 Thread Neum Schmickrath
Took me quite a while to track this down. The problem was not the actual 
button tag - it was the  inside of it. There may be other combinations 
of tags that Bootstrap uses that would need to be added here but none that 
I've encountered yet. I added a pull request with the change 
here https://github.com/stephenmcd/mezzanine/pull/886.

I also noticed that there were two entries for "theme_advanced_styles" in 
the config. Not sure if that was intentional or not.

Thanks for getting back to me so quick in response. It helped me track it 
down by focusing on TinyMCE. 

Also, not sure where to add new sites but I created aldlocator.com a few 
months back and it's powered by Mezzanine and Postgis.


On Monday, January 6, 2014 12:26:05 PM UTC-7, Stephen McDonald wrote:
>
> All the filtering occurs server-side, but it looks like "button" tags are 
> somehow being stripped by tinymce itself client-side, so you'll need to 
> play withs its config to resolve it. Please let us know what you change, 
> because we can make that the default - feel free to create a pull request 
> with the change too.
>
>
> On Tue, Jan 7, 2014 at 4:09 AM, Neum Schmickrath 
> 
> > wrote:
>
>> Developing a new site and I've noticed that Bleach seems to filter out 
>> tags commonly used in Bootstrap. In this case I'm trying to add some HTML 
>> to a rich text page like:
>>
>> > href="/about-us-events">Events
>> > href="/advocacy/hearing-loss/">Hearing Loss Advocacy
>>
>> But bleach strips out the  tags. I tried changing the RichText 
>> Filter setting to None, but that does not affect this. It seems it would 
>> also filter out many of the other common Bootstrap tags such as  etc.
>>
>> I can add these (and others) to the ALLOWED_TAGS settings in Bleach, but 
>> I'm wondering if anyone else has dealt with this and if there is a best 
>> approach to adding Bootstrap tags to bleach?
>>  
>> -- 
>> 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 .
>> 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.


[mezzanine-users] Bleach

2014-01-06 Thread Neum Schmickrath
Developing a new site and I've noticed that Bleach seems to filter out tags 
commonly used in Bootstrap. In this case I'm trying to add some HTML to a 
rich text page like:

Events
Hearing Loss Advocacy

But bleach strips out the  tags. I tried changing the RichText 
Filter setting to None, but that does not affect this. It seems it would 
also filter out many of the other common Bootstrap tags such as  etc.

I can add these (and others) to the ALLOWED_TAGS settings in Bleach, but 
I'm wondering if anyone else has dealt with this and if there is a best 
approach to adding Bootstrap tags to bleach?

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