This was a project created for a university databases course and so be aware nothing in this repository is production ready. The purpose of this project is to create a simple service for users to view, create and rate anime, manga, and novels and obtain information about their creators, studios, and licensors. There is some simple login/signup functionality with users able to store their favorite content and look for other content similar (based on genre) to what they have already favorited. Please note: the user information is stored in plain text(including passwords), so please do not use any real information to signup if you plan to install and run this project for yourself. Also, be aware that on initial page load of the index that the local database will be filled with some dummy data, so be patient if it takes longer than normal to respond.
- root access to your machine (i.e. don't use library or school computers)
- ubuntu 16.04
- python (at least version 3.x)
- open up a terminal, cd to the root of the repository (where this README is)
- verify your python version
python3 --version - if the previous command fails:
sudo apt-get install python3 - install the python package manager, pip (give the root password if prompted):
sudo apt-get install -y python3-pip - install django:
pip3 install django - move one directory into the repository (the correct destination folder will contain manage.py)
cd animanga/ - build the database
python3 manage.py makemigrations
python3 manage.py migrate - run the server locally
python3 manage.py runserver - open up your favorite browser
- go to the following url:
http://localhost:8000
- Login and create new users on index page
- Login on content page (note: login will return to index (after successful login)
- Admin privileges for specific users
- View content
- View creators
- Various other queries
NOTE: All links are available through the UI at the index, but they are given here for completeness.
Projection query:
Users can view all available content or creators at the index page
--> http://localhost:8000/
Selection query:
Users can query which anime or manga are of a certain age or younger/older.
--> http://localhost:8000/selection/
Join query:
Users can view a list of content and their creators.
--> http://localhost:8000/?indexQuery=Joined
Aggregation query:
Users can view how many works a creator has worked on.
--> http://localhost:8000/create/
Users can also view how many creators worked on the same content.
--> http://localhost:8000/contributorcount/
Nested aggregation with group-by:
User can finding creators whose age is younger than the average age of all creators.
--> http://127.0.0.1:8000/nested/
Update query:
Users can update the rating of anime or manga (Botton labeled "Change Rating"):
--> http://localhost:8000/content/3/
NOTE: Going to the index and then clicking on any of the content
titles will go to a similar page to the one listed above, any of
which can have their rating changed. The specific link was chosen at
random.
Delete query:
Admin can delete anime or manga (Button labeled "Delete this content" when logged in as an admin).
--> http://localhost:8000/content/3/
NOTE: The user must be logged in as an admin to delete content. At the top of the index is a
login button, and the TA may use the login user "admin" with password "123" both without quotes.
Creating a normal user will not allow the TA to delete content. After logging in, the TA may go
to a any content page(the above link is a single example of a content page) and at the
bottom of the page the button to delete the entry can be found.
Division query:
Find creators that worked in every studio.
--> http://localhost:8000/division/