Photo Gallery
This is a simple photo gallery powered by Django. The goal is to allow for an invite-only gallery such as for a family or an organization.
Photos are organized in to albums. Each album has a month and year associated with it. Each album is also associated with a location.
Individual photos can also be tagged with people.
I created this application as a way to share photos with my family, but perhaps someone else may find it useful for inspiration.
Installation
This project requires Python 3.3 or later. It will not work on any 2.x releases. It is recommended that you use virtualenv to run this project.
-
Clone this Github repository:
git clone https://github.com/timster/gallery.git cd gallery
-
Install the Python prerequisites:
pip install -r requirements.txt
-
Copy the local settings template to create your local settings:
cp gallery/settings/local.template gallery/settings/local.py
-
Edit the local settings file and update it for your environment:
vi gallery/settings/local.py
-
Create the database:
python manage.py migrate
-
Collect static files:
python manage.py collectstatic
-
Configure your Web server to serve static files from the STATIC_ROOT directory specified in the local settings file. See the following Django documentation for more info: Deploying static files
-
Launch the application using the built-in development runserver, or deploy using gunicorn, which is the application server of choice:
gunicorn project.wsgi:application
Screenshots
Here is what it looks like. I tried to make it pretty.
More screenshots here: http://imgur.com/a/glSCe
Creating Accounts
The gallery uses an authorization code to ensure that only users you invite will be able to create accounts. The authorization system has two codes associated with it. The first code (AUTH_CODE_USER) will allow users to create a read-only account. The second code (AUTH_CODE_ADMIN) will allow users to create an admin account that can upload photos, modify albums, etc.
If a user enters the AUTH_CODE_ADMIN when creating an account, his account will be added to the group specified in AUTH_CODE_ADMIN_GROUP setting. If this group does not exist, it will be created and all permissions from the photos app will be added to the group.
Testing
Automated testing is certainly not complete at the moment, but I'm working on it.
To-Do List
- Add a Years navigation option just like Locations and People.
- Handle uploading of zip files (extract and pull out images).
- Pull exif data out of photos when uploaded.