FinalsClub/djKarma

Create a course lightbox

Closed this issue · 3 comments

  • will use the add_note lightbox styling (fork the template)
  • But will have fields for course
    • Title
    • Field
    • Instructor
    • Instructor email address (add this field)
    • Desc (optional)

Set semester and year as this one by default

      "field":"COMPSCI",
      "number":"50",
      "title":"Introduction to Computer Science I",
      "faculty":"Malan",
      "description":"Introduction to the intellectual enterprises of computer science and the art of programming.",

create a form that uses ajax submit to pass the field that we want to use to create a course.

Create a ajax style view on the backend.

Look at FileMeta in views.py for ajax view example.

delete all the ajax for uploading from the lightbox template.

modify the course model to add instructor email.

DO:
make it look right - fork the lightbox template - says the words 'create a course at the top'
look in app.js -- see how lightboxes are called to appear
look at how file metadata submit function works (app.js) - click handler collects data, makes ajax post request. - duplicate this functionality so it makes an ajax post request with the course data from our form
create a url route and an acompanying view for our create a course.
use a form to validate the posted data

TO START:
Create a view, url mapping, form for creating a course
See documentation for django model form -- auto generate form from db model

Lightbox has a dangling submit button