Skip to content

Conversation

@Mte90
Copy link
Contributor

@Mte90 Mte90 commented Nov 11, 2024

This is a new readme that include the tutorial for the login integration, also I removed the stuff about the 0.5 release and added as notes as explains internals.

Fix: #3, #9, #5, #4, #1

@Mte90
Copy link
Contributor Author

Mte90 commented Nov 11, 2024

I think that is complete now and better to read.
Next step maybe is a code refactoring to improve the quality and maybe organize it a better.

@rexsum420 rexsum420 merged commit ed1d757 into rexsum420:main Nov 13, 2024
@tic-sebastian
Copy link

Hi @Mte90 and @rexsum420, thank you for your work! I love the idea of Django backend+NiceGUI frontend and have been trying to use django-nice in the current version ed1d757 and have two very small remarks:

  • The example in the README.md is missing the import of fastapi RedirectResponse.
    from fastapi.responses import RedirectResponse
  • line 40 in frontend.py is not valid on my Python 1.13.2, I guess print(f"There was an error with the request {url} with status {response.status_code}") might be better than to concat.

Other than that: This is actively developed, right?

Cheers, Sebastian

@Mte90
Copy link
Contributor Author

Mte90 commented Mar 28, 2025

I don't think that is developed anymore.
I stopped using it as I prefered to integrate nicegui with Django separately because this project had some limitation.

Basically I have 2 instances one for nicegui and one for django, from nicegui I use the Django framework, the problem is that Nicegui is async and Django not and require a lot of workaround to get everything working.
But at the end is not very good, probably Django with a rest framework and request from nicegui is the better solution in this way they are not so much dependent and create less issues.

@tic-sebastian
Copy link

Thank you for that information @Mte90! The things you speak about I was also wondering, but thought this could possibly be progressed.
Do you use a REST approach in your integration of Django an NiceGUI?

@Mte90
Copy link
Contributor Author

Mte90 commented Mar 28, 2025

No I imported django in nicegui and worked with the ORM and the various django features like for the login.

But after developing this prototype and seeing all the issues to develop in this way (I had to write everything async and not everything works in Django async yet) it is better something REST so the code is more simpler and Nicegui is just like a frontend but in python (I tried also Reflex.dev but is completelly different as compile a react version).
I started in thay thinking of performances but I don't think that it will change so much with the Rest in the middle.

@tic-sebastian
Copy link

tic-sebastian commented Mar 29, 2025

I understand your point and I am thankful for the (obvious, now seeing it) hint to import Django in NiceGUI. And actually, all sync Django calls used in the example in the README.md have async counterparts (now), so no sync to async needed for that at least anymore. But yes, still not everything is async in Django yet.

Thanks for the good discussion and all the best!
Cheers,
Sebastian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

remove on field value the field name

3 participants