Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about multiple decorators #58

Open
tflorac opened this issue Jun 7, 2018 · 0 comments
Open

Question about multiple decorators #58

tflorac opened this issue Jun 7, 2018 · 0 comments

Comments

@tflorac
Copy link

tflorac commented Jun 7, 2018

Hi,
I created two new Python decorators in a Pyramid's project using Venusian to define custom views and add functionalities to them.
I can have several decorators for the same view:

    @page_config(name='myview.html', ...)
    @ajax_config(...)
    class MyViewClass(object):
        """My custon view class"""

My questions are :

  • how can I define decorators order? Actually, whatever order I use, "ajax_config" decorator is always called before "page_config"...
  • to avoid duplicates, is it possible in a decorator to get arguments defined in the previous decorator?

Best regards,
Thierry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant