Exemplo n.º 1
0
    def post_save(self, instance=None, **kwargs):
        """
        create a file and add to the repository, if not already existing
        called via post_save signal

        """
        data = getattr(instance, self.attname)
        key = self.get_key(instance)
        backend.commit(key, data.encode('utf-8'))
Exemplo n.º 2
0
    def post_save(self, instance=None, **kwargs):
        """
        create a file and add to the repository, if not already existing
        called via post_save signal

        """
        data = getattr(instance, self.attname)
        key = self.get_key(instance)
        backend.commit(key, data.encode('utf-8'))
Exemplo n.º 3
0
    def post_save(self, instance=None, **kwargs):
        """
        create a file and add to the repository, if not already existing
        called via post_save signal

        """
        data = getattr(instance, self.attname)
        key = self.rcskey_format % (instance._meta.app_label, instance.__class__.__name__, self.attname, instance.id)
        try:
            backend.commit(key, data.encode("utf-8"))
        except:
            raise