Re: Do I need to migrate pre-existing code into Django?
Den 17/12/2013 kl. 22.14 skrev Tyler Meche <tmeche87@gmail.com>:
> I have recently created a website, using PHP. No framework or anything else was used, just code.
>
> Now, I need to make an API for this website. It was suggested that I use Django as a framework. I was hoping to just be able to make an API in Python, using Django, without having to move my site that was already created into the Django framework and redo it in Python.
>
> Is it possible for me to have my site sitting by itself, and the API for the site in Django? Or do I need to have my site and the API all in Django?
It's perfectly possible to build an API in Django on top of an existing database. You can auto-generate the models using inspectdb if you want:https://docs.djangoproject.com/en/dev/howto/legacy-databases/ Use any of the API frameworks already mentioned.
If you want to enable creates, updates and deletes via the API, you need to be very careful to maintain data integrity, business rules, user authentication and authorization, handle cache invalidation and avoid race conditions when running alongside the PHP site.
Kind regards,
Erik
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/6E60B8F7-BD46-4928-8BFB-239A13044821%40cederstrand.dk.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home