{"issue":{"created_at":"2011-12-15T17:32:12Z","user":{"id":150892,"login":"davidthewatson","url":"https://api.github.com/users/davidthewatson","gravatar_id":"da5ec2d3bd0bc631297a286dd5f7f738","avatar_url":"https://secure.gravatar.com/avatar/da5ec2d3bd0bc631297a286dd5f7f738?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"milestone":null,"title":"is there a way to override the add new form for a database table?","state":"closed","labels":[],"updated_at":"2011-12-15T21:02:14Z","id":2569846,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"html_url":"https://github.com/coleifer/flask-peewee/issues/13","closed_at":"2011-12-15T17:56:47Z","number":13,"body":"I have an app similar to the flask-peewee example's admin.py but I want to override the behavior of the add new form for an object referenced off of the dashboard in the add new tab, not change the dashboard behavior itself as it does in example's admin messages. Is this possible?\r\n\r\nhttps://github.com/coleifer/flask-peewee/blob/master/example/admin.py\r\n\r\nThanks!","url":"https://api.github.com/repos/coleifer/flask-peewee/issues/13","comments":3,"assignee":null},"comment":{"created_at":"2011-12-15T21:02:14Z","user":{"id":119974,"login":"coleifer","url":"https://api.github.com/users/coleifer","gravatar_id":"ebd1c4256c1ece3469d2ccf3031cb6c5","avatar_url":"https://secure.gravatar.com/avatar/ebd1c4256c1ece3469d2ccf3031cb6c5?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"updated_at":"2011-12-15T21:02:14Z","id":3168941,"body":"Ahh... you may also check out the hooks in flask_peewee/admin.py ModelAdmin.save_model, the default implementation looks like this:\r\n\r\n    def save_model(self, instance, form, adding=False):\r\n        form.populate_obj(instance)\r\n        instance.save()\r\n        return instance","url":"https://api.github.com/repos/coleifer/flask-peewee/issues/comments/3168941"},"action":"created"}