Manipulating ManyToManyField in Model.save()

2009-04-25 Thread medhat
because the form saves related data *after* the model itself is saved, so my code in save() runs, but it seems that after that it gets overwritten by the form. So, what is the best way to do what I am trying to do? I am hoping to be able to do it in the model (since that's where I t

a question about model inheritance after qs-rf

2008-04-29 Thread medhat
the ContentType object is already created by syncdb. So, is there a way to create an ACT and tell it to use a specific ContentType object as its parent? Or should this be done differently? -- Thanks, Medhat P.S. Before model inheritance I did this using a OneToOneField, but I am trying to take adv

Re: a question about model inheritance after qs-rf

2008-04-30 Thread medhat
"AttributeError: can't set attribute" from line 224 in django\db\models\base.py -- Medhat --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-

Re: a question about model inheritance after qs-rf

2008-05-01 Thread medhat
your help. -- Medhat On May 1, 11:49 am, AmanKow <[EMAIL PROTECTED]> wrote: > I did the following, it works fine: > > from django.db import models > > class Place(models.Model): > name = models.CharField(max_length=50) > address = models.CharField(max_le

sending email with cc

2007-09-16 Thread medhat
, headers={'Cc':cc}) but that still did not work... The people on the to kist will get the message, and it will be showing the cc list correctly, but the people on the cc list will never get it. Any ideas? -- Thanks in advance, Medhat --~--~-~--~~~---~--~~ Yo

Poor man's model inheritance question.

2006-10-31 Thread medhat
primary keys since django adds the implicit id field. Is this a bug? Is there a better way for me to achieve this? Or should I just wait patiently until model inheritance is implemented? -- Thanks, Medhat --~--~-~--~~~---~--~~ You received this message because you are

Creating an empty queryset

2006-12-27 Thread medhat
a way to create an empty QuerySet object without hitting the database? -- Thanks, Medhat --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-

Help with a strange error: ImportError No module named pwd

2006-12-28 Thread medhat
been that when moving from windows to linux it is usually a permissions problem, but I am really clueless about this one! Any help would be greatly appreciated. -- Thanks, Medhat --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Help with a strange error: ImportError No module named pwd

2006-12-29 Thread medhat
Permissions for what exactly? That's what I can't figure out! If pwd is a builtin module, shouldn't this problem affect other builtin modules too?! But it doesn't -- Thanks, Medhat --~--~-~--~~~---~--~~ You received this message because y

Re: Help with a strange error: ImportError No module named pwd

2006-12-29 Thread medhat
Well, re-emerging mod_python fixed the problem! -- Medhat --~--~-~--~~~---~--~~ 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 u

Help: Getting all the models that have a foreign key to another model?!

2006-12-30 Thread medhat
all the content_types that can be categorized and then return all the items for these types. Any insight would be greatly appreciated. -- Thanks, Medhat --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: Creating an empty queryset

2007-01-11 Thread medhat
The patch is in http://code.djangoproject.com/ticket/3283 -- Thanks, Medhat --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dj

Re: Creating an empty queryset

2007-01-11 Thread medhat
Well, the patch now has documentation and tests. -- Thanks, Medhat --~--~-~--~~~---~--~~ 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@googlegro

a password field?

2007-01-24 Thread medhat
hat I can compare some value to without storing the clear-text value in the field. (of course using the User model itself is not an option in my case, otherwise I would have not asked the question.) -- Thanks, Medhat --~--~-~--~~~---~--~~ You received this me

Accessing instance values in a model...

2006-05-23 Thread medhat
Probably the title is not very accurate, but I did not know how to word it any better! Probably the following scenarios will make it clearer: 1. I would like to generate the 'upload_to' parameter of the FileField based on the value of another field in my model. example: === class File(models.Mo

Re: Accessing instance values in a model...

2006-05-31 Thread medhat
Any insight from the django gurus out there? 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

Re: FileField with custom upload_to

2006-06-02 Thread medhat
Jay Parlar wrote: > I went ahead and filed a patch with Trac, > http://code.djangoproject.com/ticket/1994 > > Jay P. I like this solution... actually, I was trying to achieve something similar and came up with an almost identical solution. So, I am +1 for this patch. -- Th

help with constructing a query

2006-06-12 Thread medhat
ed in doing this with one resultant Q object. I can do it with multiple queries and then building the list in python. Thanks! -- Medhat --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group.

Re: help with constructing a query

2006-06-13 Thread medhat
Thanks, I understood the sql solution on your blog... but still can't figure out how to map that to django... waiting to read your next blog post :-) -- Medhat Malcolm Tredinnick wrote: > On Mon, 2006-06-12 at 12:09 -0700, medhat wrote: > > Hi, > > > > If you have a

Non-database fields on the admin side?

2006-08-04 Thread medhat
ature suggestion: Have one of the parameters in the Field to specify that this field should not have a database column, and another field that will specify a model function that should be called to populate that field when it is displayed. -- Regards, M

Re: Creating User Accounts

2006-08-04 Thread medhat
jango-users/browse_thread/thread/273e6b20740e5429/#) Thanks, medhat --~--~-~--~~~---~--~~ 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 T

notification when an object is deleted

2006-08-17 Thread medhat
, Medhat --~--~-~--~~~---~--~~ 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 [EMAIL PROT

Re: notification when an object is deleted

2006-08-17 Thread medhat
Joe wrote: > You could write a database trigger and bypass Django entirely. but I would like to keep it all in python. first, I am not an sql expert, and second I don't want to worry about the different possible backends. --~--~-~--~~~---~--~~ You received this

Re: notification when an object is deleted

2006-08-17 Thread medhat
James Bennett wrote: > It should happen automatically; Django emulates SQL's "ON DELETE > CASCADE" behavior when deleting an object to which other objects were > related. This has been really confusing to me... I have seen it happen sometimes, but it does not happen for all models or all kinds o

Re: notification when an object is deleted

2006-08-18 Thread medhat
if I don't want to delete the tickets but assign them to another user? -- Thanks, Medhat --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email t

Re: notification when an object is deleted

2006-08-19 Thread medhat
Ian Clelland wrote: > > 3. I am still looking for an answer to my original question at the > > beginning of this discussion. What if I don't want to delete the > > tickets but assign them to another user? > > Was that the original question? > > All I saw

Re: notification when an object is deleted

2006-08-19 Thread medhat
medhat wrote: > Ian Clelland wrote: > > > 3. I am still looking for an answer to my original question at the > > > beginning of this discussion. What if I don't want to delete the > > > tickets but assign them to another user? > > > > Was th

Re: urls.py changes ignored

2006-03-30 Thread medhat
er though. > > Note that the access_log shows my request but the error_log logs no > associated errors. If you are using Apache with mod_python you will need to restart the webserver. -- Medhat Assaad --~--~-~--~~~---~--~~ You received this message because yo

edit_inline on the other end of the OneToOneField

2006-03-30 Thread medhat
elf. Am I approaching this the correct way? or do I have to think about it differently? -- Thanks! Medhat Assaad --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: Pointing to Memcached on Remote Server

2011-12-02 Thread Medhat Gayed
Hi Matt, Did you check that port 11211 is open for connections on the remote server? Regards, Medhat On Fri, Dec 2, 2011 at 2:49 PM, mattym wrote: > Hi all - > > I am stuck on this one. Caching with memcached works when I reference > the local box holding Django. But when I poin