perdy / django-status

Django Status is a application for Django projects that provides an API to check the status of some parts and some utilities like ping requests.
Other
17 stars 6 forks source link

Remove the api prefix #6

Closed jpiron closed 8 years ago

jpiron commented 8 years ago

Using a namespace instead. The api prefix should be added in the outer project urls if wanted : url(r'^status/prefix/', include('status.urls')),

perdy commented 8 years ago

The initial focus on this project was to create a simple mechanism to check some functionalities, in a first step these checks would come from an API, but is intended to make some web views that communicates with this API. So, why do you need to rename the api prefix ?

jpiron commented 8 years ago

This is not really a need. I'm using it as a status page for a DjangoRestFramework API of mine and I wanted it to be available under the /status path as it is for other middlewares (Nginx, Apache, ...). But I removed it because essentially because I ended up with an URL like : api.mydomain.com/status/api which I found somehow weird.

perdy commented 8 years ago

Ok. If it's only a cosmect issue I'll move everything concerning API to a new django application in order you can add it directly to settings using:

INSTALLED_APP = (..., 'status', 'status.api', ...)

This will give the flexibility you want to include API url's where you decide.

jpiron commented 8 years ago

That would be perfect ! Thanks !

perdy commented 8 years ago

Version 1.3.0 have urls for API views in a different file, so you can include it directly in your main urls file.

jpiron commented 8 years ago

Ok. Thank you !