Skip to content
A django app that allows users to login and generate a photo with a badge added to their original profile photo.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
fbapp
photos
resources
.gitignore
README.md
manage.py
requirements.txt

README.md

Facebook Profile Photo Generator

Setting Up

It's a Django app. So the installation/setup is trivial if you have deployed Django applications before.

Install the dependencies from requirements.txt file.

pip install -r requirements.txt

The app by default uses a SQLite Dabase which will be created for you when we run migrations. If you want to use other database engines (eg, mysql) please configure it in settings.py file.

Run the migration:

python manage.py migrate 

This would create the necessary tables for the app.

We need to update the values for SOCIAL_AUTH_FACEBOOK_KEY and SOCIAL_AUTH_FACEBOOK_SECRET in settings.py. You can get the API Key and the Secret from Facebook Developers portal.

Once we have run the migrations and set the API keys, we can run the Django dev server:

python manage.py runserver

Now visit the url - http://localhost:8000 to see the app.

Replacing The Image

The badge is in resources/badge.png file. It's a PNG image with transparency. You can just replace this image with yours. Or you can hack the codes to do more fancy stuff. You can find the photo generation codes in views.py file, in the accounts_profile function.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.