Esempio n. 1
0
def update_character(**kwargs):
    character = Character.objects.get(**kwargs)
    parser = CharacterParser()
    try:
        character = parser.update(character)
        return character.id if character else None
    except HTTPError:
        pass
Esempio n. 2
0
def update_character(**kwargs):
    character = Character.objects.get(**kwargs)
    parser = CharacterParser()
    try:
        character = parser.update(character)
        return character.id if character else None
    except HTTPError:
        pass
Esempio n. 3
0
def import_character(**kwargs):
    # Ignore attempts to reimport characters
    try:
        Character.objects.get(**kwargs)
        return False
    except Character.DoesNotExist:
        pass
    
    character = Character(**kwargs)
    parser = CharacterParser()
    try:
        character = parser.update(character)
        return character.id if character else None
    except HTTPError:
        pass
Esempio n. 4
0
def import_character(**kwargs):
    # Ignore attempts to reimport characters
    try:
        Character.objects.get(**kwargs)
        return False
    except Character.DoesNotExist:
        pass

    character = Character(**kwargs)
    parser = CharacterParser()
    try:
        character = parser.update(character)
        return character.id if character else None
    except HTTPError:
        pass
Esempio n. 5
0
 def update(self, request, queryset):
     p = CharacterParser()
     for char in queryset:
         p.update(char)
Esempio n. 6
0
 def update(self, request, queryset):
     p = CharacterParser()
     for char in queryset:
         p.update(char)