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

django-merlin eats exceptions and returns a 404? #8

Closed
stodge opened this issue Jun 2, 2011 · 5 comments
Closed

django-merlin eats exceptions and returns a 404? #8

stodge opened this issue Jun 2, 2011 · 5 comments
Labels

Comments

@stodge
Copy link

stodge commented Jun 2, 2011

Why does django-merlin seem to eat exceptions and return a 404?

If I have any errors in my code that uses django-merlin, I get a 404 with no output from django's dev server? Is there something I'm doing wrong? For example currently I'm getting a 404 after initialize() is called on my subclassed wizard:

Initialise {'form_data': {}, 'current_step': create-portlet, 'steps': [create-portlet]}

    def initialize(self, request, wizard_state):
        print('Initialise %s' % wizard_state)

My urls.py contains:

(r'^portlets/(?P[A-Za-z0-9_-]+)$', PortletWizard([Step('create-portlet', CreatePortletForm)])),

Thanks

@supercodepoet
Copy link
Owner

Let me take a look at this

@supercodepoet
Copy link
Owner

There are three places the django-merlin will throw a 404:

  1. If the there is no slug in the kwargs, which indicates that the url pattern might be incorrect
  2. If it can not find a step for that slug and the slug is not the special keyword 'cancel' (used to cancel a session wizard)
  3. If you use any other HTTP method beyond GET and POST. Right now it only supports those two HTTP verbs.

Can you send me a gist of your wizard and url conf and I can take a look?

@acgray
Copy link

acgray commented Jan 29, 2012

I am having the same problem here...... any thoughts? Gist here: https://gist.github.com/1700054

I added some descriptions to the Http404 exceptions and it is failing because it can't find a Step with the given slug. get_steps() finds the Steps I have defined though, but with a slug=''. HOWEVER print(self.slug) in Step.init() returns the right thing?! So it seems to get lost somewhere in between there and being retrieved from the session. It remembers the form though.......

Thanks in advance.

@supercodepoet
Copy link
Owner

Ok, the squashing of errors using a 404 was removed. Now custom exceptions or existing exceptions should be raised.

@supercodepoet
Copy link
Owner

Sorry, this was fixed in version 0.7

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

No branches or pull requests

3 participants