Skip to content
Antonios Angelakis edited this page Feb 7, 2018 · 1 revision

Form for user registration is called and completed by signup. Login and logout through login and logout_view respectively. User can view and edit profile information via users_show and UserUpdate. Searching for keywords is accomplished by def home . Functions spaces_new, storages_new, items_new create the models calling the forms included in the templates folder. Items_new is responsible for creating a new element in the join table items_storages for the many to many relationship.Class based views for updating and deleting are used for each model. spaces_show takes as input space_id and returns the storages for a specific space. Same for storages_show with storage_id as input , returns items included in the storage. Also, works for anonymous user, giving him the ability via remove_item to reduce or increase via add_item the quantity.Logged in user can track his spaces through spaces_index but for anonymous user this functon returns ALL the spaces with edit and delete being unavailable. items_index , storages_index return respectively all items and storages. Item addition in a storage from list is accomplished through items_add_to_storage taking item_id as input and redirecting to storages_index giving the user the opportunity to pick a specific storage to add the selected item with the function items_add_existing_storage

Clone this wiki locally