Add support for the django framework
Implement #586
Pending tasks:
- [x] Rebase with master
- [x] Add support for Django 3 and 4
- [x] Align the current endpoints in the Django application
- [x] Fix the statics for the HTML pages
- [x] Make sure the Django application is pluggable when the pygeoapi package is installed
- [ ] Add more tests
Is pygeoapi/db.sqlite3 needed or can it be created by the ORM?
@ksonda and I were talking about a use case for pygeoapi in which there is an admin interface (for those who prefers GUI over CLI). I know Flask has importable packages, but this comes already integrated in Django.
With that in mind, I was wondering what is the status of this PR? Are you at all taking contributions? Are there any suggestions for us?
Hi @webb-ben and @ksonda and thanks for looking into this.
The purpose of this PR is to add the option to start a Django server in the pygeoapi cli https://github.com/geopython/pygeoapi/pull/630/files#diff-1696c76ab8f15157943cb6d039faf97ab95c21958691ced33c6491bf03344770R45-R62.
If I understand well the admin interface you are proposing is something available before starting the server right? How do you imagine the flow?
@francbartoli any update on this one? Should we close the PR for now (but keep #586 open)?
@tomkralidis it isn't a high priority feature for now but the PR is already flagged as a draft. Anyway it is fine with me if we want to close at the moment
Any news about Django support? it could be really useful, what was missing in the @francbartoli implementation?
Any news about Django support? it could be really useful, what was missing in the @francbartoli implementation?
Thanks for looking into this @lucadelu, concretely the module was not quite ready as django application for being installed and used within GeoNode
ok maybe for GeoNode is not yet ready but it could be useful to have it for normal user as me. I'm implementing a REST API using django and I was thinking to serve also OGCAPI standard using pygeoapi, the code seems to be useful.
I could help a little bit to test or improve it if you think it could be merge in the main code (I need sometime since I'm completely new to pyogcapi)
Thanks @lucadelu, it would be helpful if you can contribute. It has been stalled now for a while and it's likely the work needs to be aligned with all the new endpoints added to pygeoapi. But yeah we can work together to progressively complete this feature
Yes please, could you please create a TODO list of features needed before the merge, and I also need a little bit of help to set the working environment. Could we plan a discussion during the next week code sprint?
Yes please, could you please create a TODO list of features needed before the merge, and I also need a little bit of help to set the working environment. Could we plan a discussion during the next week code sprint?
Sure! That's a very good idea, I was thinking the same 👍
@lucadelu I've added a tasks list at the top. Let's catch up during the sprint
@lucadelu I've added a tasks list at the top. Let's catch up during the sprint
@francbartoli could be possible to update to newer Django release (now it seems required Django < 3)
Do you have any preferred time during the sprint?
I’ve added the new item for version 3. Let’s organize the time during the days. Have you already joined the OGC Discord server? What’s your handle over there?
Django 4 is the current release. You should target current
I’ve added the new item for version 3. Let’s organize the time during the days. Have you already joined the OGC Discord server? What’s your handle over there?
Yes I joined, my username is lucadelu
Great work everyone!
@lucadelu @krishnaglodha can each of you, in this PR, add a contributor agreement comment with the following (raw Markdown below):
# Contributions and Licensing
(as per https://github.com/geopython/pygeoapi/blob/master/CONTRIBUTING.md#contributions-and-licensing)
- [ ] I'd like to contribute [feature X|bugfix Y|docs|something else] to pygeoapi. I confirm that my contributions to pygeoapi will be compatible with the pygeoapi license guidelines at the time of contribution.
- [ ] I have already previously agreed to the pygeoapi Contributions and Licensing Guidelines
Thanks
Luca's agreement put forth in https://github.com/geopython/pygeoapi/pull/971#issuecomment-1232489303
Krishna's agreement put forth in https://github.com/geopython/pygeoapi/pull/971#issuecomment-1232592513