On Wednesday, March 30, 2011 07:24:24 pm Calvin Spealman wrote:
> They are completely unrelated. WX is a library for working with
> desktop-based UI toolkits, and Django is a framework for producing and
> delivering HTML/CSS/JS web content to a browser.
> 
> On Wed, Mar 30, 2011 at 10:03 PM, Aref <arefnamm...@gmail.com> wrote:
> > Hello,
> > 
> > I have created a small app with wxpython to manage and query databases
> > and now I am learning django and was wondering if it is possible to
> > incorporate some of the wxpython code in django. What I am trying to
> > do is to create the same app as the one in wxpython but make it web-
> > based rather than desktop. I know the django admin does that but I
> > wanted to learn how to create web based apps and thought that would be
> > a good exercise. Thanks for any pointers or ideas.
> > 
> > --
> > 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.


This all depends on how you wrote the code.  Did you modularize the core 
functionality so it doesn't depend on wx? 

A good design practice is to seperate the core functionality from the GUI 
code.  This allows you to attach different frontends to your programs with 
relative ease.

for example I have a system information tool.  The actual functionality to 
mine the system for the data it uses, is stand alone. It can run fine with a 
gui, cli or put a web app in front of it. Think of it as a library to mine the 
system.  You can do this with pretty much any kind of app. just have the app 
return data structures that are pure python code, like a dict or a class 
object. 

i.e. :
proc_list = { procid: procdetails, } 

each element has it's procid as the key, the details of the proc are in 
procdetails which could be a list or a class containing the data.

Then you could use wx to implement the display functionality of proc_list 
inyour GUI.  Django would be able to call the same code to display a proc 
list. or it can write to stdout to display the info.  

But as said above, you can not reuse any wx widgets or most of it (probably, I 
haven't looked at wx in a long time).  With pyqt, qtcore. qnetwork, qtsql 
stuff could be used without pain with django. qtgui would not be feasible.

Mike


-- 
Do more than anyone expects, and pretty soon everyone will expect more.

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