Skip to content

Demo site 500 #356

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

Closed
elena opened this issue Jun 10, 2017 · 8 comments
Closed

Demo site 500 #356

elena opened this issue Jun 10, 2017 · 8 comments

Comments

@elena
Copy link

elena commented Jun 10, 2017

Following links on demo site return Server Error 500:
http://json-api.jerel.co/

       "blogs": "http://json-api.jerel.co/blogs",
       "entries": "http://json-api.jerel.co/entries",

Note other links work:

        "authors": "http://json-api.jerel.co/authors",
        "comments": "http://json-api.jerel.co/comments"

Cheers.

@mblayman
Copy link
Collaborator

Thanks, @elena. I believe this runs on the personal website of @jerel. If I had to venture a guess, the site is probably missing some database migrations that were recently added the demo project.

@jerel
Copy link
Member

jerel commented Jun 11, 2017 via email

@jerel
Copy link
Member

jerel commented Jun 12, 2017

So, it's throwing ImportError: No module named polymorphic. Merely installing django-polymorphic doesn't fix it. Evidently there's a package missing from the requirements file. But does, or should, the demo even use polymorphism out of the box?

@mblayman
Copy link
Collaborator

@jerel, I believe that the polymorphic branch that was merged did update the demo project to use polymorphic models in some locations. I'm surprised (saddened?) that installing django-polymorphic doesn't solve the problem.

Do you have any details on what it is reporting after you install django-polymorphic? Did you get past the ImportError?

@jerel
Copy link
Member

jerel commented Jun 19, 2017

So, I've worked with this a bit and found the demo hadn't applied migrations correctly. The /blogs endpoint is working fine but /entries is throwing Could not resolve URL for hyperlinked relationship using view name "entry-relationships".

I'm out of time for the moment but hopefully that gets somebody else pointed in the right direction. You can replicate by checking out the develop branch and running django-admin.py runserver --settings=example.settings

@mblayman
Copy link
Collaborator

@leo-naeka or @astronouth7303, something is wrong with the demo site and I'm guessing it's related to the polymorphic changes. Could one of you take a quick look and see if you could figure out the problem? I'd hope to see the demo site working again before a release goes out.

@AstraLuma
Copy link
Contributor

I have found a few bugs:

  1. The example now requires packaging (example/serializers.py). I'm guessing this is the actual cause of the bug.
  2. /entries produces ImproperlyConfigured at /entries: Could not resolve URL for hyperlinked relationship using view name "entry-relationships".
  3. /projects produces AttributeError at /projects: 'list' object has no attribute '_meta'

@AstraLuma AstraLuma mentioned this issue Jun 30, 2017
3 tasks
@AstraLuma
Copy link
Contributor

From @leo-naeka:

Actually the ImproperlyConfigured at /entries: Could not resolve URL for hyperlinked relationship using view name "entry-relationships". bug was introduced before the polymorphic feature merge: occurs in 629d1d6.

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

4 participants