Is there any way to access sessions variables while overriding any models save method
class Blog(models.Model):
name = models.CharField(max_length=100)
tagline = models.TextField()
def save(self, *args, **kwargs):
//Code for accessing session variable
super(Blog, self).save(*args, **kwargs)
Thanks,
not directly
you could add an extra argument to the save method and pop it off before calling the super save:
But
if you are saving a form it may be better to use