--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/uZMPKqBO1JcJ.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Hi!
I'm a python developper, but new in django.
I'm devolopping a multi clients-server application.
The server and the clients are communicating via sockets, The server
receive somme states from clients, and display them in the User
interface.
In the other hand, the server has to send a message(packet) to the
client when an event occurs in the GUI, and data are stored in a
database.
Then I choose to make a web interface where data could be viewed and
manipulated. And I discovered Django, which fit all my needs. I tested
and liked the framework.
My questions are:
- Can I override the djando admin methods so that i can not only
customized my views and html page, but also manipulate objects in
database, so that i can do another action when catching an event in
the GUi.
For example, taking the django admin tutorial, I would like to do and
action like sending a message the user choose "add a poll". How can I
do those things? Cause I noticed that method that alter data in data
base are part of django admin module and cannot be overriden
- To achieve what I want, i would like to run my server engine and my
django admin in two separated threads. How do i run my admin module in
a thread? Cause till now i'm using the command line "python manage.py
runserver
- I also tried to overide tables name, and foreign keys names. Could
you guys provide me a true life example?
- And now in the production step, I would like you guys to tell me
what to choose for serving files. I would like to with your experience
what's better between running a unicorn server or apache with mod_wsgi
I don't know if i'm clear, but i hope. In brief I'd like to use the
django framework features to design my Gui like i want, customize
interactions between the gui and the backend, and choose a good web
server for the production.
Thank you for advance
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Thanks Guys for all.
I will carefully look at all your suggestions and see what is better in a production environment.
But the idea of having the possibility to abstract the frontend so that it can be changed is the best i think and was what i intended to do after my server become working and stable.
I want to run server engine(backend) in one thread catching and processing network packets from clients, and my the fronted running in a separated thread rendering data catching gui event.
I first choose to do it with cherrypy but it's not sweet for big projects and the fronted would not be so generic that way.
I then discover django with its features and possibilities.
I hope i will make and implement the best choice with your help.
Thanks and see you soon.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/6hGVZIFjm6QJ.
Hi,
Now it starts to make "sense".
I just wonder why are you trying to build something so extremely complicated?
What is the rationale behind to have additional middleware layer between web ui and the server backend?
Wouldn't it be sufficient to have architecture like:
Browser <-> django middleware <-> remote backend
Communication between django middle ware and remote backend should be built on top of some messaging system, like celery + rabbitmq which gives you quite standard asyncronous communication between django middleware and remote backend. Of course you might need to write some adapters on remote side but that's part of the job.
Only real problem is that if you need to push changes to browser side. There doesn't exists any really good ways to do that. HTML5 was supposed to bring websockets to overcome the problem. One big problem is that only from IE series only IE 10 supports it. All others, FF, Chrome, Safari has had it for a good while.
There exists also alternative workarounds like Comet, BOSH, push and few others.
So let
<mailto:django-users@googlegroups.com>.
To unsubscribe from this group, send email to
<mailto:django-users%2Bunsu...@googlegroups.com>.
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.
--
Jani Tiainen
- Well planned is half done, and a half done has been sufficient
before...
--
You received this message because you are subscribed to the Google
Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com
<mailto:django-users@googlegroups.com>.
To unsubscribe from this group, send email to
<mailto:django-users%2Bunsu...@googlegroups.com>.ngon...@epitech.net <mailto:ngon...@epitech.net>
symp...@gmail.com <mailto:symp...@gmail.com>
------------------------------------------------------------
/*Aux hommes il faut un chef, et au*//* chef il faut des hommes!*/
--
You received this message because you are subscribed to the Google
Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to
--
Jani Tiainen
- Well planned is half done and a half done has been sufficient before...
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
No i'm not inventing a server.
The application has a centrilzed server (module server installed on a dedicated host
).
The dispatches tasks to remote clients (the client module is installed on each client host) and receives informations from clients about taks state.
How would you like me to describe or call my app components?
What is not clear for you in my architecture description?
How would you call my server module?
And i'm not saying the database is installed on the same machine as the server, even if it could be.
But only the server can access database directly.
If you like so, What i call server could stand for a central task supervisor.
Thanks for attention Jani.
django...@googlegroups.com <mailto:django-users@googlegroups.com>
<mailto:django-users@__googlegroups.com
<mailto:django-users@googlegroups.com>>.
To unsubscribe from this group, send email to
django-users+unsubscribe@__googlegroups.com
<mailto:django-users%2Bunsu...@googlegroups.com>
<mailto:django-users%__2Bunsu...@googlegroups.com
<mailto:django-users%252Bunsubscribe@googlegroups.com>__>.
For more options, visit this group at
http://groups.google.com/__group/django-users?hl=en
<http://groups.google.com/group/django-users?hl=en>.
--
Jani Tiainen
- Well planned is half done, and a half done has been sufficient
before...
--
You received this message because you are subscribed to the
Groups "Django users" group.
To post to this group, send email to
django...@googlegroups.com <mailto:django-users@googlegroups.com>
<mailto:django-users@__googlegroups.com
<mailto:django-users@googlegroups.com>>.
To unsubscribe from this group, send email to
django-users+unsubscribe@__googlegroups.com
<mailto:django-users%2Bunsu...@googlegroups.com>
<mailto:django-users%__2Bunsu...@googlegroups.com
<mailto:django-users%252Bunsubscribe@googlegroups.com>__>.
For more options, visit this group at
http://groups.google.com/__group/django-users?hl=en
<http://groups.google.com/group/django-users?hl=en>.
--
ngon...@epitech.net <mailto:ngon...@epitech.net>
<mailto:ngon...@epitech.net <mailto:ngon...@epitech.net>>
symp...@gmail.com <mailto:symp...@gmail.com>
<mailto:symp...@gmail.com <mailto:symp...@gmail.com>>
------------------------------__------------------------------
/*Aux hommes il faut un chef, et au*//* chef il faut des hommes!*/
--
You received this message because you are subscribed to the Google
Groups "Django users" group.
To post to this group, send email to
django...@googlegroups.com
<mailto:django-users@googlegroups.com>.
To unsubscribe from this group, send email to
django-users+unsubscribe@__googlegroups.com
<mailto:django-users%2Bunsu...@googlegroups.com>.
For more options, visit this group at
http://groups.google.com/__group/django-users?hl=en
<http://groups.google.com/group/django-users?hl=en>.
--
Jani Tiainen
- Well planned is half done and a half done has been sufficient
before...
--
You received this message because you are subscribed to the Google
Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com
<mailto:django-users@googlegroups.com>.
To unsubscribe from this group, send email to
django-users+unsubscribe@__googlegroups.com
<mailto:django-users%2Bunsu...@googlegroups.com>.
For more options, visit this group at
http://groups.google.com/__group/django-users?hl=en
<http://groups.google.com/group/django-users?hl=en>.
--
ngon...@epitech.net <mailto:ngon...@epitech.net>
symp...@gmail.com <mailto:symp...@gmail.com>
------------------------------------------------------------
/*Aux hommes il faut un chef, et au*//* chef il faut des hommes!*/
--
You received this message because you are subscribed to the Google
Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.
--
Jani Tiainen
- Well planned is half done and a half done has been sufficient before...
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
Ok!
But it's not so complited to understand.
I will even send a diagram.
My questions are:
- Can I override the djando admin methods so that i can not only
customized my views and html page, but also manipulate objects in
database, so that i can do another action when catching an event in
the GUi.
For example, taking the django admin tutorial, I would like to do and
action like sending a message the user choose "add a poll". How can I
do those things? Cause I noticed that method that alter data in data
base are part of django admin module and cannot be overriden
- To achieve what I want, i would like to run my server engine and my
django admin in two separated threads. How do i run my admin module in
a thread? Cause till now i'm using the command line "python manage.py
runserver"
- I also tried to overide tables name, and foreign keys names. Could
you guys provide me a true life example?
- And now in the production step, I would like you guys to tell me
what to choose for serving files. I would like to with your experience
what's better between running a unicorn server or apache with mod_wsgi
I don't know if i'm clear, but i hope. In brief I'd like to use the
django framework features to design my Gui like i want, customize
interactions between the gui and the backend, and choose a good web
server for the production.
When you're asking if my client/server already exist. You're talking about physical machines or applications/modules?
- the machines where client module will run already exist and are used dayly. The client module will just be installed there and do what it has to do.
- every body knows the browser/gui can be found and run anywhere.
- Now the server machine where the web server should be running and the admin module will be deployed is a dedicated machine that should be set up specially for the project.
- the database could be on a separated machine or anywhere, it doesn't matter.
I don't know why you still don't understand Jani. The physical architecture is simple and i described it.
And i was saying all will now be done in http. I just have to make my admin(browser) notified asynchronously, as well as my clients (i know i should avoid distinguish them from the gui/browser but it's for make things clear)
See you.
Hi Jani.
I don't know why you say
" 3) Are you now trying to figure out how to plug in Django in "Adming module/PC with GUI block"?"
My admin module and the gui do not share anything. They are not on the same pc.
Gui is for displaying and admin for the page content management like any web aplication works.
I please us unot to build a myster arround this thread. The problem was simple:
I wanted my server to asynchronously manage web pages for views, and remote dustributed clients (like in the diagram) using tcp/udp sockets.
Now all communications will be done in http and any client will use this protocol (web browser or my app client module).
The server (a http server) will then just use an admin module based on django.
That's the way were going to do. Now, if you have advises concerning this impletation give them to please.
Thanks.
Hi Jani.
I don't know why you say
" 3) Are you now trying to figure out how to plug in Django in "Adming module/PC with GUI block"?"
My admin module and the gui do not share anything. They are not on the same pc.
Gui is for displaying and admin for the page content management as any
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Hi all!
Hope you still remember this post which helps dive into django. I have gone really ahead with my developments, and now i'm willing to make some optimization and have some few issues. I don't know if I should open a new thread for each one. You will tell me, but I prefered to do it here because the initial thread was this one.
- First I can't use the HttpResponseRedirect() method in my application, it does not work like it should. In fact in my models module, I have a JobHistory class and a member function in that class which returns a link for the listdisplay of that model in the admin module.
But when the id i'm looking for in the database does not exist, i would like to redirect the user to a custum error page. And to that I used HttpResponseRedirect() wich is unable to return the right address to the browser. I tried such things, read the documentation several times but nothing. I thought it was the reverse function which does not locate the page but no, because even with google address the browser receive a response address with some headers concatanated, and the browser cannot access the page, cause it has an invalid address:
the code line in the models module:
def get_executing_user_url(self):
user_list = SystemUser.objects.filter(systemuser_name = self.job_executing_user, host = self.job.host)
if not user_list:
return HttpResponseRedirect('http://www.google.com/')