Skip to content

Commit

Permalink
Merge branch 'django1.8' of github.com:rezometz/paiji2 into django1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
LGD-Fr committed Aug 24, 2015
2 parents a90e61b + f05866b commit 1ddf5cb
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions rezo/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import uuid
from datetime import datetime

from django.conf import settings
from django.views import generic
from django.shortcuts import redirect

Expand Down Expand Up @@ -30,10 +31,15 @@ class AccountClaimView(generic.FormView):
def get_form(self, *args, **kwargs):
super(AccountClaimView, self).get_form(*args, **kwargs)

try:
# Use the settings if defined
client_ip = settings.ACCOUNT_CLAIM_CLIENT_IP
except:
client_ip = self.request.META.get('REMOTE_ADDR')

equipements = Equipement.objects.using('rezo').filter(
# ip=self.request.META.get('REMOTE_ADDR'),
ip=client_ip,
timestampdesactivationdefinitive='0',
ip='10.69.8.127',
).exclude(
utilisateur__etat='STATE_ARCHIVE',
)
Expand Down

0 comments on commit 1ddf5cb

Please sign in to comment.