mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-13 22:32:15 +00:00
Merge remote branch 'live/master'
This commit is contained in:
@@ -16,7 +16,7 @@ eveapiproxy_resource = Resource(handler=EveAPIProxyHandler, **apikeyauth)
|
||||
optimer_resource = Resource(handler=OpTimerHandler, **apikeyauth)
|
||||
blacklist_resource = Resource(handler=BlacklistHandler, **apikeyauth)
|
||||
characters_resource = Resource(handler=CharacterHandler, **apikeyauth)
|
||||
announce_resource = Resource(handler=CharacterHandler, **apikeyauth)
|
||||
announce_resource = Resource(handler=AnnounceHandler, **apikeyauth)
|
||||
|
||||
urlpatterns = patterns('',
|
||||
url(r'^user/$', user_resource),
|
||||
|
||||
@@ -36,7 +36,6 @@ def import_alliance_details():
|
||||
for corp in alliance['memberCorporations']:
|
||||
if int(corp['corporationID']) not in corplist:
|
||||
import_corp_details.delay(corp['corporationID'])
|
||||
pass
|
||||
validcorps.append(int(corp['corporationID']))
|
||||
|
||||
delcorps = set(corplist) - set(validcorps)
|
||||
|
||||
@@ -4,6 +4,7 @@ from xml.dom import minidom
|
||||
|
||||
from celery.decorators import task
|
||||
from eve_proxy.models import CachedDocument
|
||||
from eve_proxy.exceptions imort DocumentRetrievalError
|
||||
from eve_api.models import EVEPlayerCorporation, EVEPlayerCharacter, EVEPlayerAlliance
|
||||
from eve_api.utils import basic_xml_parse_doc
|
||||
from eve_api.tasks.character import import_eve_character
|
||||
@@ -43,7 +44,12 @@ def import_corp_details_func(corp_id, log=logging.getLogger(__name__)):
|
||||
corpobj, created = EVEPlayerCorporation.objects.get_or_create(id=corp_id)
|
||||
if created or not corpobj.api_last_updated or corpobj.api_last_updated < (datetime.utcnow() - timedelta(hours=12)):
|
||||
|
||||
doc = CachedDocument.objects.api_query('/corp/CorporationSheet.xml.aspx', {'corporationID': corp_id})
|
||||
try:
|
||||
doc = CachedDocument.objects.api_query('/corp/CorporationSheet.xml.aspx', {'corporationID': corp_id})
|
||||
except DocumentRetrievalError, exc:
|
||||
logger.error('Error retrieving CorporationSheet.xml.aspx for ID %s - %s' % (corp_id, exc))
|
||||
raise APIAccessException
|
||||
|
||||
d = basic_xml_parse_doc(doc)['eveapi']
|
||||
|
||||
if 'error' in d:
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<table>
|
||||
<tr><th>Member Username</th><th>Characters</th><th>Status</th><th>Actions</th></tr>
|
||||
{% for user, chars, status in member_list %}
|
||||
<tr><td>{{ user.username }}</td>
|
||||
<tr><td><a href="{% url sso.views.user_view user.username %}">{{ user.username }}</a></td>
|
||||
<td>{{ chars }}</td>
|
||||
<td>{{ status }}</td>
|
||||
<td><a href="{% url groups.views.kick_member group.id user.id %}">Kick Member</a>
|
||||
@@ -28,7 +28,7 @@
|
||||
<table>
|
||||
<tr><th>Username</th><th>Reason</th><th>Status</th><th>Created Date</th><th>Actions</th></tr>
|
||||
{% for req in requests %}
|
||||
<tr><td>{{ req.user }}</td>
|
||||
<tr><td><a href="{% url sso.views.user_view req.user.username %}">{{ req.user }}</a></td>
|
||||
<td>{{ req.reason }}</td>
|
||||
<td>{{ req.get_status_description }}</td>
|
||||
<td>{{ req.created_date }}</td>
|
||||
|
||||
Reference in New Issue
Block a user