pygeoapi icon indicating copy to clipboard operation
pygeoapi copied to clipboard

Add support for the django framework

Open francbartoli opened this issue 4 years ago • 16 comments

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

francbartoli avatar Feb 17 '21 22:02 francbartoli

Is pygeoapi/db.sqlite3 needed or can it be created by the ORM?

kalxas avatar Feb 18 '21 17:02 kalxas

@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?

webb-ben avatar Jul 01 '21 19:07 webb-ben

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 avatar Jul 02 '21 07:07 francbartoli

@francbartoli any update on this one? Should we close the PR for now (but keep #586 open)?

tomkralidis avatar Sep 19 '21 23:09 tomkralidis

@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

francbartoli avatar Sep 20 '21 20:09 francbartoli

Any news about Django support? it could be really useful, what was missing in the @francbartoli implementation?

lucadelu avatar Mar 04 '22 04:03 lucadelu

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

francbartoli avatar Mar 04 '22 08:03 francbartoli

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)

lucadelu avatar Mar 04 '22 08:03 lucadelu

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

francbartoli avatar Mar 04 '22 09:03 francbartoli

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?

lucadelu avatar Mar 04 '22 10:03 lucadelu

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 👍

francbartoli avatar Mar 04 '22 10:03 francbartoli

@lucadelu I've added a tasks list at the top. Let's catch up during the sprint

francbartoli avatar Mar 04 '22 11:03 francbartoli

@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?

lucadelu avatar Mar 05 '22 05:03 lucadelu

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?

francbartoli avatar Mar 05 '22 07:03 francbartoli

Django 4 is the current release. You should target current

msmitherdc avatar Mar 05 '22 11:03 msmitherdc

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

lucadelu avatar Mar 05 '22 14:03 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

tomkralidis avatar Aug 28 '22 06:08 tomkralidis

Luca's agreement put forth in https://github.com/geopython/pygeoapi/pull/971#issuecomment-1232489303

tomkralidis avatar Aug 31 '22 05:08 tomkralidis

Krishna's agreement put forth in https://github.com/geopython/pygeoapi/pull/971#issuecomment-1232592513

tomkralidis avatar Aug 31 '22 09:08 tomkralidis