Example #1
0
 def addRelease(self, name, description, lts, supported=True):
     try:
         r = Release.objects.get(name=name)
     except Release.DoesNotExist:
         r = Release(name=name, description=description, lts=lts, supported=supported)
         r.save()
         sys.stdout.write("Updated Jumpsuit with new release: %s\n" % r.description)
Example #2
0
    def create(self, request, **kwargs):
        attrs = self.flatten_dict(request.form.cleaned_data)

        release = Release(name=attrs["name"], description=attrs["description"])
        release.save()
        return rc.CREATED