This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: latin1 -*- | |
""" | |
Codigo para colocar uma imagem na orientacao correta. | |
""" | |
from PIL import Image | |
from PIL.ExifTags import TAGS | |
def get_exif(img): | |
info_exif = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.contrib import admin | |
from django.contrib.auth import admin as auth_admin | |
from .models import * | |
from forms import UserChangeForm, UserCreationForm | |
class UserAdmin(auth_admin.UserAdmin): | |
fieldsets = ( | |
(None, {'fields': ('email', 'password')}), | |
('Personal info', {'fields': ('first_name', 'last_name', 'twitter', 'photo', 'event')}), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# How to add a field to the Django Admin Add User form | |
# using UserCreationForm. Add this to a admin.py and alter | |
# to whatever fields you'd like | |
from django.contrib.auth.forms import UserCreationForm | |
from django.contrib.auth.models import User | |
from django.contrib.auth.admin import UserAdmin | |
from django import forms | |
from django.utils.translation import ugettext_lazy as _ | |
from django.contrib import admin |