Skip to content

Commit

Permalink
remove User.Meta.ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
ramusus committed Jan 31, 2014
1 parent 3fa6ffa commit d6e2e6d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions vkontakte_users/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class UsersRemoteManager(VkontakteManager):
def fetch(self, **kwargs):
'''
Additional attributes:
* only_expired - flag to fetch users, who fetched earlie than VKONTAKTE_USERS_INFO_TIMEOUT_DAYS days ago
* only_expired - flag to fetch only users, fetched earlie than VKONTAKTE_USERS_INFO_TIMEOUT_DAYS days ago
'''
if 'only_expired' in kwargs and kwargs.pop('only_expired'):
ids = kwargs['ids']
Expand Down Expand Up @@ -98,6 +98,9 @@ def _fetch(self, **kwargs):
return super(UsersRemoteManager, self).fetch(**kwargs)

def _renew_queryset(self, users, ids):
'''
Return argument users if ids < limit or get queryset with whole ammount of users by ids
'''
if len(ids) <= self.fetch_users_limit and users:
return users
else:
Expand Down Expand Up @@ -250,12 +253,12 @@ class UserRelative(models.Model):

class User(VkontakteIDModel):
'''
Model of vkontakte user
TODO: implement relatives, schools and universities connections
'''
class Meta:
verbose_name = u'Пользователь Вконтакте'
verbose_name_plural = u'Пользователи Вконтакте'
ordering = ['remote_id']

remote_pk_field = 'uid'
slug_prefix = 'id'
Expand Down

0 comments on commit d6e2e6d

Please sign in to comment.