
Show HN: Res(ts): Auto-Generate TypeScript Models for Django Projects - petewoyzbun
https://github.com/peter-woyzbun/rests
======
madrox
WOW! This is exactly what I need for a project I'm working on. Using a
DRF/Django backend for an API with an angular web frontend.

I'm going to start playing with this right away. Awesome job!

------
bastawhiz
This is cool, but I don't see anything about security. Surely if someone were
to implement this naively on a public server, it opens the possibility for
anyone to just truncate your tables?

~~~
MapleWalnut
You can configure DRF permission classes in the interface definitions, so
there's some security.

------
jchw
One thing I don't totally understand is the context in which the TypeScript is
intended to be run. Server? Client? If client, I find it surprising to
introduce a QuerySet-like API.

~~~
true_religion
Could be useful server side if you have microservices.

------
Mizza
I tried a similar approach for a new-unpopular framework, Knockout:

[https://github.com/Miserlou/django-knockout-
modeler](https://github.com/Miserlou/django-knockout-modeler)

If I had the time, I'd redo it for Vue.

~~~
quickthrower2
Knockout is unpopular but boy is it intuitive.

------
mychael
I would reconsider how you're describing this project. "Models" in the
frontend world imply a data model like in Backbone in Angular.

As far as I can tell Typescript itself doesn't have a concept of a "Model".
Which makes sense because its not a web framework - its a programing language

[https://www.google.com/search?q=Model+https%3A%2F%2Fwww.type...](https://www.google.com/search?q=Model+https%3A%2F%2Fwww.typescriptlang.org&oq=Model)

