Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cleaned up security checks and made API work again
- Loading branch information
Showing
15 changed files
with
808 additions
and
81 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
2008-08-30 | ||
""" | ||
|
||
from base import oauth, utils | ||
from helios import oauth, utils | ||
|
||
import httplib | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
""" | ||
Helios Django Views | ||
Ben Adida (ben@adida.net) | ||
""" | ||
|
||
from django.http import * | ||
from security import * | ||
|
||
from django.contrib import auth | ||
|
||
from crypto import algs | ||
import utils | ||
import csv | ||
|
||
from models import * | ||
from view_utils import * | ||
|
||
@admin_required | ||
def admin_home(request): | ||
return render_template(request, 'admin_home') | ||
|
||
@admin_required | ||
def admin_clients(request): | ||
api_clients = APIClient.objects.all() | ||
return render_template(request, 'admin_clients', {'clients': api_clients}) | ||
|
||
@admin_required | ||
def admin_client_new(request): | ||
new_client = APIClient.objects.create(consumer_key = request.POST['consumer_key'], consumer_secret = request.POST['consumer_secret']) | ||
return HttpResponseRedirect("./") | ||
|
||
@admin_required | ||
def admin_client_delete(request): | ||
client= APIClient.objects.get(consumer_key = request.POST['consumer_key']) | ||
client.delete() | ||
return HttpResponseRedirect("./") |
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
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
Oops, something went wrong.