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

Questions on Vote_vote db and user_id part #55

Open
heeryung opened this issue Aug 9, 2017 · 1 comment
Open

Questions on Vote_vote db and user_id part #55

heeryung opened this issue Aug 9, 2017 · 1 comment

Comments

@heeryung
Copy link

heeryung commented Aug 9, 2017

Hi,

I am a newbie in Django, and I have struggled with two problems.
The first issue seems to be related to the user_id section. Every time I try to run python manage.py runserver, I face an error message as follows: "ValueError at /feedback/display/up/
invalid literal for int() with base 10: '12345a1dd12345555a0a55" <--- this is a random string to deidentify the id info, but basically you can see it is a mixture of numbers and alphabets, which are not int() at all. How should I change the user_id section to include not only ints but also strings?

The second issue popped up after I put random numbers instead of the strings in the user_id section. An error message I've got is as follows :ProgrammingError at /feedback/display/up/
(1146, "Table 'mydb.vote_vote' doesn't exist"). Should there be a db table called vote_vote in my database? Should I create one or it should've been there once I install django-vote?

Thanks!

This is my view.py

def feedback_display (request) :
     if request.GET.get("vote-up"):
        thumbsup_1 = PeerFeedback.objects.get(reviewee_user_id=given_user_id, reviewer_user_id=reviewer_user_id_1)
        thumbsup_1.votes.up(request.session['lti_launch_params']['user_id'])

        return redirect("polls/feedback_display.html", {'thumbsup_1': thumbsup_1})
@shellfly
Copy link
Owner

First question, currently we don't support string user id, if you really want string user id, you have to fork and change the field type.

Second, you have to run ./manage.py migrate to create vote_vote in db.

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

2 participants