how to find if a record changed

2011-04-17 Thread Aref
Hello,

I have a text field which could be updated regularly and I want to
automatically attach a date every time the record is updated--but only
if the record is updated. Can this be done in django and how would I
go about doing it.
Thanks.

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



Re: how to find if a record changed

2011-04-17 Thread Aref
Thank you Mengu. I have tried what you suggested (I was concatenating
the date to the updated field instead) but the problem is that every
time there is a save the date gets added even though the field has not
changed. So I wanted to test if the field was changed and if so
concatenate the date to it if not I would do nothing.
Thanks for taking the time to respond to my question. Much
appreciated.

On Apr 17, 11:01 am, Mengu  wrote:
> i believe it does. you can override the "save" method of your model
> like this:
>
> from django.db import models
> from datetime import datetime
>
> # Create your models here.
> class TestModel(models.Model):
>         first_field = models.CharField(max_length=255)
>         second_field = models.BooleanField()
>         updated_at = models.DateTimeField(default=datetime.now)
>
>         def save(self, *args, **kwargs):
>                 if hasattr(self, 'id') and getattr(self, 'id') is not None:
>                         self.updated_at = datetime.now()
>                 super(TestModel, self).save(*args, **kwargs)
>
> On Apr 17, 6:25 pm, Aref  wrote:
>
> > Hello,
>
> > I have a text field which could be updated regularly and I want to
> > automatically attach a date every time the record is updated--but only
> > if the record is updated. Can this be done in django and how would I
> > go about doing it.
> > Thanks.

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



Re: how to find if a record changed

2011-04-17 Thread Aref
I managed to solve the issue. Here's the code:

def save(self, *args, **kwargs):
if hasattr(self, 'id') and getattr(self, 'id') is not None:
old_issue = Issues.objects.get(id=getattr(self,'id'))
self.updated_at = datetime.datetime.now()
if old_issue.issue != self.issue:
self.issue = self.issue +' '+':' + 'Modified' + ' ' +
str(datetime.datetime.now())
super(Issues, self).save(*args, **kwargs)
the table is Issues and has a field called issue. Having a record open
I get its id and then a copy of the record in the database. I compare
to the record as it is in the admin screen. If they are the same I do
not append the date (there is certainly a more elegant way of
appending the date than what I have here) and if not no date is
appended. This works as I intend.



On Apr 17, 11:25 am, Aref  wrote:
> Thank you Mengu. I have tried what you suggested (I was concatenating
> the date to the updated field instead) but the problem is that every
> time there is a save the date gets added even though the field has not
> changed. So I wanted to test if the field was changed and if so
> concatenate the date to it if not I would do nothing.
> Thanks for taking the time to respond to my question. Much
> appreciated.
>
> On Apr 17, 11:01 am, Mengu  wrote:
>
> > i believe it does. you can override the "save" method of your model
> > like this:
>
> > from django.db import models
> > from datetime import datetime
>
> > # Create your models here.
> > class TestModel(models.Model):
> >         first_field = models.CharField(max_length=255)
> >         second_field = models.BooleanField()
> >         updated_at = models.DateTimeField(default=datetime.now)
>
> >         def save(self, *args, **kwargs):
> >                 if hasattr(self, 'id') and getattr(self, 'id') is not None:
> >                         self.updated_at = datetime.now()
> >                 super(TestModel, self).save(*args, **kwargs)
>
> > On Apr 17, 6:25 pm, Aref  wrote:
>
> > > Hello,
>
> > > I have a text field which could be updated regularly and I want to
> > > automatically attach a date every time the record is updated--but only
> > > if the record is updated. Can this be done in django and how would I
> > > go about doing it.
> > > Thanks.

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



WxPython and django

2011-03-30 Thread Aref
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.



Re: WxPython and django

2011-03-31 Thread Aref
That's what I am looking for. Using wxpython to render some pages
(templates) especially formatting data from the database. Is there
some code snippets I can look at or maybe a tutorial to help me figure
out how to do this?
thanks

On Mar 30, 11:28 pm, Kenneth Gonsalves  wrote:
> On Wed, 2011-03-30 at 22:24 -0400, 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.
>
> not really so - I remember writing apps in wxPython, and basically I was
> writing something like views and templates. The the database api can be
> taken from django - the only difference is rendering in wsPython
> 'templates'.
> --
> regards
> KGhttp://lawgon.livejournal.com
> Coimbatore LUG roxhttp://ilugcbe.techstud.org/

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



Re: WxPython and django

2011-03-31 Thread Aref
Thanks Mike. Yes I am following the philosophy of separating things.
The "GUI" is separate and resides in the templates and it simply used
for data display and data entry. I keep everything modular and try not
to mix functions and modules. I'll follow your ideas and see how
things work. Thanks for taking the time to respond.

On Mar 30, 9:11 pm, Mike Ramirez  wrote:
> 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  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 athttp://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.



Re: WxPython and django

2011-03-31 Thread Aref
Thanks Mike. Yes I am following the philosophy of separating things.
The "GUI" is separate and resides in the templates and it simply used
for data display and data entry. I keep everything modular and try not
to mix functions and modules. I'll follow your ideas and see how
things work. Thanks for taking the time to respond.

On Mar 30, 9:11 pm, Mike Ramirez  wrote:
> 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  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 athttp://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.



Re: WxPython and django

2011-04-01 Thread Aref
Thank you Mike. This is what I was looking for before wasting time
going down a dead-end road.

On Mar 31, 8:28 pm, Mike Ramirez  wrote:
> On Thursday, March 31, 2011 06:34:42 pm Aref Nammari wrote:
>
> > Hi Calvin,  I think that there is some misunderstanding about what my
> > question was about. Let me try to clarify. Wxpython is a module which is
> > run just like any other python module. It is great for rendering forms,
> > widgets, frames etc...and it has within it an html module. You can embed
> > wxpython within html code.
> > Since wxpython is a python module and if you can run python code in django
> > apps then you should be able to run wxpython code provided the right
> > modules are imported--just like any other python module. What I was
> > thinking of doing is either embed some wxpython code within html to render
> > the different pages of the django app or call wxpython functions from the
> > html template. All the code resides on the server of course. The user
> > interacts with the app through the web page. So the forms would be
> > rendered by wxpython instead of html. I don't know if this is clearer or
> > if what I am thinking of is feasible at all.
>
> It's not feasable at all. Thing is, wxPython is a python bindings to
> wxwidgets, which is a c++ gui framework.  The browser will not know how to
> handle them, this is on purpose.  The browser itself does all the actual
> rendering of widgets from within its html engine, the browser should not know
> about wxwidgets, even if it itself is written in wx, this way.
>
> Don't let how the code is written fool you. wxpython is not going to work the
> way you think it is.  Browsers for security reasons do not execute random code
> and you can not send the widgets over the network that way, You'll need to
> rewrite the gui code.
>
> Mike
>
> --
> * LG loves czech girls.
>  LG: do they have additional interesting "features" other girls don't
> have? ;)
>         -- #Debian

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



populating a field based on selection of foreign key

2011-04-09 Thread Aref
I am working on a database project and I am facing a little challenge.
Here it is.

I have three tables defined as below:

class Generation(models.Model):
generation = models.CharField(max_length = 25)

def __unicode__(self):
return self.generation

class CogE(models.Model):
first_name = models.CharField(max_length=30)
last_name = models.CharField(max_length=30)
office_phone = models.CharField(max_length=15, blank=True)
mobile_phone = models.CharField(max_length=15, blank=True)
email = models.EmailField(blank=True)

def __unicode__(self):
return u'%s %s' % (self.first_name, self.last_name)

class System(models.Model):
system = models.CharField(max_length=30)
cog_E = models.ForeignKey(CogE)
project = models.ForeignKey(Project)
generation = models.ForeignKey(Generation)

def __unicode__(self):
return self.system


class Board(models.Model):
board = models.CharField(max_length=30)
sch_number = models.CharField(max_length=20, blank = True)
PWA_number = models.CharField(max_length=20, blank = True)
PWB_number = models.CharField(max_length=20, blank = True)
system = models.ForeignKey(System)
cog_E = models.ForeignKey(CogE)
generation = models.ForeignKey(Generation)

In the admin view I would like to the board generation field to be
populated based on the system entry (since generation is also a field
in the system table). Is this possible to do in django? Is the schema
correct (I know this is not really a django issue)? Any help is
greatly appreciated.

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



populating a field based on selection of foreign key

2011-04-09 Thread Aref
I am working on a database project and I am facing a little challenge.
Here it is.

I have three tables defined as below:

class Generation(models.Model):
generation = models.CharField(max_length = 25)

def __unicode__(self):
return self.generation

class CogE(models.Model):
first_name = models.CharField(max_length=30)
last_name = models.CharField(max_length=30)
office_phone = models.CharField(max_length=15, blank=True)
mobile_phone = models.CharField(max_length=15, blank=True)
email = models.EmailField(blank=True)

def __unicode__(self):
return u'%s %s' % (self.first_name, self.last_name)

class System(models.Model):
system = models.CharField(max_length=30)
cog_E = models.ForeignKey(CogE)
project = models.ForeignKey(Project)
generation = models.ForeignKey(Generation)

def __unicode__(self):
return self.system


class Board(models.Model):
board = models.CharField(max_length=30)
sch_number = models.CharField(max_length=20, blank = True)
PWA_number = models.CharField(max_length=20, blank = True)
PWB_number = models.CharField(max_length=20, blank = True)
system = models.ForeignKey(System)
cog_E = models.ForeignKey(CogE)
generation = models.ForeignKey(Generation)

In the admin view I would like to the board generation field to be
populated based on the system entry (since generation is also a field
in the system table). Is this possible to do in django? Is the schema
correct (I know this is not really a django issue)? Any help is
greatly appreciated.

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



Re: populating a field based on selection of foreign key

2011-04-10 Thread Aref
Hello Ernesto,

Thank you for taking the time to respond to my question. I tried your
suggestion and unfortunately it did not work. I need to fill in the
generation field of the board instance with the same generation as in
system. I would like this to happen automatically.
Again thanks for the response. Greatly appreciated. :)

On Apr 9, 9:36 pm, Ernesto Guevara  wrote:
> Hello!
> I think you need something like this in your admin.py:
>
> class SystemAdmin(admin.ModelAdmin):
>     list_display = ("generation", "system", "cog_E")
>     ordering = ["-cog_E"]
>     search_fields = ("system")
>     list_filter = ("generation")
>     list_per_page = 10
>
> admin.site.register(System, SystemAdmin)
>
> Try this. =)
>
> 2011/4/9 Aref 
>
> > I am working on a database project and I am facing a little challenge.
> > Here it is.
>
> > I have three tables defined as below:
>
> > class Generation(models.Model):
> >    generation = models.CharField(max_length = 25)
>
> >    def __unicode__(self):
> >        return self.generation
>
> > class CogE(models.Model):
> >    first_name = models.CharField(max_length=30)
> >    last_name = models.CharField(max_length=30)
> >    office_phone = models.CharField(max_length=15, blank=True)
> >    mobile_phone = models.CharField(max_length=15, blank=True)
> >    email = models.EmailField(blank=True)
>
> >    def __unicode__(self):
> >        return u'%s %s' % (self.first_name, self.last_name)
>
> > class System(models.Model):
> >    system = models.CharField(max_length=30)
> >    cog_E = models.ForeignKey(CogE)
> >    project = models.ForeignKey(Project)
> >    generation = models.ForeignKey(Generation)
>
> >    def __unicode__(self):
> >        return self.system
>
> > class Board(models.Model):
> >    board = models.CharField(max_length=30)
> >    sch_number = models.CharField(max_length=20, blank = True)
> >    PWA_number = models.CharField(max_length=20, blank = True)
> >    PWB_number = models.CharField(max_length=20, blank = True)
> >    system = models.ForeignKey(System)
> >    cog_E = models.ForeignKey(CogE)
> >    generation = models.ForeignKey(Generation)
>
> > In the admin view I would like to the board generation field to be
> > populated based on the system entry (since generation is also a field
> > in the system table). Is this possible to do in django? Is the schema
> > correct (I know this is not really a django issue)? Any help is
> > greatly appreciated.
>
> > --
> > 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.



attachments

2017-01-03 Thread Aref
I have downloaded the django-attachments app from GitHub. I followed the 
instructions for installation and usage but can't seem to make things work. 
Has anyone used this app and if so could you provide some example / 
snippets as how to get the app to work with another app in the project. 
What I am looking for is how to set the admin.py, models.py, urls.py and 
other files to make this work. If there are other suggestions on how to 
accomplish attaching files to an entry (such as a blog entry) please feel 
free to share.
Much appreciate any help.

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@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/d890d453-a2d2-4881-829b-703d02157690%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Electronic Notebook (ELN)

2015-09-02 Thread Aref
I am looking for an electronic notebook for general engineering notes. It 
seems that this would be a good candidate application for Django. Does 
anyone know if such an application has been written using Django or how 
difficult such an application would be to write?

Thanks.
Aref

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d03c9580-ed3f-4ddb-a396-ddcb520c93e7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Electronic Notebook (ELN)

2015-09-03 Thread Aref
Thanks Cowdawg. My computer at home is running Ubuntu and at work I am 
stuck with Windows. Ideally would like something that is platform 
independent. Anyway. will take a look and see if Evernote would do it.



On Thursday, September 3, 2015 at 7:57:49 AM UTC-6, Cowdawg wrote:
>
> On Wed, Sep 02, 2015 at 07:39:14PM -0700, Aref wrote: 
> > I am looking for an electronic notebook for general engineering notes. 
> It 
> > seems that this would be a good candidate application for Django. Does 
>
>
> You might want to take a look at Evernote.  Been using that application 
> for 
> a while and it is good enough that I pay for a professional level account. 
>
> Notes can be synced with Windows boxen, web, Android, IPad, whatever. 
>
> Now a Linux client for it that actually works would be nice... 
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8a34391e-703c-4ea8-a072-2e7acc4b2de6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: WxPython and django

2011-03-31 Thread Aref Nammari
Calvin,

The database as well as the django app sits on a server
(internal--this is not meant for public access by the general public).
To access the app users would have to login to the server through http
and run the app from there.

On 3/31/11, Calvin Spealman  wrote:
> Aref,
>
> The question I would have is where your database sits. Is it supposed
> to sit on a central server? In a website, your database only needs to
> be accessed by machine rendering the pages. If you want the same
> database talking to desktop applications, you need to let those apps
> talk to the database or run the database on individual users'
> machines. This is the part that concerns me, especially giving those
> users access to a central DB.
>
> On Thu, Mar 31, 2011 at 7:05 AM, Aref Nammari  wrote:
>> Thanks for the reply Calvin. I realize what django is about and what it is
>> meant for and I do understand what WxPython is capable of. I still think
>> that this does not prevent using wxpython as a frontend for django
>> app--instead of (or in conjunction with) HTML to render the page Iam
>> thinking that I should be able to use wxpython--pass the data to wxpython
>> module to display and take data from a form rendered with wxpython and
>> send
>> to django. This must doable I think.
>>
>> On Wed, Mar 30, 2011 at 8: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  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.
>>> >
>>> >
>>>
>>>
>>>
>>> --
>>> Read my blog! I depend on your acceptance of my opinion! I am
>>> interesting!
>>> http://techblog.ironfroggy.com/
>>> Follow me if you're into that sort of thing:
>>> http://www.twitter.com/ironfroggy
>>
>>
>
>
>
> --
> Read my blog! I depend on your acceptance of my opinion! I am interesting!
> http://techblog.ironfroggy.com/
> Follow me if you're into that sort of thing:
> http://www.twitter.com/ironfroggy
>

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



Re: WxPython and django

2011-03-31 Thread Aref Nammari
Hi Calvin,  I think that there is some misunderstanding about what my
question was about. Let me try to clarify. Wxpython is a module which is run
just like any other python module. It is great for rendering forms, widgets,
frames etc...and it has within it an html module. You can embed wxpython
within html code.
Since wxpython is a python module and if you can run python code in django
apps then you should be able to run wxpython code provided the right modules
are imported--just like any other python module. What I was thinking of
doing is either embed some wxpython code within html to render the different
pages of the django app or call wxpython functions from the html template.
All the code resides on the server of course. The user interacts with the
app through the web page. So the forms would be rendered by wxpython instead
of html. I don't know if this is clearer or if what I am thinking of is
feasible at all.

On Thu, Mar 31, 2011 at 6:33 PM, Calvin Spealman wrote:

> Then on what machine would the wx version run on? The user's machine
> or the server? If on the user's machine, how does it talk to the
> database? If on the server, how does the user interact with it?
>
> On Thu, Mar 31, 2011 at 9:04 AM, Aref Nammari 
> wrote:
> > Calvin,
> >
> > The database as well as the django app sits on a server
> > (internal--this is not meant for public access by the general public).
> > To access the app users would have to login to the server through http
> > and run the app from there.
> >
> > On 3/31/11, Calvin Spealman  wrote:
> >> Aref,
> >>
> >> The question I would have is where your database sits. Is it supposed
> >> to sit on a central server? In a website, your database only needs to
> >> be accessed by machine rendering the pages. If you want the same
> >> database talking to desktop applications, you need to let those apps
> >> talk to the database or run the database on individual users'
> >> machines. This is the part that concerns me, especially giving those
> >> users access to a central DB.
> >>
> >> On Thu, Mar 31, 2011 at 7:05 AM, Aref Nammari 
> wrote:
> >>> Thanks for the reply Calvin. I realize what django is about and what it
> is
> >>> meant for and I do understand what WxPython is capable of. I still
> think
> >>> that this does not prevent using wxpython as a frontend for django
> >>> app--instead of (or in conjunction with) HTML to render the page Iam
> >>> thinking that I should be able to use wxpython--pass the data to
> wxpython
> >>> module to display and take data from a form rendered with wxpython and
> >>> send
> >>> to django. This must doable I think.
> >>>
> >>> On Wed, Mar 30, 2011 at 8: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  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.
> >>>> >
> >>>> >
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> Read my blog! I depend on your acceptance of my opinion! I am
> >>>> interesting!
> &