Actually, that didn't work for me.
My local_settings.py looks more like this:
URLS = patterns('',
)
SHOP_URLS = patterns('satchmo.shop.views',
(r'^about_us/', 'simple_direct_to_template', {'template':'mystuff/
test.html'}),
)
So if I put that line in the SHOP_URLS dictionary it wants to resolve
to the satchmo.shop.views module. That's ok, I guess, I should be able
to add a view and handle it that way. But I don't think that was the
intent of your example.
When I try this:
URLS = patterns('',
(r'^shop/about_us/', 'simple_direct_to_template',
{'template':'mystuff/test.html'}),
)
SHOP_URLS = patterns('satchmo.shop.views',
)
Then I get this:
TypeError at /shop/about_us/
'str' object is not callable
Request Method: GET
Request URL: http://www.ecosumo.com/shop/about_us/
Exception Type: TypeError
Exception Value: 'str' object is not callable
Exception Location: /usr/local/lib/python2.5/site-packages/django/
core/handlers/base.py in get_response, line 82
Python Executable: /usr/bin/python
Python Version: 2.5.2
Python Path: ['/opt', '/usr/local/lib/python25.zip', '/usr/local/lib/
python2.5', '/usr/local/lib/python2.5/plat-linux2', '/usr/local/lib/
python2.5/lib-tk', '/usr/local/lib/python2.5/lib-dynload', '/usr/local/
lib/python2.5/site-packages', '/usr/local/lib/python2.5/site-packages/
PIL']
Notice I had to put shop/ in front of 'about_us' in the second
example. If I don't, I just get a 404.
Also, I've tried substituting 'direct_to_template' for
'simple_direct_to_template' and I get the same error.
Any ideas?
On Sep 19, 4:50 pm, one_ninety <[EMAIL PROTECTED]> wrote:
> Thank you so much! I thought the answer would be a Django thingy and
> not some Satchmoriffic addition.
>
> Anyone have a recommendation for a good Django book (a paper one)? I
> have the ..in 24 hours book and the info is good, but when they jammed
> it into the 24 hour format it made it almost impossible for me to find
> information. Actually, I'll search the list, I'm sure someone has
> asked this before.
>
> Thanks again!
>
> On Sep 19, 4:28 pm, "Bruce Kroeze" <[EMAIL PROTECTED]> wrote:
>
> > On Fri, Sep 19, 2008 at 1:27 PM, one_ninety <[EMAIL PROTECTED]> wrote:
>
> > > I want to add a few templates that inherit from base_index.html. These
> > > will be primarily static pages without the left-side navigation and
> > > maybe recently viewed products.
>
> > > What's the best practice here? Would I really need to create a new
> > > Django app? I've tried copying what's happening with wishlist (without
> > > the model of course) but I'm not getting Django/Satchmo to recognize
> > > (ie load) my URL patterns when I do that.
>
> > In your local_settings, you have a dictionary, which looks something like
> > this:
>
> > SATCHMO_SETTINGS = {
> > 'SHOP_BASE' : '',
> > 'MULTISHOP' : False,
> > 'SHOP_URLS' : patterns('',
> > (r'^feed/', include('satchmo.feeds.urls')),
> > (r'^brand/', include('satchmo.product.brand.urls'))
> > )
>
> > }
>
> > What you want to do is add your urls like so, using the direct_to_template
> > view. Here I am adding a url resolver which will send requests
> > forhttp://yourshop/page1/tothe direct resolver, which will just show that
> > page. Recent products will still
> > work because they are done in a templatetag library, needing no context.
>
> > 'SHOP_URLS' : patterns('',
> > (r'^feed/', include('satchmo.feeds.urls')),
> > (r'^brand/', include('satchmo.product.brand.urls'))
>
> > (r'^page1/', 'simple.direct_to_template', {'template':
> > 'mystuff/page1.html'}),
> > )
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Satchmo users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/satchmo-users?hl=en
-~----------~----~----~----~------~----~------~--~---