How to integrate a python algorithm in a Django website

624 views
Skip to first unread message

david ekchajzer

unread,
Feb 15, 2017, 2:37:08 PM2/15/17
to Django users

Hello,

I am a novice in web programming. Knowing well python I turned to Django. I am on a project where I have to retrieve data from a form and then process them every week. More precisely, I want to apply an algorithm (python) that allows to classify people with different criteria in different lists and then send those lists by mail. I want this algorithm to run each week. But I do not see how I could integrate this algorithm into my site. thank you in advance Waiting to read you


David

Shawn Milochik

unread,
Feb 15, 2017, 3:03:30 PM2/15/17
to django...@googlegroups.com
It's not clear what aspect of this you are looking for help with. Can you be more specific? Have you written any code? If so, what is not working the way you expect it to?

If you want to schedule something to run regularly, you can use Celery or make a Django management command that gets run by cron.

If you just don't know where to start in creating a Django application to plug your algorithm into, go through the tutorial first:


François Schiettecatte

unread,
Feb 16, 2017, 12:10:14 AM2/16/17
to django...@googlegroups.com, david ekchajzer
David

You don’t say which platform you are on, I use linux so use cron for this, works very well.

François
> --
> 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...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/0baeebc4-46e5-447b-8499-ed19dd50e03a%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Message has been deleted

david ekchajzer

unread,
Feb 16, 2017, 7:30:07 AM2/16/17
to Django users
Hello, 

first thank you. My question would be: 

How could I use the data from my website database on a python algorithm? 
Should I put my python algorithm on a server?  How good I access these data?
Or is there a way with Django to use the data ?

phep

unread,
Feb 16, 2017, 7:49:39 AM2/16/17
to django...@googlegroups.com
Hi,

Le 16/02/2017 à 13:30, david ekchajzer a écrit :
> How could I use the data from my website database on a python algorithm?

As Shawn pointed out, it seems what you're looking for are Django custom
commands :
https://docs.djangoproject.com/en/1.10/howto/custom-management-commands/

Such commands you could run in cron jobs, as François said.

Regards,

phep

Reply all
Reply to author
Forward
0 new messages