mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 14:52:15 +00:00
Cleanup import, prep for new API key handling
This commit is contained in:
@@ -1,7 +1,5 @@
|
|||||||
import urllib, urllib2
|
import urllib, urllib2
|
||||||
import xml
|
from hashlib import sha1
|
||||||
import hashlib
|
|
||||||
import socket
|
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
from xml.dom import minidom
|
from xml.dom import minidom
|
||||||
from django.db import models
|
from django.db import models
|
||||||
@@ -27,7 +25,7 @@ class CachedDocumentManager(models.Manager):
|
|||||||
def construct_url(self, url_path, params):
|
def construct_url(self, url_path, params):
|
||||||
|
|
||||||
# Valid arguments for EVE API Calls
|
# Valid arguments for EVE API Calls
|
||||||
allowed_params = ['userid', 'apikey', 'characterid', 'version', 'names', 'ids', 'corporationid', 'beforerefid', 'accountkey']
|
allowed_params = ['apikey', 'userid', 'keyid', 'vcode', 'characterid', 'version', 'names', 'ids', 'corporationid', 'beforerefid', 'accountkey']
|
||||||
|
|
||||||
if len(params):
|
if len(params):
|
||||||
for k, v in params.items():
|
for k, v in params.items():
|
||||||
@@ -54,7 +52,7 @@ class CachedDocumentManager(models.Manager):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
url = self.construct_url(url_path, params)
|
url = self.construct_url(url_path, params)
|
||||||
doc_key = hashlib.sha1(url).hexdigest()
|
doc_key = sha1(url).hexdigest()
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user