Also update all samples to use XSRF callback protection. Reviewed in https://codereview.appspot.com/6473053/.
22 lines
469 B
Python
22 lines
469 B
Python
import pickle
|
|
import base64
|
|
|
|
from django.contrib import admin
|
|
from django.contrib.auth.models import User
|
|
from django.db import models
|
|
|
|
from oauth2client.django_orm import FlowField
|
|
from oauth2client.django_orm import CredentialsField
|
|
|
|
|
|
class CredentialsModel(models.Model):
|
|
id = models.ForeignKey(User, primary_key=True)
|
|
credential = CredentialsField()
|
|
|
|
|
|
class CredentialsAdmin(admin.ModelAdmin):
|
|
pass
|
|
|
|
|
|
admin.site.register(CredentialsModel, CredentialsAdmin)
|