Yeah, that's what I meant.  So that future developers have some
documentation to help them maintain the code in the inevitable case that
something changes and breaks this.

Similarly, you might consider actually eval-ing the code that comes out of
this, and run some rudimentary requests through the resources as part of
the automated tests.  Then if a future version of tastypie changes how
resources work, the test suite will detect that this command also needs
updating.

On Sat, Dec 7, 2013 at 5:55 PM, sesas <notifications@github.com> wrote:

> In tastypie/management/commands/describe_api.py:
>
> > +    help = "Generates tastypie resources for the given app that you should put in APP/api.py."
> > +    args = "[appname]"
> > +    label = "application name"
> > +
> > +    def handle_app(self, app, **options):
> > +        # raise NotImplementedError()
> > +        return describe_api(app)
> > +
> > +
> > +FIELD_TEMPLATE = "{attribute_name} = fields.ForeignKey('{app_name}.api.{foreign_model}', '{attribute_name}'{options_str})"
> > +RESOURCE_POSTFIX = 'Resource'
> > +
> > +
> > +def describe_api(app, **options):
> > +    """
> > +    Returns a string for the given app.
>
>
> https://github.com/sesas/django/blob/master/django/core/management/commands/inspectdb.py
>
> There are no warnings or disclaimers in the docstring of a function in
> inspectdb. What were you referring to? I might have misunderstood you.
>
> Maybe I can just make that docstring more lengthy and explain a bit more
> what it does. Is that what you meant?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/toastdriven/django-tastypie/pull/1092/files#r8183534>
> .
>