A lot of times I use the same view for both editing items and making new 
items.  How can I determine which view name is being called?  I know I'm 
not explaining myself very well, so to talk in code:

@view_config(context=Context, name='new', renderer='edit.pt')
> @view_config(context=Context, name='edit', renderer='edit.pt')
> def edit(context, request):
>     if [name is 'edit']:
>         #Load data to edit
>     elif [name is 'new']:
>         #Do something else
>     #Do more stuff


-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/pylons-discuss/-/K9tlYDAZ3msJ.
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/pylons-discuss?hl=en.

Reply via email to