Due date
Midnight on Tuesday 20 September 2011
Weight
20%
Task
Your task in this assignment is to design and implement an extension to
your solution (or my
solution) to Assignment 1 which allowed users
to extend, browse and search a set of items with a range of attributes.
For this assignment, your solution must also provide the following
additional capabilities:
- It must use the User model from
django.contrib.auth and a related UserProfile model
to represent users.
- It must provide user registration, login and
logout of users. It should also provide profile view and
update, including password update.
- It must restrict entry of new data items to logged-in users.
- It must store the the identity of the user who created each
data item with the data item (as a foreign key).
- It must allow the user who created a data item (and only
that user) to update or delete that data item.
- It must provide a new model Category to represent
categories. Each category must have a name and a description.
Depending on your application domain, you may specify either
a many-to-one relationship or a many-to-many relationship between items
and categories. Again, depending on your application domain, you may
either allow logged-in users (and only logged-in users) to
create categories (in this case called tags) or
allow only administrators to create new categories. (In each case,
newly created categories are visible to all users.)
- It must allow users to view recently added items (as in
Assignment 1), to view all items in a particular category, or to
search items by name or description from a single text
field. (There is no longer a
requirement to view all items in a single list.)
- It must use pagination, including page numbers, to
display lists of data items (using the list-detail pattern as normal).
- It must display the creator of each item on the item's details
page.
- If the creator of an item is logged in, it must also display
update and delete links or buttons on the item's
details page.
- It must validate and sanitise all user entered data.
- It must be implemented to avoid CSRF attacks.
- It must, of course, allow administrators to create, update or
delete any data item through the administration interface.
Some of these properties are more important than others, e.g., user
authentication, create-update-delete restrictions and categories are
more important than pagination.
Implementation requirements
- The project must use a single Django project and at least one
Django app
- The project must be named "assignment2".
- It must use models, views and templates. You can use either
user-defined views or generic views. All (generated) HTML documents
myst be valid HTML5 files.
- It must use cascading style sheets to provide a simple,
uniform, distinctive design. This design must use common header
and footer, some background colour, and some appropriate image.
A bonus mark is available if your design works nicely on a
small-screen mobile device. (Hint. On small screens, present
content before navigation.)
- It must contain a home page link and links for registration, login and
logout, and the name of any currently logged-in user, in a common
header on every page.
- It must provide an administrative interface that
allows administrators to conveniently add, update and delete items and
users, as well as a public interface.
- The project directory must contain a plain text README file
that identifies the project, describes what the project does (and
doesn't do), summarises how to use the project, and provides any other
useful information about the project.
- It must use good program structuring techniques. As a minimum, all
files, models and views should be well commented and, ideally, there
should be no
unnecessarily repeated or unnecessarily long code. Template
inheritance should be used to ensure a uniform appearance and to avoid
writing repeated HTML.
- All Python files must follow the Python style guidelines.
- It must not use JavaScript (but don't omit any of the default
INSTALLED_APPS). You may lose marks for doing this by introducing
unnecessary complexity.
- For our convenience, at least the home page of your project must
contain your name and student number.
Suggestions
These suggestions are similar to those for Assignment 1.
Clarifications and more detailed suggestions may be given in lectures and
laboratories.
Assessment criteria
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.
We will be a bit stricter for Assignment 2 than we were for Assignment 1.
Keep your solution simple. You will not get additional credit for
doing more than was requested.
Submission Instructions
Ensure your database contains several items distributed across
at least two categories, and contains at least one registered user in
addition to an admin user.
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_official_university_email_address
Subject: 7401ICT Assignment 2 Submission
The body of the email must contain the following:
- Your official student name and number.
- The exact path to your
Assignment 2 project directory, e.g.,
~s1234567/7401ICT/assignment2.
- An admin username and password (preferably admin
/ password) for your project.
- At least one other username and password for a registered
user who has added items to the database.
- A zipped archive of your project directory,
e.g., s1234567_assignment2.zip, as an
attachment.
Late penalties
Standard University late penalties of 2 marks (10%) per day to a
maximum of 5 days apply. Solutions submitted more than 5 days late will
not be accepted.
Other information
- Plagiarism will be dealt with according to standard University
policy.
- All use of work done by others must be properly cited.
- Extensions will not be granted except for medical or other similar
reasons.