def save(self):

        data = self.cleaned_data

        if self.edit:
            self._update_instance(data)
            if self.instance.name != self.repo_entering_name:   # rename repository folder if it's name has changed.
                rename_tree(Repo.get_repository_location(
                                self.instance.owner.username, self.repo_entering_name), '{0}.git'.format(self.instance.name))
        elif not self.edit:
            repository = Repository.objects.create(name=data['name'],
                            description=data['description'], owner=self.user, private=data['private'])
            repository.save()
Save method to create a new repository with provided information from registration form.
dataset/ETHPy150Open Djacket/djacket/core/backend/repository/forms.py/RepositoryCreationForm.save