Did I find the right examples for you? yes no

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)

src/d/j/django-hotsauce-0.5.0/examples/lib/site-packages/threaded_multihost/fields.py   Django-hotsauce(Download)
    def pre_save(self, model_instance, add):
        value = threadlocals.get_current_user()
        setattr(model_instance, self.name, value)
        if value:
            value = value.pk

src/d/j/django-threaded-multihost-1.4-1/threaded_multihost/fields.py   django-threaded-multihost(Download)
    def get_current_user(self):
        user = threadlocals.get_current_user()
        if user and not user.is_authenticated():
            user = None
        return user