On Sep 20, 12:07 am, Micke <mikael.gron...@gmail.com> wrote: > Thank you for your quick reply! > > My socket server is ready, but I dont know where to import it in > django so it starts when django starts?
You are going to run your socket server in a different python process than Django. Django is based on more of a CGI request-response cycle and doesn't mesh well with a socket server. However you can access the DB and Django models from inside your socket server. Think about it as importing parts of Django in your socket server, then serving views of that data from the Django process -P > > br > Mikael > > On Sep 19, 11:38 pm, Andy McKay <andy.glyn.mc...@googlemail.com> > wrote: > > > > > You could write a Python process that starts up a Socket Server and imports > > all the Django stuff, just like the current server does for HTTP. Then > > there's no need to "send the data to django". Might help: > > >http://docs.python.org/library/socketserver.html > > > On Mon, Sep 19, 2011 at 2:00 PM, Micke <mikael.gron...@gmail.com> wrote: > > > Hi, > > > Im new to Django and need some help in the right direction. > > > > I will create a socket server, that should recive raw udp data and put > > > it in a database. After that Django should present the data in a > > > customized view. > > > > Is it possible to create the server in Django, like in the views file, > > > so it starts up when django starts? So I can use the in data and use > > > orm to put it in db. Or do I need to do a separate server, that sends > > > data to django after it recieves it? > > > > Thanks > > > Mikael > > > > -- > > > You received this message because you are subscribed to the Google Groups > > > "Django users" group. > > > To post to this group, send email to django-users@googlegroups.com. > > > To unsubscribe from this group, send email to > > > django-users+unsubscr...@googlegroups.com. > > > For more options, visit this group at > > >http://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.