>
> 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.


Anything that can be done with Django's Admin interface can be done
programmatically. If you choose to use a custom administration application
(for example, your Desktop Application) then you'll need to provide some
sort of an API over some sort of a Protocol (I vote HTTP). The easiest to
implement, in my opinion, is just using HTTP Methods (POST, GET, DELETE,
etc...) with proper HTTP Responses (200 OK, 404 Missing, etc...) and some
sort of a standard data-format (JSON, XML) as the Response Content when
sending data back and forth.

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


I'm not sure if I understand you correctly, here. You can use signals to
fire off an event when a user saves an object. If you want to display a
message to a user (e.g. "Your new poll has been created") then use the
Django Messaging Framework. If the default admininstration application
doesn't do what you need and it's not flexible enough to do what you want
-- then don't fight it, write your own Views and Model Methods to perform
this behavior.

- 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"


If you want to run the two as completely separate applications, simply take
two copies of your code-base and disable 'Admin' in one. Don't use Django's
runserver as a production server -- I'm sure others have already pointed
out (as well as the documentation) that it's not designed for that purpose.
Instead, use Nginx + uWSGI, Nginx + gunicorn, or even Apache for a
lower-traffic site.

 - I also tried to overide tables name, and foreign keys names. Could
> you guys provide me a true life example?


Override a table name:
https://docs.djangoproject.com/en/dev/ref/models/options/#table-names
Override foreign key name(s): Not really sure what you are asking here.

- 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 use Nginx + uWSGI. There's plenty of sites out there that give you more
information on the subject. I chose this option because it's scalable, I've
got the configuration figured out, and it's pretty efficient and
lightweight.

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.


>From your diagram you posted later-on, I think Django will work just fine
for your purpose. Just take it one step at a time and bulid it iteratively.
Break the whole architecture down into smaller pieces and tackle them one
at a time. You will learn a lot and will have a lot of fun doing it. Django
is a great framework to use and it's always been a pleasure for me except
the first month where there was *so many features* it was hard to pick a
place and go. Following the tutorials, as it appears you have done, is a
great way to start and you can learn more as you start to dive in deeper
and write more exciting code.

Good luck to you!

-- 
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.

Reply via email to