Google SoC: Call for student applications
Howdy folks -- Google's opened up the Summer of Code student application process, so if you (a) are a student (at any level) and (b) want to make $4500 this summer hacking on Django, go apply! All the Django-specific info is over at http://code.djangoproject.com/ wiki/SummerOfCode2006 and the Google page is at http:// code.google.com/soc/. If you have any questions I'd be glad to address them on or off list. Jacob --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: ANN: magic-removal branch merged to trunk
Fantastic! Django rocks the world. Thanks for the hard work of Django team and all participant all over the world. On May 2, 2006, at 9:50 AM, Adrian Holovaty wrote: > We'd like to thank ALL the dozens of people, all over the world, who > have submitted code, documentation, bug reports and other help in this > branch. Special thanks go to the magic-removal committers, Joseph > Kocherans, Russell Keith-Magee and Luke Plant. We are also busy in converting our code base for http:// www.ifaxian.com to use new API lately. :-) Cheers! - Cheng Zhang --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: ATTENTION: magic-removal being merged to trunk TODAY
Adrian Holovaty wrote: > Attention all users of the Django development version (a.k.a. trunk)! > > We are merging the magic-removal branch to trunk this evening, Monday, May 1. > > Do not "svn update" your Django code unless you're ready to convert > your code to magic-removal syntax. > > If you "svn update" by mistake and aren't yet ready for the > magic-removal APIs, you'll be able to "svn switch" back to the last > version of pre-magic-removal Django, which will be tagged in > Subversion. svn update can take an optional revision number as an argument (IIRC, --rev=) and it will "de-update" (update your working copy to a previous revision). -- --Max Battcher-- http://www.worldmaker.net/ "I'm gonna win, trust in me / I have come to save this world / and in the end I'll get the grrrl!" --Machinae Supremacy, Hero (Promo Track) --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
ANN: magic-removal branch merged to trunk
All, We've merged the magic-removal branch to trunk. All Django development will focus primarily on the branch formerly known as magic-removal, and all documentation on djangoproject.com will focus on the development version. Previous versions of the documentation are here: http://www.djangoproject.com/documentation/0_91/ (Covers 0.91 and development versions up to magic-removal merge) http://www.djangoproject.com/documentation/0_90/ (Covers 0.90 and development versions up to 0.91) (Note I haven't updated the docs on the site yet, but I'll be doing that shortly.) Detailed upgrade instructions are at: http://code.djangoproject.com/wiki/RemovingTheMagic We'd like to thank ALL the dozens of people, all over the world, who have submitted code, documentation, bug reports and other help in this branch. Special thanks go to the magic-removal committers, Joseph Kocherans, Russell Keith-Magee and Luke Plant. So, what's the next step? Let's take care of any new translations that need to be done for the new version in trunk, and then, pending small bugfixes, we'll release 0.95. (In tandem, we'll release 0.92, a "final" version of 0.91 that has a few months' worth of bugfixes applied.) As always, thanks for using Django. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: FileField fieldRequired error
I really appreciate all that you say! I am sorry just realised I typed in capital letters. I really tried more than 10 combinations, searched for all possible keywords here, tried all the documentations, compared my produced HTML with some from the admin one I have and this is what I get for HTML so far: File: < (the manipulator error message)*** This field is required. as soon as I click on the submit button! once again, 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: FileField fieldRequired error
On Tue, 2006-05-02 at 00:46 +, layik wrote: > > layik wrote: > > Hi, > > > > I have read this thread: > > http://groups.google.com/group/django-users/browse_frm/thread/399360004a8d0716/d6d355feecef7f7a?q=filefield+error=6#d6d355feecef7f7a > > > > > > please help me to use those two {{form.field}}{{form.field_file}} when > > I do my template! > > > > do I creat two differnet lables? do I put them both in one lable > > together? > > > > currently I use only {{form.field_file}} so the fileExplorer widget is > > there but when I click on submit button it gives me the error of "this > > field is required" although I DO selet a file. > > > > please help! thanks > > once again PLEASE HELP ME! Wow.. this is absolutely not the way to hope we will help you. You understand everybody on this list are volunteers, right? And you posted your first email less than 24 hours ago? You don't explain what you have already tried to do, so it's hard to point you in the right direction. People aren't intentionally ignoring you, we just have other things to do at the moment. I don't have time to look into your problem at the moment, but how about doing some experiments to see if it becomes clearer: put both fields into a template and have a look at the produced HTML when you render it. That will show you how the two fields are rendered, so it might provide more clues. It looks like from the thread you posted that one of those fields provides the existing name in a hidden field. Try it and see. Malcolm --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: FileField fieldRequired error
layik wrote: > Hi, > > I have read this thread: > http://groups.google.com/group/django-users/browse_frm/thread/399360004a8d0716/d6d355feecef7f7a?q=filefield+error=6#d6d355feecef7f7a > > > please help me to use those two {{form.field}}{{form.field_file}} when > I do my template! > > do I creat two differnet lables? do I put them both in one lable > together? > > currently I use only {{form.field_file}} so the fileExplorer widget is > there but when I click on submit button it gives me the error of "this > field is required" although I DO selet a file. > > please help! thanks once again PLEASE HELP ME! --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: __repr__ or __str__?
Hi Geoff, On Mon, 2006-05-01 at 07:46 -0700, gegard wrote: > I took a copy of the MR branch yesterday and worked through the rather > good tutorial this morning (at least to the end of #3 - I began to lose > my way in #4 in my first pass through). Three out of four isn't bad on the first path. There are a lot of concepts there. My first time through, I remember thinking "cool! Wonder how I just did that?" :-) > I found that the recommended __str__ method in tutorial #1 did not > produce the human-readable output (still giving ) and had > to use __repr__ for that today. The __str__ method is only called when Python wants to give the string representation. So "str(p)" and "print p" both call the __str__ method. But if you just type "p" at the interactive prompt, you get the __repr__ variant. This is normal Python behaviour -- nothing specific to Django. But working from the interactive prompt is, really, a bit of a corner-case: normally you are using print to see results, so __str__ typically gets invoked automatically. Adrian is doing a bit of a rewrite on the tutorial and so it's slightly incomplete at the moment, but ticket #1724 shows the type of changes that might be made to use __str__ instead of __repr__ at the command-line: a little fiddly, perhaps, but, again, how often do you run your programs by typing them in at the interactive prompt? I hope this clarifies things a little, rather than just adding to the confusion. Regards, Malcolm --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: FileField fieldRequired error
layik wrote: > Hi, > > I have read this thread: > http://groups.google.com/group/django-users/browse_frm/thread/399360004a8d0716/d6d355feecef7f7a?q=filefield+error=6#d6d355feecef7f7a > > > please help me to use those two {{form.field}}{{form.field_file}} when > I do my template! > > do I creat two differnet lables? do I put them both in one lable > together? > > currently I use only {{form.field_file}} so the fileExplorer widget is > there but when I click on submit button it gives me the error of "this > field is required" although I DO selet a file. > > please help! thanks once again PLEASE HELP ME! --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
ATTENTION: magic-removal being merged to trunk TODAY
Attention all users of the Django development version (a.k.a. trunk)! We are merging the magic-removal branch to trunk this evening, Monday, May 1. Do not "svn update" your Django code unless you're ready to convert your code to magic-removal syntax. If you "svn update" by mistake and aren't yet ready for the magic-removal APIs, you'll be able to "svn switch" back to the last version of pre-magic-removal Django, which will be tagged in Subversion. Look for an announcement here (on both the django-users and django-developers mailing lists) after we're done. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Custom manipulator - multiple records
No error message, but I don't know how to populate the _inline_collections property in FormWrapper. FormWrapper has a fill_inline_collections method: def fill_inline_collections(self): if not self._inline_collections: ic = [] related_objects = self.manipulator.get_related_objects() for rel_obj in related_objects: data = rel_obj.extract_data(self.data) inline_collection = InlineObjectCollection(self.manipulator, rel_obj, data, self.error_dict) ic.append(inline_collection) self._inline_collections = ic My manipulator needs to have a get_related_objects method but i'm not really sure how to implement it. I will need the timesheetdetails InlineObjectCollection in order to handle {% for ts_detail in form.timesheetdetails %} --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Django Architect/Developer Consultant needed Immediately
Hello all, Digital Variant, an Interactive Services shop is looking for an experienced Django Architect/Developer to help guide our app architecture and potentially work as a freelance developer on a number of current/future projects. We are using Django as the framework to develop next generation community/social networking sites. If you are interested, please get in touch with us immediately at [EMAIL PROTECTED] (including a brief bit on your experience and sites worked on will be helpful). 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Send POST data for unchecked checkboxes
On Monday 01 May 2006 21:47, Sam Tran wrote: > On 5/1/06, Luke Plant <[EMAIL PROTECTED]> wrote: > > On Monday 01 May 2006 20:03, Sam Tran wrote: > > > I am having the problem described in ticket 1045: > > > http://code.djangoproject.com/ticket/1045 > > > > > > Was this problem fixed in Django 0.91? > > > > It was closed as a WONTFIX, so I doubt it (the patch certainly has > > not been applied). The problem you are having is inherent in HTML > > forms, and the solution is to have a view function that knows what > > data should have been filled in. > > Hi Luke, > > Thank you for the information. > > However I am not sure how I would write such a view. I think you would have to write a custom manipulator that knows not to expect certain fields. However, I've never actually done this myself (I've barely used the 'forms' stuff in Django), so I can't really be more specific. Luke -- "In my opinion, we don't devote nearly enough scientific research to finding a cure for jerks." (Calvin and Hobbes) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/ --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Apache and static files
On 05/01/06 22:51, tgone wrote: > > Steven Armstrong wrote: >> On 05/01/06 22:36, tgone wrote: >> > Hello, >> > >> > I followed the tutorial on how to serve static files with >> > Apache+mod_python but I'm still having problems. I get a 404 when I try >> > to access an image at http://localhost/project/media/test.png. I know >> > for sure that mod_python is disabled for the /media/ dir, but I can't >> > get the images to display. >> > >> > Here is my httpd.conf: >> > >> > >> > >> > SetHandler python-program >> > PythonHandler django.core.handlers.modpython >> > PythonPath "['/home/webadmin'] + sys.path" >> > SetEnv DJANGO_SETTINGS_MODULE project.settings >> > PythonDebug On >> > >> > >> > >> > SetHandler None >> > >> > >> > >> > Here is my settings.py >> > >> > MEDIA_ROOT = '/home/webadmin/project/media/' >> > MEDIA_URL = 'http://localhost/project/media/' >> > ADMIN_MEDIA_PREFIX = '/project/media/' >> > >> > >> > I've double checked my MEDIA_ROOT and my image is there. >> > >> >> You haven't told Apache where your media folder is. >> >> Try something like: >> >> Alias /project/media /home/webadmin/project/media/ >> >>SetHandler None >> >> >> hth > > yes! thank you. > > I didn't see that info mentioned on > http://www.djangoproject.com/documentation/modpython/#serving-media-files. > Maybe it's assumed, but I'm new to Apache. > Yea, looks like the docs are a bit unclear/incomplete there. is only really usefull for mapping urls to applications. As soon as you're addressing static resources that are somewhere on the filesystem it's better to use . If the resource lives outside your apaches DocumentRoot you also need an Alias to link it in. cheers --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
FileField fieldRequired error
Hi, I have read this thread: http://groups.google.com/group/django-users/browse_frm/thread/399360004a8d0716/d6d355feecef7f7a?q=filefield+error=6#d6d355feecef7f7a please help me to use those two {{form.field}}{{form.field_file}} when I do my template! do I creat two differnet lables? do I put them both in one lable together? currently I use only {{form.field_file}} so the fileExplorer widget is there but when I click on submit button it gives me the error of "this field is required" although I DO selet a file. please help! 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Apache and static files
Steven Armstrong wrote: > On 05/01/06 22:36, tgone wrote: > > Hello, > > > > I followed the tutorial on how to serve static files with > > Apache+mod_python but I'm still having problems. I get a 404 when I try > > to access an image at http://localhost/project/media/test.png. I know > > for sure that mod_python is disabled for the /media/ dir, but I can't > > get the images to display. > > > > Here is my httpd.conf: > > > > > > > > SetHandler python-program > > PythonHandler django.core.handlers.modpython > > PythonPath "['/home/webadmin'] + sys.path" > > SetEnv DJANGO_SETTINGS_MODULE project.settings > > PythonDebug On > > > > > > > > SetHandler None > > > > > > > > Here is my settings.py > > > > MEDIA_ROOT = '/home/webadmin/project/media/' > > MEDIA_URL = 'http://localhost/project/media/' > > ADMIN_MEDIA_PREFIX = '/project/media/' > > > > > > I've double checked my MEDIA_ROOT and my image is there. > > > > You haven't told Apache where your media folder is. > > Try something like: > > Alias /project/media /home/webadmin/project/media/ > >SetHandler None > > > hth yes! thank you. I didn't see that info mentioned on http://www.djangoproject.com/documentation/modpython/#serving-media-files. Maybe it's assumed, but I'm new to Apache. --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Send POST data for unchecked checkboxes
On 5/1/06, Luke Plant <[EMAIL PROTECTED]> wrote: > > On Monday 01 May 2006 20:03, Sam Tran wrote: > > > I am having the problem described in ticket 1045: > > http://code.djangoproject.com/ticket/1045 > > > > Was this problem fixed in Django 0.91? > > It was closed as a WONTFIX, so I doubt it (the patch certainly has not > been applied). The problem you are having is inherent in HTML forms, > and the solution is to have a view function that knows what data should > have been filled in. > Hi Luke, Thank you for the information. However I am not sure how I would write such a view. Here is my model: class hierarchy_usr(meta.Model): id = meta.AutoField(primary_key=True) mgr_id = meta.CharField(maxlength=20, db_column="mgr_id") usr_id = meta.CharField(maxlength=20, db_column="usr_id") inherits = meta.BooleanField(blank=False, default=False) I want to represent all manager/user relationships. For a given relationship, if 'inherits' is True, then the manager inherits the user's permissions. I want to edit each manager/relationship by turning off or on, the 'inherits' boolean variable. Here is the view I wrote so far: def edit(request, mgr_id, usr_id): # Get the h_usr in question from the database and create a # ChangeManipulator at the same time. h_usr_obj = get_object_or_404(hierarchy_usrs, mgr_id__exact=mgr_id, usr_id__exact=usr_id) try: manipulator = hierarchy_usrs.ChangeManipulator(h_usr_obj.id) except hierarchy_usrs.DoesNotExist: raise Http404 if request.POST: new_data = request.POST.copy() new_data['mgr_id'] = str(mgr_id) new_data['usr_id'] = str(usr_id) errors = manipulator.get_validation_errors(new_data) if not errors: manipulator.do_html2python(new_data) manipulator.save(new_data) # Do a post-after-redirect so that reload works, etc. #return HttpResponseRedirect(request.path) return HttpResponseRedirect("/access/hierarchy_usr/") else: errors = {} # This makes sure the form accurate represents the fields of the h_usr. new_data = manipulator.flatten_data() form = formfields.FormWrapper(manipulator, new_data, errors) return render_to_response('access/hierarchy_usr_edit', {'form': form}) I would appreciate any help. Thanks. Sam --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Apache and static files
On 05/01/06 22:36, tgone wrote: > Hello, > > I followed the tutorial on how to serve static files with > Apache+mod_python but I'm still having problems. I get a 404 when I try > to access an image at http://localhost/project/media/test.png. I know > for sure that mod_python is disabled for the /media/ dir, but I can't > get the images to display. > > Here is my httpd.conf: > > > > SetHandler python-program > PythonHandler django.core.handlers.modpython > PythonPath "['/home/webadmin'] + sys.path" > SetEnv DJANGO_SETTINGS_MODULE project.settings > PythonDebug On > > > > SetHandler None > > > > Here is my settings.py > > MEDIA_ROOT = '/home/webadmin/project/media/' > MEDIA_URL = 'http://localhost/project/media/' > ADMIN_MEDIA_PREFIX = '/project/media/' > > > I've double checked my MEDIA_ROOT and my image is there. > You haven't told Apache where your media folder is. Try something like: Alias /project/media /home/webadmin/project/media/ SetHandler None hth --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Apache and static files
Hello, I followed the tutorial on how to serve static files with Apache+mod_python but I'm still having problems. I get a 404 when I try to access an image at http://localhost/project/media/test.png. I know for sure that mod_python is disabled for the /media/ dir, but I can't get the images to display. Here is my httpd.conf: SetHandler python-program PythonHandler django.core.handlers.modpython PythonPath "['/home/webadmin'] + sys.path" SetEnv DJANGO_SETTINGS_MODULE project.settings PythonDebug On SetHandler None Here is my settings.py MEDIA_ROOT = '/home/webadmin/project/media/' MEDIA_URL = 'http://localhost/project/media/' ADMIN_MEDIA_PREFIX = '/project/media/' I've double checked my MEDIA_ROOT and my image is there. --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Send POST data for unchecked checkboxes
On Monday 01 May 2006 20:03, Sam Tran wrote: > I am having the problem described in ticket 1045: > http://code.djangoproject.com/ticket/1045 > > Was this problem fixed in Django 0.91? It was closed as a WONTFIX, so I doubt it (the patch certainly has not been applied). The problem you are having is inherent in HTML forms, and the solution is to have a view function that knows what data should have been filled in. Luke -- "In my opinion, we don't devote nearly enough scientific research to finding a cure for jerks." (Calvin and Hobbes) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/ --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: ordering by fields in related objects
> plugging the FK field into the ordering clause produces an > OpertationalError, "Unknown table > 'RELATED_TABLE_THAT_MOST_CERTAINLY_IS_KNOWN' in order clause." Sorry, I meant to say specifically that this happens when I search in the admin. pb --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
ordering by fields in related objects
This may be a dumb question but I've been banging my head against it for a while. Two questions, actually. (I'm using the M-R branch.) 1) How can I use a field in a related model in a Meta.ordering clause? E.g. I want my Articles sorted by Reporter.lastname 2) How can I use a computed value in a Meta.ordering clause? E.g. I want my Reporters sorted by Reporter.number_of_articles_this_week() BTW, plugging the FK field into the ordering clause produces an OpertationalError, "Unknown table 'RELATED_TABLE_THAT_MOST_CERTAINLY_IS_KNOWN' in order clause." If the answer to my above questions is "you can't, sorry," then I hereby volunteer to at least try making that error message more useful. Thanks in advance for any advice. pb -- http://e-scribe.com/news/ --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Checking if ManyToManyField is empty in pre_save function
Luke Plant wrote: >It would be possible to get Django to throw an exception in this case. >What do people think about that? > > I think it makes sense. As well as documenting that though dependent objects (both M2M and 12M) look like they are belong to the parent they really can't be processed in parents save() method because in DB they are saved separately. --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: __repr__ or __str__?
I took a copy of the MR branch yesterday and worked through the rather good tutorial this morning (at least to the end of #3 - I began to lose my way in #4 in my first pass through). I found that the recommended __str__ method in tutorial #1 did not produce the human-readable output (still giving ) and had to use __repr__ for that today. Geoff --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Custom manipulator - multiple records
Hi winston, I a couple of weeks ago I was thinking about using this method to solve one of the pb I was facing. I don't see anything there that should not work, also I have never done such thing. Could you please let us know what is exactly your problem? If there is one, :-), could you also post the error message? bye, Yann --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Checking if ManyToManyField is empty in pre_save function
On Monday 01 May 2006 12:08, Dagur wrote: > On further inspection I found out > that the "authorised" field is set to all users before saving but is > empty after saving. > > >>> t = Topic() > >>> t.authorised.count() > > 2773L > > >>> t.save() > >>> t.authorised.count() > > 0L > > Is this the desired behavior? This is kind of a bug, caused by the fact that the ID of 't' is not set until it is saved, and 'authorised' is a dynamic attribute that does a database query on the many-to-many database table when you access it. It's impossible to evaluate .authorised properly until you have saved the object at least once. It would be possible to get Django to throw an exception in this case. What do people think about that? Luke -- "In my opinion, we don't devote nearly enough scientific research to finding a cure for jerks." (Calvin and Hobbes) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/ --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: MR Branch diff than MR trunk?
How often do you use svn to ensure that you're at the latest version? --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Django-based wiki engine
Daniel Poelzleithner ÐÉÛÅÔ: >It's part of a django suite for public mash networks: >http://ff-firmware.quamquam.org/trac/browser/ffsomething/trunk > > > what would be the proper command line to checkout the svn code? WBR, dimas --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Django-based wiki engine
Hi Daniel, Thank you for the hint. Your wiki app is nicely designed! Meanwhile, I launched a project, - empty, right now, - to make a plugable wiki engine: http://www.self-propelled-python.com/trac/knossos/ Everybody willing to participate is welcome. greetings, Giorgi --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Non English characters in URL
James Bennett wrote: > On 5/1/06, gabor <[EMAIL PROTECTED]> wrote: >> but then it also depends on the browser, for example firefox >> (intentionally) does not display them correctly... > > Actually, in this case there are multiple "correct" ways to display > the characters; one is to render the Unicode glyphs, which is what > Safari does, for example, and another is to show the characters in > URL-encoded format, which is what Firefox does. There are pros and > cons to each method which are probably beyond the scope of this > discussion. > you're absolutely correct. now reading back my response, the word 'correctly' was maybe not the best word for that situation :) gabor --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Checking if ManyToManyField is empty in pre_save function
Hi, I have a ManyToManyField called "authorised" (which is supposed to be a list of users) and a BooleanField called "is_private" which should be set to false if there are no users in "authorised" so I did this: def save(self): if self.authorised.count() == 0: self.is_private = False else: self.is_private = True super(Topic, self).save() But I found out that when creating a new Object and saving it that is_private is always set to True. On further inspection I found out that the "authorised" field is set to all users before saving but is empty after saving. >>> t = Topic() >>> t.authorised.count() 2773L >>> t.save() >>> t.authorised.count() 0L Is this the desired behavior? --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Non English characters in URL
On 5/1/06, gabor <[EMAIL PROTECTED]> wrote: > but then it also depends on the browser, for example firefox > (intentionally) does not display them correctly... Actually, in this case there are multiple "correct" ways to display the characters; one is to render the Unicode glyphs, which is what Safari does, for example, and another is to show the characters in URL-encoded format, which is what Firefox does. There are pros and cons to each method which are probably beyond the scope of this discussion. -- "May the forces of evil become confused on the way to your house." -- George Carlin --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Non English characters in URL
PythonistL wrote: > Is it possible to use non English characters in URL?To explain, > > in my urls.py I use > > (r'^shop/(?P.*?)/(?P.*?)/','shopproject.apps.shop.views.shop.IndexByCategory'), > > where > category_name > can consist non English characters.In my view i use > > def IndexByCategory(request,shop_name,category_name): > ... > ... > > > I noted that in my browser address bar that category_name is not > properly coded ( if consists non-English characters) and I can not use > F5( refresh) either. > Anyone solved that problem? > Thank you for help. generally such situations are solved using a SlugField.. which is a textfield that can only contain alphanumeric characters + the minus-sign i think. so with those there are no url problems. now back to your problem. generally, having non-ascii characters in the URLs is problematic. usually if they are in utf8, there's a chance that they will be displayed. but then it also depends on the browser, for example firefox (intentionally) does not display them correctly... so i would recommend you to use a SlugField, if possible. if it's not possible, and my advice did not help, please describe to us: - the charset you use in the URL - which browser - an actual example (an url that exhibits the problem) gabor --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: How can users only edit their own files?
Hi Olive, I couldnt do that, anywhere I can find more help about that? the notes seem to be too difficult for me, I would need more help on those, coz I have two types of staff who do differnet things. 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: How can users only edit their own files?
Thanks Max & James, that did it. I was terrified and I couldnt do any work yesterday, I should have come back here soon after. --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
[M-R] order by on custom SELECT column
On the models of tutorial 1, I want to get a list of Poll, order by how many choices it has. class Poll(models.Model): question = models.CharField(maxlength=200) pub_date = models.DateTimeField('date published') class Choice(models.Model): poll = models.ForeignKey(Poll) choice = models.CharField(maxlength=200) votes = models.IntegerField() I use a custom SELECT column as: select = { 'choices': 'SELECT COUNT(*) FROM polls_choice WHERE poll_id=polls_poll.id', } p = Poll.objects.extra(select=select).order_by('choices') By trying this, I found out a bug in the ORM layer which I reported and submitted a patch as: http://code.djangoproject.com/ticket/1730 Custom SELECT column is one way, I'd like to know is there any other ways to get the same thing, esp. only using db api since I try to avoid doing custom SQL as much as possible for portability purpose. BR, - Cheng --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: errors dictionary
Ivan,Thank you for your reply. Best regards, L. --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: MR Branch diff than MR trunk?
On 5/1/06, Sandro <[EMAIL PROTECTED]> wrote: > Is the currently available magic removal branch going to be any > different than the magic removal trunk that is soon going to be merged? There is no "magic-removal trunk", only a magic-removal branch. Django is like a tree -- the trunk is the core, and branches sprout off it every so often when new and interesting things need to happen. Eventually they get "merged" back in so that the new and interesting things are in the trunk; when that happens, the code in the branch replaces the code in the trunk, so the trunk, after the merge, will be identical to whatever the last version of the magic-removal branch was. So if you're building applications with magic-removal, they won't be affected by the merge; all it means is that magic-removal won't be a "branch" separate from the main version of Django anymore, and that improvements and bugfixes will take place on the trunk instead of on the magic-removal branch. -- "May the forces of evil become confused on the way to your house." -- George Carlin --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---