Midnight on Sunday 28 August 2011
20%
Your task in this first assignment is to design, implement, test and document a simple Django project that manages a database of items of a singe type. The items could be articles in a discussion forum, objects offered for sale, but not people in a social network. More precisely, the project should allow users (members of the public) to add items to the database, browse the items, search for items that match a given query, update items and delete items. The task is an exercise in applying the list-detail and "crud" patterns.
Each item must have a name, a description, the date the item was added, and at least two other fields of different types, including one numerical type. Names are short strings and descriptions are arbitrary length strings.
Users may either browse the set of items in the database, search the set of all items in the database by entering a single search string that is matched against item names and descriptions, update items by changing any field value, and delete items.
The home page should simply contain a heading, a list of the five most recently added items, a link to a list of all items, a search form containing a single text field, and a form for adding new items.
Each item in a list of items (resulting from browsing or searching) should contain just the name of the item, and should be a link to a separate page containing the full details of that item. I.e., you are required to use the list-detail pattern. You may implement the list-detail pattern using either explicit views or generic views.
All user input must be appropriately sanitised and validated.
For simplicity, in this assignment, you do not need to paginate results of browsing or searching (though you may do so) and you must not define a user model or implement any user registration, authentication or authorisation mechanisms. (We'll add all these features in subsequent assignments.)
Start work now!
Design and implement and test your solution incrementally.
Start by designing the model that defines your items. This task is critical.
Then decide which URLs you will need, which views are associated with each script, and which templates are associated with each view.
Then incrementally design and implement the views and templates, testing at each stage. Leave queries until last; can get up to 18/20 without implementing queries.
Clarifications and more detailed suggestions may be given in lectures and laboratories.
We expect the structure of your application to be clear, simple, standards-conformant, validated, and well-documented. We expect the organisation and English in your implementation and documentation to be of high quality.
Assessment of your assignment will be based on functionality, implementation, documentation and overall quality. We will award approximately 10 marks for functionality, 4 marks for interface and interaction design, 4 marks for implementation quality and 2 marks for submission and documentation.
Remove all unnecessary files, e.g., file.py~ (note the tilde) from your project directory. Be careful!
Send me an email from your University account stating that you wish to submit your assignment. The email must be prepared exactly as follows:
To: r.topor@griffith.edu.au From: your University email address Subject: 7401ICT Assignment 1 Submission
The body of the email must contain the following:
The email must contain a zipped archive of your project directory, e.g., s1234567_assignment1.zip, as an attachment. To create such a zipped archive, give the following commands on grue:
cd /path/to/assignment1 cd .. zip -r s1234567_assignment1 assignment1
Here, /path/to/assignment1 is the path to your project directory.