I have built a new website using wordpress which looks great and has required blogging functionality.
Our old site was built using Django and looked awful but had required backend functionality built into it thanks to Django. For example on one page it has a drop down box and you select options from it and it returns data, which works fine on the Django website.
I want to integrate this functionality into the wordpress front-end somehow. Is this possible? If so can you suggest how I might do this?
I understand that wordpress is a PHP CMS, and Django is a Python framework so you can't simply click them together. But does anyone have any suggestions on how I might integrate the functionality from my existing Django website inside my wordpress front end.
I have found this question: Wordpress on Django
Which asked how to connect to wordpress from Django. But I would like to connect to Django from wordpress.
In essence I want to replicate some of the Django pages on my wordpress site, utilising the existing Django backend functionality.
Can this be done? Any suggestions as to how?
Thanks.
I will share my experience in creating a hybrid solution and although for me it was two different PHP frameworks the approach could be the same. It's not a ready-to-go solution, but maybe it will help. I will list key points.
localhost/wordpress
and localhost/django
so that rewrite rules do not interfere. session_set_save_handler()
to register them) localhost/django/oldfunction
PHPSESSID
from cookies, and use it to read additional session data from the database (user_id for instance) and create a session. That way you implement "Single Signon" between two apps. This is a complicated approach and it's not fast but it's clean (you have two independent apps) and potentially allows slowly migrating and refactoring the old app functions into new one. The main thing here to have the access to the same database from both apps and to have them hosted on the same webserver.
Have you tried, https://github.com/agiliq/django-wordpress ?
I haven't used it yet.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.