Skip to content

Instantly share code, notes, and snippets.

@jness
Created September 18, 2015 22:15
Show Gist options
  • Save jness/2773ea77acc761bb4328 to your computer and use it in GitHub Desktop.
Save jness/2773ea77acc761bb4328 to your computer and use it in GitHub Desktop.
<option value="1" selected >1</option>
<option value="2" >2</option>
<option value="3" selected >3</option>
<option value="4" >4</option>
<option value="5" >5</option>
<option value="6" >6</option>
<option value="7" >7</option>
<option value="8" >8</option>
<option value="9" >9</option>
<option value="10" >10</option>
<option value="11" >11</option>
<option value="12" >12</option>
<option value="13" selected >13</option>
@jness
Copy link
Author

jness commented Sep 18, 2015

The Raw Data tab show the following:

{
    "id": 12,
    "builds": [
        13
    ],
    "note": "",
    "status": null,
    "created": "2015-09-18T22:10:33.149569"
}

@jness
Copy link
Author

jness commented Sep 18, 2015

My model:

class Release(models.Model):

    class Meta:
        ordering = ['-created']

    builds = models.ManyToManyField(Build)
    note = models.TextField(blank=True)
    status = models.ForeignKey(ReleaseStatus, blank=True, null=True)
    created = models.DateTimeField(default=datetime.now)

    def __unicode__(self):
        return unicode(self.id)

@jness
Copy link
Author

jness commented Sep 18, 2015

My restful version:

$ pip freeze | grep framework
djangorestframework==3.2.3

@jness
Copy link
Author

jness commented Sep 18, 2015

@jness
Copy link
Author

jness commented Sep 18, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment