I have a Moodle website and an Opencart website, I want to share Opencart session data with the Moodle website.
How would I do this?
See if you're going to use session for two different websites and I am assuming these both websites are deployed on different servers then do checkout Redis for the same. You can go through this article on Redis Session Management. It is better than Database or File storage and you can scale up easily in case of large traffics.
Related
(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
I am developing a static website and I will deploy it using a hosting service.
I am wondering whether the website will store cookies once deployed (perhaps set by the hosting service), and if and how I should ask users for permission since I have no backend but only frond-end html/css pages.
If there is only HTML and CSS then it stores no cookies. But if you have some javascript code in your website then you can use javascript to store cookies for remembering things. But for a simple HTML and CSS website cookies have no benefit to you and you can't access them.
I'm developing a SPA with html5 routes.
Ex: https://app.example.com/restaurants/<restaurantId>/menu etc
Basically the app creates dynamic websites for multiple restaurants, hosted at https://app.example.com/restaurants/<restaurantId>
The requirement is to allow the restaurant owners to host the site in their own domain name.
Ex: if the restaurantId of Example Pizza Shop is xxx
then www.examplepizza.com should serve the contents of https://app.example.com/restaurants/xxx along with all the sub-routes.
The project is hosted on firebase, I'm looking for ideas on how to achieve this (even if I have to use services outside firebase it's okay)
Thanks in advance.
Firebase Hosting is not well-suited to these kinds of multi-tenant use cases, and you'll find the same is true for most "platform-as-a-service" style hosting providers.
To host arbitrary custom domains, you'll need:
Dedicated IP addresses that customers can point their DNS providers to (A records).
A web server capable of dynamically changing what it serves based on the Host header of the incoming request.
An automated SSL certificate provisioning system to create certificates for each customer's custom domain.
This is generally a major undertaking and requires quite a bit of both general and specialized knowledge. I don't think Stack Overflow is going to be the right place to find a specific solution, but I hope this guides you on your journey.
We are in the process of porting to Flask a POS app written in ASP Classic. We want to roll the pages out incrementally so that some pages use Flask while some pages use ASP Classic.
The hurdle is sharing sharing sessions between the two, which includes sharing the authentication variables. I have two questions about this:
Does the right approach entail sharing sessions in the form of cookies?
If so, how do I accomplish cookie-based authentication on Flask so that I can get the user variables with the cookies I send from ASP Classic?
Yes, but you would be exposing users to a security concern called session hijacking. My knowledge of Flask is minimal, but I do not think it can query session data from ASP, so you would have to pass the session's data to Flask.
I am planning a Sitecore deployment, I was reading a "Separating Authoring from Delivery" http://www.awareweb.com/AwareBlog/ArchConsideration.aspx.
Do I need to install and configure Sitecore in both envioronments. In that case users can access Delivery/Sitecore and Authoring/Sitecore.
How can I actually seperate two websites? I am bit confused. Please help!
Dhanuka777, as mentioned by techphoria, you'll really have to start reading up on a lot of things before you'll be able to get more direct help.
That being said, this is the basics of what you're trying to achieve:
Delivery: This is a website running the sitecore web application, but it does not allow users to login to the Sitecore editing interface. It can only serve up the content to your extranet users.
Authoring: This is a website running the sitecore web application, but it allows users to login to the Sitecore editing interface. Extranet users cannot access it. This usually means it's running on a VM or server behind a firewall.
You will also need to look at how you want deploy your databases to support these two sites.