Author: Julien Wilson and Maelle Vance
Django Imager is a full Django app that allows you to upload your personal images and share them with the world. You create and manage albums, add new photos to different albums or edit any of them.
Clone this repository into whatever directory you want to work from.
$ git clone https://github.com/ellezv/django_imager.git
Assuming that you have access to Python 3 at the system level, start up a new virtual environment.
$ cd django_imager
$ python3 -m venv venv
$ source venv/bin/activate
Once your environment has been activated, make sure to install Django and all of this project's required packages.
(venv) $ pip install -r requirements.pip
Navigate to the project root, imagersite
, and apply the migrations for the app.
(venv) $ cd imagersite
(venv) $ ./manage.py migrate
Finally, run the server in order to server the app on localhost
(venv) $ ./manage.py runserver
Django will typically serve on port 8000, unless you specify otherwise.
You can access the locally-served site at the address http://localhost:8000
.
Running tests for the django_imager
is fairly straightforward.
Navigate to the same directory as the manage.py
file and type:
(venv) $ coverage run ./manage.py test
This will show you which tests have failed, which tests have passed.
To get the full coverage report, after you have run the tests, type:
(venv) $ coverage report -m
ImagerProfile
- user (related to the built-in User)
- address (unicode)
- bio (unicode)
- website (unicode)
- hireable (boolean, defaults to True)
- travel radius (integer)
- phone number (unicode)
- camera type (choice field)
- photography type (choice field)
- is active (boolean)
- api "ImageProfile.active" returns a query set of all active users
Image
- title (unicode)
- description (unicode)
- date published (datetime)
- date modified (datetime)
- date uploaded (datetime)
- published (choicefield : private, shared or public)
- image (imagefield)
- owner (related to ImagerProfile)
Album
- title (unicode)
- description (unicode)
- date published (datetime)
- date modified (datetime)
- date created (datetime)
- published (choicefield: private, shared or public)
- cover image : (imagefield)
- owner (related to ImagerProfile)
- images (related to Image model)
/admin
/login
/logout
/registration/register/
/profile
/profile/username
/images/library/
/images/photos/
/images/albums/
/images/photos/(pk)/
/images/albums/(pk)/
/images/photos/add/
/images/albums/add/
/images/albums/(pk)/edit/
/images/photos/(pk)/edit/