Sample Exam: Cat Database CRUD

In this sample exam you will build a web based application to track data about cats (i.e. Tabby, Persian, Maine Coon, Siamese, Manx, etc.). We will only allow logged in users to track cats.

Sample Exam Rules

(If this were a real exam) In order for us to consider your exam for grading, you must read the statement below and if you agree with the statement sign and date below and turn the entire exam packet in at the end of the exam. If you do not return this signed exam sheet before you leave the room, your exam will not be graded and you will receive a zero on this exam.

This examination represents my own work and I have neither received nor given anyone any aid on this examination.

SIGNATURE: ________________________________________________

PRINT NAME: __________________________________________________

Date:  _______________

If this were a real exam, it would be open-book, open notes, open network, and you can use any of your prior work for the class to complete the exam. You cannot listen to audio or watch any videos during the exam. You cannot get any help from any other person. You also cannot give any help to any other person. We will grade partial solutions so you should hand in your work at the end of the exam even is it is not 100% complete. Please do not discuss the nature of the exam with anyone except the teaching staff until we tell you that all students have completed the exam.

Note: You must upload a ZIP file of your application to the LMS to receive full credit for the exam even if the autograder gives you a perfect score. If your application is not working at the end of the exam period (even if the autograder still is giving you a score of zero), make sure to ZIP up your code and upload it to the LMS so we can hand grade your exam and give you a more appropriate score than the autograder.

Sample Implementation

You can experiment with a reference implementation at:

https://chucklist.dj4e.com/cats

The login information is as follows:

    Account: dj4e-crud
    Password: dj4e_nn_!
The 'nn' is a 2-digit number that by now, you should be able to easily guess.

Specifications / Tasks

Here are some general specifications for this sample exam:

Hand-Testing Your Application

While it might be tempting to edit all your code following the above instructions and immediately send it to the autograder, you usually can save a lot of time by running a quick hand-check of your application. Errors are much easier to see in a browser than in the autograder. Do all these steps:

You should be able to do this hand test in about a minute once you do it a few times.

Once you are confident that all the views are working without error, then you can send it to the autograder.

Using the Autograder

This sample exam will be automatically graded. You will have unlimited attempts in the autograder until the deadline for submission. Your web server will need an Internet-accessible URL so you can submit it for autograding. You can do this either using PythonAnywhere.

Please see the process for handing in the sample exam at the end of this document.

If the autograder complains about a missing "dj4e" meta tag, add or edit it in your home/templates/base_bootstrap.html file:

<meta name="dj4e" content="--provided-by-autograder--">
If the autograder does not find the tag, it will run all the tests but will not treat the grade as official.

If the autograder complains about a missing "dj4e-code" meta tag, add or edit it in your home/templates/base_bootstrap.html file:

<meta name="dj4e-code" content="missing">
If you are adding an application to an existing Django project that you have already run through the autograder, you probably already have good value for both meta tags in your template file.

What To Hand In

This sample exam will be autograded by a link that you will be provided with in the LMS system. When you launch the autograder, it will prompt for a web-accessible URL where it can access your web application. Please also have in a ZIP of your source code of your new application in case there is a need to verify your work or assign partial credit.

If you are doing your work on PythonAnywhere, go into a console shell and create a ZIP file as follows:

    cd ~/django_projects/mysite
    rm -f cats.zip
    zip -r cats.zip cats -x '*pycache*'
Then download the ZIP file from `django_projects/mysite` using the Files tab of PythonAnywhere and upload the ZIP file back up to the LMS. Some browsers (i.e. Safari on the Mac) automatically extract the ZIP into a folder. If this happens simply compress it again to make a ZIP to upload.

If you are doing your work locally on a Mac or Windows and using ngrok to submist your assignment, you can make a ZIP by using the "Compress Folder" feature.


Provided by: www.dj4e.com
Copyright Charles R. Severance - All Rights Reserved