Skip to content
This repository has been archived by the owner on Apr 14, 2019. It is now read-only.

Getting "Server Error (500)" from Django Admin #236

Open
elinaru opened this issue Mar 30, 2016 · 8 comments
Open

Getting "Server Error (500)" from Django Admin #236

elinaru opened this issue Mar 30, 2016 · 8 comments

Comments

@elinaru
Copy link
Contributor

elinaru commented Mar 30, 2016

When doing the following actions (and perhaps others), I'm getting a "Server Error (500)"
when logged into http://admin.caciviclab.org/admin/ -->

Viewing: Ballot item selections
Viewing: Ballot items
Viewing: Referendums
Deleting item: Ballot
Adding: Candidate
Deleting item: City

I'm almost certain I'm not to blame.

@bcipolli
Copy link
Collaborator

Hard to tell; the master branch is far behind the develop branch. The solution is to wrap up modifications on the develop branch and release to master. Hope to have that ready soon!

@elinaru
Copy link
Contributor Author

elinaru commented Apr 6, 2016

CC @tdooner

@elinaru
Copy link
Contributor Author

elinaru commented Apr 27, 2016

Hey @bcipolli any progress in this? The "Server Error (500)" thing is still happening --

@bcipolli
Copy link
Collaborator

Hi @elinaru , I will take a look at this over the weekend to validate the develop branch, and let y'all know if it's ready for master.

@jeremyad
Copy link

Accidentally posted this in the wrong issue before.

The problem appears to be with line 28 of disclosure/urls.py:
url(r'^docs/', include('rest_framework_swagger.urls')),
Simply removing this line eliminates the 500 error, but also gets rid of the (currently broken) documentation.

In a series of changes on June 7 (starting with this commit), the rest_framework_swagger module was totally rewritten, and there is no longer a rest_framework_swagger.urls module.

The new way to use django-rest-swagger is documented here. I should be able to take a look at this this evening or tomorrow, but if someone else wants to do it, they're welcome to.

@KyleW 's response there:

Good find! That pr is tagged with v2.0.0a0 which the release notes says has breaking changes. We probably didn't mean to pull that version in.

The easiest fix might be to point at an earlier, stable version and lock down our dependency so we don't accidentally grab latest.

jeremyad pushed a commit that referenced this issue Jul 21, 2016
New versions 2.x of django-rest-swagger have breaking changes. This
restores it to the last version from before those changes.
@bcipolli
Copy link
Collaborator

Sounds like an easy fix? Just update the requirements.txt file to an appropriate version?

@bcipolli
Copy link
Collaborator

In the last build I used (worked), I had:

  • rest_framework v3.3.2
  • rest_framework_swagger v0.3.4

@KyleW
Copy link

KyleW commented Jul 21, 2016

@jeremyad just pushed the change. Although it looks like it inadvertently went straight to master (8f676fd). It's a pretty small change. Is everyone good with leaving the commit and closing the issue?

If we really want to keep the merge history clean we can revert it, cut a new branch, revert the revert on the new branch and open a pr from there. But I'm not sure it's worth it for this one.

We should also probably update the permissions to prevent pushing directly to master.

mikeubell added a commit to mikeubell/disclosure-backend that referenced this issue Aug 14, 2016
…o noReport

* 'master' of github.com:caciviclab/disclosure-backend:
  Set the ShowSuperceded parameter
  Join errors with a newline and coerce them to strings
  Don't re-raise errors in xformnetfilerawdata
  Add custom error for missing locality
  Add short_name for Alameda city/county
  ignore the entire data/ dir
  Add missing forms
  Move FIXTURES_DIR into disclosure app
  added csv files for candidates and ballot measures to data/fixtures
  BF: caciviclab#236: Restore django-rest-swagger to earlier version
  take out colon
  fix spacing
  fix formatting for steps 5 and 6 in software installation
  edited the read me
  Find ballot based on locality_id

Conflicts:
	finance/management/commands/xformnetfilerawdata.py
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants