diff --git a/README.md b/README.md index 02d9c2e2..6140d712 100755 --- a/README.md +++ b/README.md @@ -18,10 +18,7 @@ Join us in-game in the channel allianceauth for help and feature requests. Special Thanks: - Thanking Nikdoof, without his old auth - implementation this project wouldn't be as far as it is now. - - Thanks to Raynaldo for his original work on this system and getting it as far as it is today. + Thanking Nikdoof, without his old auth implementation this project wouldn't be as far as it is now. Note: @@ -67,10 +64,8 @@ Special Permissions In Admin: auth | user | jabber_broadcast ( Access to broadcast a message over jabber to own groups) auth | user | jabber_broadcast_all ( Can choose from all groups and the 'all' option when broadcasting) auth | user | blue_member ( Auto Added to people who register has a blue when adding api key) - auth | user | corp_stats ( View basic corp auth stats *who is authed etc*) - auth | user | corputils ( View who has registered APIs, which alts belong to which main, and more. ) - auth | user | corp_apis ( View APIs, andjackKnife, of all member in current corp. ) - auth | user | alliance_apis ( View APIs, andjackKnife, of all member in whole alliance. ) + auth | user | corp_apis ( View APIs, and jackKnife, of all members in user's corp. ) + auth | user | alliance_apis ( View APIs, and jackKnife, of all member in user's alliance member corps. ) auth | user | timer_management ( Access to create and remove timers) auth | user | timer_view ( Access to timerboard to view timers) auth | user | srp_management ( Allows for an individual to create and remove srp fleets and fleet data) diff --git a/alliance_auth/settings.py.example b/alliance_auth/settings.py.example index 08fd6cdd..e068b5a1 100755 --- a/alliance_auth/settings.py.example +++ b/alliance_auth/settings.py.example @@ -403,7 +403,7 @@ LOGGING = { 'log_file': { 'level': 'INFO', # edit this line to change logging level to file 'class': 'logging.handlers.RotatingFileHandler', - 'filename': os.path.join(BASE_DIR,'allianceauth.log'), + 'filename': os.path.join(BASE_DIR,'log/allianceauth.log'), 'formatter': 'verbose', 'maxBytes': 1024*1024*5, # edit this line to change max log file size 'backupCount': 5, # edit this line to change number of log backups diff --git a/celerytask/tasks.py b/celerytask/tasks.py index dd6281ef..b35c0b0b 100755 --- a/celerytask/tasks.py +++ b/celerytask/tasks.py @@ -555,7 +555,7 @@ def run_api_refresh(): logger.info("User %s main character id %s missing model. Clearning main character." % (user, authserviceinfo.main_char_id)) authserviceinfo.main_char_id = '' authserviceinfo.save() - notify(user, "Main Character Reset", message="Your specified main character no longer has a model.\nThis could be the result of an invalid API\nYour main character ID has been reset." % api_key_pair.api_id, level="warn") + notify(user, "Main Character Reset", message="Your specified main character no longer has a model.\nThis could be the result of an invalid API\nYour main character ID has been reset.", level="warn") set_state(user) def populate_alliance(id, blue=False): diff --git a/eveonline/forms.py b/eveonline/forms.py index eeba2f9e..d81e1cf5 100644 --- a/eveonline/forms.py +++ b/eveonline/forms.py @@ -16,6 +16,13 @@ class UpdateKeyForm(forms.Form): api_id = forms.CharField(max_length=254, required=True, label="Key ID") api_key = forms.CharField(max_length=254, required=True, label="Verification Code") + + def clean_api_id(self): + try: + api_id = int(self.cleaned_data['api_id']) + return api_id + except: + raise forms.ValidationError("API ID must be a number") def clean(self): super(UpdateKeyForm, self).clean() diff --git a/log/.gitignore b/log/.gitignore new file mode 100644 index 00000000..d6b7ef32 --- /dev/null +++ b/log/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/services/managers/eve_api_manager.py b/services/managers/eve_api_manager.py index 721ce02c..bff85c7e 100644 --- a/services/managers/eve_api_manager.py +++ b/services/managers/eve_api_manager.py @@ -237,7 +237,7 @@ class EveApiManager(): logger.debug("Confirmed id %s is a character." % character_id) return True except evelink.api.APIError as error: - logger.exception("APIError occured while checking if id %s is a character. Possibly not character?" % character_id) + logger.debug("APIError occured while checking if id %s is a character. Possibly not character?" % character_id, exc_info=True) logger.debug("Unable to verify id %s is a character." % character_id) return False diff --git a/sigtracker/form.py b/sigtracker/form.py index 60a9a6a1..9fd3b49a 100644 --- a/sigtracker/form.py +++ b/sigtracker/form.py @@ -4,20 +4,20 @@ from django.core.validators import MaxValueValidator, MinValueValidator class SignatureForm(forms.Form): - sigtype = [('Wormhole', 'Wormhole'), ('Combat', 'Combat'), ('Data', 'Data'), - ('Relic', 'Relic'), ('Gas', 'Gas'), ('Ore', 'Ore')] - status = [('Open', 'Open'), ('Started', 'Started'), ('Finished', 'Finished'), ('Life cycle has not begun', 'Life cycle has not begun'), - ('Probably wont last another day', 'Probably wont last another day'), ('End of its natural lifetime', 'End of its natural lifetime'), - ('stability not significantly disrupted', 'stability not significantly disrupted'), - ('Stability reduced not critical degree yet', 'Stability reduced not critical degree yet'), - ('Wormhole stability critically disrupted', 'Wormhole stability critically disrupted')] + mass_status = [('More Than 50%', 'More Than 50%'), ('Less Than 50%', 'Less Than 50%'), ('Less Than 10%', 'Less Than 10%')] + lifetime_status = [('More Than 24 Hours', 'More Than 24 Hours'), ('Less Than 24 Hours', 'Less Than 24 Hours'), ('Less Than 4 Hours', 'Less Than 4 Hours')] + ships_size = [('Only Smallest', 'Only Smallest'), ('Up to Medium', 'Up to Medium'), ('Larger', 'Larger'), ('Very Large', 'Very Large')] + system = forms.CharField(max_length=254, required=True, label='System') ident = forms.CharField(max_length=254, required=True, label="ID") - sigtype = forms.ChoiceField(choices=sigtype, required=True, label="Signature Type") - destination = forms.CharField(max_length=254, label="destination", required=True, initial="") - status = forms.ChoiceField(choices=status, required=True, label="Status") + lifetime_status = forms.ChoiceField(choices=lifetime_status, required=True, label="Lifetime Status") + mass_status = forms.ChoiceField(choices=mass_status, required=True, label="Mass Status") + ships_size = forms.ChoiceField(choices=ships_size, required=True, label="Ship Size") + destination = forms.CharField(max_length=254, label="End Destination", required=True, initial="") + through_dest = forms.CharField(max_length=254, label="Goes Through", required=True, initial="") notes = forms.CharField(max_length=254, label="Notes", required=False, initial="") + diff --git a/sigtracker/models.py b/sigtracker/models.py index e1e3a3e4..03c3c344 100644 --- a/sigtracker/models.py +++ b/sigtracker/models.py @@ -11,9 +11,12 @@ class sigtracker(models.Model): ident = models.CharField(max_length=254, default="") system = models.CharField(max_length=254, default="") destination = models.CharField(max_length=254, default="") - sigtype = models.CharField(max_length=254, default="") - status = models.CharField(max_length=254, default="") + lifetime_status = models.CharField(max_length=254, default="") + mass_status = models.CharField(max_length=254, default="") + ships_size = models.CharField(max_length=254, default="") notes = models.CharField(max_length=254, default="") + through_dest = models.CharField(max_length=254, default="") post_time = models.DateTimeField(default=timezone.now) eve_character = models.ForeignKey(EveCharacter) + diff --git a/sigtracker/views.py b/sigtracker/views.py index ddfc4d18..fbe12599 100644 --- a/sigtracker/views.py +++ b/sigtracker/views.py @@ -51,8 +51,10 @@ def add_signature_view(request): sig.ident = form.cleaned_data['ident'] sig.system = form.cleaned_data['system'] sig.destination = form.cleaned_data['destination'] - sig.sigtype = form.cleaned_data['sigtype'] - sig.status = form.cleaned_data['status'] + sig.lifetime_status = form.cleaned_data['lifetime_status'] + sig.mass_status = form.cleaned_data['mass_status'] + sig.ships_size = form.cleaned_data['ships_size'] + sig.through_dest = form.cleaned_data['through_dest'] sig.notes = form.cleaned_data['notes'] sig.create_time = post_time sig.eve_character = character @@ -94,8 +96,10 @@ def edit_signature(request, sigtracker_id): sig.ident = form.cleaned_data['ident'] sig.system = form.cleaned_data['system'] sig.destination = form.cleaned_data['destination'] - sig.sigtype = form.cleaned_data['sigtype'] - sig.status = form.cleaned_data['status'] + sig.lifetime_status = form.cleaned_data['lifetime_status'] + sig.mass_status = form.cleaned_data['mass_status'] + sig.ships_size = form.cleaned_data['ships_size'] + sig.through_dest = form.cleaned_data['through_dest'] sig.notes = form.cleaned_data['notes'] sig.eve_character = character logger.info("User %s updating sigtracker id %s " % (request.user, sigtracker_id)) @@ -108,9 +112,11 @@ def edit_signature(request, sigtracker_id): 'ident': sig.ident, 'system': sig.system, 'destination': sig.destination, - 'sigtype': sig.sigtype, - 'status': sig.status, + 'lifetime_status': sig.lifetime_status, + 'mass_status': sig.mass_status, + 'ships_size': sig.ships_size, + 'through_dest': sig.through_dest, 'notes': sig.notes, } form = SignatureForm(initial= data) - return render_to_response('registered/signatureupdate.html', {'form':form}, context_instance=RequestContext(request)) \ No newline at end of file + return render_to_response('registered/signatureupdate.html', {'form':form}, context_instance=RequestContext(request)) diff --git a/stock/templates/public/base.html b/stock/templates/public/base.html index 1f97835e..bb9ea2d4 100755 --- a/stock/templates/public/base.html +++ b/stock/templates/public/base.html @@ -152,7 +152,7 @@