-
Notifications
You must be signed in to change notification settings - Fork 354
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
Project Documentation #90
Comments
I agree to this. How to use this library in my Django app? Anyone that has successfully integrated this app please post the steps on how to do it. Thank you |
I've successfully integrated it. I have a lot going on at the moment but might be able to put together a list of steps this weekend. Are there any specific questions you have right now? |
I'm glad that you have responded. At the moment I don't have any questions, if you can put up the steps during the weekend that would be really helpful. Thanks in advance. |
Nicely done @B-T-D , did you stick to the used version of |
@MarvinKweyu I used the latest python and django versions that I had at the time I did it (about 2 months ago)--it was Python 3.7 and Django 2.2. I don't remember having very many backwards compatibility problems, even though there's Python 2.7 type stuff in the django_quiz code. I haven't yet gotten it to pass the unittests included in the django_quiz repo, but haven't tried very hard yet, since in my particular project I've gotten it to do everything I've needed it to, so far. The 'quiz' Django-app is the heart of how it works, from what I remember ('quiz' as opposed to 'essay', 'multichoice', or 'true_false'). Most of the logic is in quiz/models.py and quiz/views.py. |
@B-T-D , great.I look foward to your set up guide. |
hey man, any updates on the guide that you wanted to provide to us? |
@KevinNathan97 , take a look at AssessMe Project. PS: Feel free to contribute 😃 |
Did anyone ever know how to integrate this in a Django project? I have followed the steps but i am stuck |
Here are steps I just confirmed worked to make a dummy Django project with the django_quiz (as in I set this up as its own mockup project starting from a blank slate, no other apps and no other packages installed in its virtual environment). For reference, I was working with:
Steps:
Pipenv installed the following versions of the dependencies:
I got the following warning about the quiz/views.py, but nothing appeared to break when I ignored it:
You can fix it easily by making the edit the warning suggests.
If you go to localhost:8000/ in a browser, you should see a "List of quizzes" header followed by "There are no available quizzes". If you used a different url pattern, like the 'q/' example from the readme, then localhost:8000 will return 404 but localhost:8000/q/ should work.
|
When I integrated this library into a real pre-existing project, I found I was able to just drop in the django_quiz code. So I just copied and pasted in the following folders from the as-cloned django_quiz:
And then made the appropriate updates to my project's urls.py and settings.py. Overall, I found the most helpful thing in integrating it was to set up the library in its own mockup project, to get a sense for how it was supposed to work. But the library won't work with Django 3, based on my experimentation. The project I integrated django_quiz into happened to be using Django 2.x, I think 2.2.6 at the time. |
@B-T-D , 👍 great info, you should probably make this a pull. |
@B-T-D This was helpful thanks alot. I was able to integrate into my existing project. |
@jameskomo that's awesome, glad it was helpful |
The above instructions do work even with |
Who has used the quiz app within the project not on the admin? Like be able to set up questions, quiz, category, sibcategory and quiz type on a standard template? I have used Django createviews but it is not just working and I have to do it on admin module |
ive got error not module name essay |
@danialshamas to solve the module not found error make sure all the modules such as essay, quiz, true_false, and multichoice are in the root directory of your project. |
Thanks man, thanks to you, I manage to understand it and make it work , even dockerize it. The problem was the python2 class encoding that wasn't compatible with Django 3.0 and above. Add six librairy and stuck Django to 2.2.9 in requirements.txt and tada! |
So I know this is meant to be a library. However, can we get documentation on this? There is nothing but a brief readme. Can some of those who've set up the project successfully come chip in? It's 2019 by the way so can we as well move to latest versions of the dependencies with reference to Django and Python.
The text was updated successfully, but these errors were encountered: