librelist archives

« back to archive

Adding more URLs

Adding more URLs

From:
Elver Loho
Date:
2010-08-26 @ 13:51
Hi,

I'm trying to add this URL to Zine in urls.py:

Rule('/cover/<string:isbn13>', endpoint='blog/cover'),

The cover(req, isbn13) function is in views/blog.py but Zine doesn't
find it for some reason. Basically dispatch_request() throws a
KeyError for "blog/cover" at response = self.views[endpoint](request,
**args) in application.py

How should I add the /cover/xxx URL to Zine?

Best,
Elver

elver.loho@gmail.com
+372 5661 6933
http://memeresearch.com/
skype: elver.loho

Re: [zine] Adding more URLs

From:
Artem Egorkine
Date:
2010-08-27 @ 06:23
Hi,

Besides adding the rule in zine/urls.py, have you defined the endpoint
in zine/views/__init__.py?

Regards,
Artem

On Thu, Aug 26, 2010 at 4:51 PM, Elver Loho <elver.loho@gmail.com> wrote:
> Hi,
>
> I'm trying to add this URL to Zine in urls.py:
>
> Rule('/cover/<string:isbn13>', endpoint='blog/cover'),
>
> The cover(req, isbn13) function is in views/blog.py but Zine doesn't
> find it for some reason. Basically dispatch_request() throws a
> KeyError for "blog/cover" at response = self.views[endpoint](request,
> **args) in application.py
>
> How should I add the /cover/xxx URL to Zine?
>
> Best,
> Elver
>
> elver.loho@gmail.com
> +372 5661 6933
> http://memeresearch.com/
> skype: elver.loho
>