diff --git a/.gitignore b/.gitignore index 9472d91..68fe285 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ *.pyc __pycache__/* /dist/* -/GeoffreyApp.egg-info/* \ No newline at end of file +/GeoffreyApp.egg-info/* +docs.sh \ No newline at end of file diff --git a/GeoffreyApp/api/commands.py b/GeoffreyApp/api/commands.py index ffa721f..f328da9 100644 --- a/GeoffreyApp/api/commands.py +++ b/GeoffreyApp/api/commands.py @@ -432,7 +432,7 @@ def info(location_name): loc_json["items"].append(item.json) elif type(loc) == PublicFarm: loc_json["resources"] = [] - for resource in loc.resources.all(): + for resource in loc.resource.all(): loc_json["resources"].append(resource.json) return loc_json diff --git a/GeoffreyApp/docs/source/models.rst b/GeoffreyApp/docs/source/models.rst index 3c70449..45adca6 100644 --- a/GeoffreyApp/docs/source/models.rst +++ b/GeoffreyApp/docs/source/models.rst @@ -25,3 +25,14 @@ Models used in Geoffrey .. autoclass:: GeoffreyApp.models.Tunnel :members: +.. autoclass:: GeoffreyApp.models.PublicFarm + :members: + +.. autoclass:: GeoffreyApp.models.Resource + :members: + +.. autoclass:: GeoffreyApp.models.PointOfInterest + :members: + +.. autoclass:: GeoffreyApp.models.Market + :members: diff --git a/GeoffreyApp/models.py b/GeoffreyApp/models.py index 6a3b193..082f932 100644 --- a/GeoffreyApp/models.py +++ b/GeoffreyApp/models.py @@ -319,6 +319,7 @@ class Market(Location): def json(self): """ JSON representation of the market + .. code-block:: json {