Questions regarding Flutter Web and Django Rest API - django

I am trying to make this blog website for my university, I am using flutter for the frontend and DRF for the backend. I have some questions regarding these.
Do I need to host my DRF API in order to fetch data from the server? will it work if I use the free version of heroku?
Is there a way I can access the Django admin panel from the flutter frontend? like, assign new users using the admin panel that Django offers?
Thank you

Yes it needs to be hosted if you want to fetch data from the server in production. The free version of Heroku is an excellent option for this.

Related

Authenticate users in my django app using an existing ASP.Net IdentityServer login app

I'm trying to authenticate users in my django app using an existing ASP.Net IdentityServer login app. I've seen the documentation has an example for an angular or react(Javascript based app) but not django. Does anyone have some sample code or tutorial that shows how to do in django? I'm new at this. Especially when it comes to the call back. I'm not sure i need to use an open iD client package to do this. Is it possible to do this in django? Or does it have to be a JS application? I appreciate any assistance
https://identityserver4.readthedocs.io/en/latest/quickstarts/4_javascript_client.html?highlight=authority#add-your-html-and-javascript-files

Django rest framework and frontend

I want to use Django Rest Framework to create RESTAPI to integrate with the payment gateway API like stripe. For the frontend part I can only see project using React for the frontend. Cant i use Django as a frontend?
Looking for suggestions if i really just need to use React or Vue. Or is it possible to use django as frontend as well.
Looking for your suggestions. Thank you.
To use Stripe in Django, you may refer to this package https://github.com/dj-stripe/dj-stripe which supports Stripe out-of-the box specific for Django
For replacing React with Django for front-end, it is possible and you can use Django template, however, it depends on your use-case.

Displaying data retrieved through GraphQL in a Django website

(Disclaimer : I'm just getting started with Django, and with web dev in general)
I have a backend app that stores different kinds of resources. Some are public and some are private. The application is accessible only to identified users. A GraphQL API allows me to access the resources.
On another server, I'd like to create a website that will be accessible to everyone. I want to use Django to create it.
The website will display a list of resources tagged as "public" in the backend app, with a pagination system and, say, 20 resources by page. The CSS will differ from the backend app and there will be a search section.
From what I understand, I should be able to retrieve the data through the GraphQL API, but I'm a bit confused here. All the documentation and tutos I can find about Django and GraphQL seem to be about setting up a GraphQL API server with Django. All I want to do is to build custom queries and to display them on my different html pages.
How can I do that? Where should I start?
You should connect your project with a GraphQL client. As per my research, I have found that there are implementations and examples for graphene-mongoengine in Flask (Flask has a direct GraphQL client).
Mongoengine Flask with GraphQL Tutorial
For Django you can check this out
Edit- I was able to get the data from my database with python-graphql-client. Now I am able to display them in my template.
Let me know if this helps

Laravel OAuth2 authentication for Django Site

I am building a Django application and I need to connect to an existing external Laravel site to authenticate users. Basically to have two different platforms, but users only have one set of credentials. Also - users should be able to sign up on the Django, and their user is created in the Laravel DB.
The Laravel site has Laravel Passport (OAuth2 based) installed because it uses it for a Flutter app.
I know that REMOTE_USER is "the Django way" of achieving external auth but, I don't know where to go from there. If it makes a difference, the Django app will be a full REST application using DRF because its frontend will be ReactJS.
Can anyone explain how to achieve external auth with Django, particularly when the authentication server is OAuth2 based? Or better yet, how it can work with Laravel Passport in particular.
Thanks

Could the directus app be used in a django stack as a CMS

I am developing a web application in django and react but would like to use directus as a cms. I already have a mysql database and RESTful api set up and working so I was wondering if I could use the directus application as an application within django to manage and update content?
if not what would be the correct way to connect directus to my application? or should I stick with a cms built for integration into django projects?
There is no SDK for django/python yet but you can still use the standard way of HTTP requests instead.
In the docs, you can learn more about how to authenticate and how to make requests or update data.
Docs: https://docs.directus.io/api/reference.html#authentication