Re: django.core.handlers.modpython imported several times
Adrian Holovaty wrote: On 1/4/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > here what I've got from my Apache2 error log: > > [Thu Jan 04 16:07:57 2007] [notice] mod_python: (Re)importing module > 'django.core.handlers.modpython' > [Thu Jan 04 16:08:06 2007] [notice] mod_python: (Re)importing module > 'django.core.handlers.modpython' > [Thu Jan 04 16:34:15 2007] [notice] mod_python: (Re)importing module > 'django.core.handlers.modpython' > > > I was wondering what could be the reason of it ? Hello, I've seen this Apache notice too, and I'm not sure what it is, but it's never caused any problems for me. :) With that said, I would be grateful if anybody could explain why that happens, and if we need to change something on Django's end so that, at the very least, people's logfiles won't get cluttered with this. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com Hi Adrian, Actually, I found this because I'm having some problems with my 2 django sites on Apache2: I've followed the instructions from http://www.djangoproject.com/documentation/modpython/ to set them up, using 2 different PythonInterpreter directives... I have some random errors as if the python interpreters were conflicting: for example: "ViewDoesNotExist at /dev/checklogin/ Tried p_check_login in module vizit.vizitapp.views. Error was: InputSource instance has no attribute 'uri' Request Method: POST Request URL:https://xx/dev/checklogin/ Exception Type: ViewDoesNotExist Exception Value:Tried p_check_login in module vizit.vizitapp.views. Error was: InputSource instance has no attribute 'uri' Exception Location: /usr/lib/python2.3/site-packages/Django-0.95-py2.3.egg/django/core/urlresolvers.py in get_callback, line 122" The only error message I have found so far in the error log is the one described above. Thanks for all, georges. --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: django.core.handlers.modpython imported several times
On 1/4/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: here what I've got from my Apache2 error log: [Thu Jan 04 16:07:57 2007] [notice] mod_python: (Re)importing module 'django.core.handlers.modpython' [Thu Jan 04 16:08:06 2007] [notice] mod_python: (Re)importing module 'django.core.handlers.modpython' [Thu Jan 04 16:34:15 2007] [notice] mod_python: (Re)importing module 'django.core.handlers.modpython' I was wondering what could be the reason of it ? Hello, I've seen this Apache notice too, and I'm not sure what it is, but it's never caused any problems for me. :) With that said, I would be grateful if anybody could explain why that happens, and if we need to change something on Django's end so that, at the very least, people's logfiles won't get cluttered with this. 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?hl=en -~--~~~~--~~--~--~---
django.core.handlers.modpython imported several times
Hi all, here what I've got from my Apache2 error log: [Thu Jan 04 16:07:57 2007] [notice] mod_python: (Re)importing module 'django.core.handlers.modpython' [Thu Jan 04 16:08:06 2007] [notice] mod_python: (Re)importing module 'django.core.handlers.modpython' [Thu Jan 04 16:34:15 2007] [notice] mod_python: (Re)importing module 'django.core.handlers.modpython' I was wondering what could be the reason of it ? Thanks very in advance for any help, georges --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
problem with inclusion_tag
Running into a bit of an issue trying to load a custom tag in my base.html file. ive got /project/templates/base.html /project/templatetags/showmenu.py showmenu.py from django.template import Library, Node from django.contrib.auth.models import User from django.conf import settings register = Library() def showmenu(user): services = TBService.objects.filter(user=user.id) return {'services': services} register.inclusion_tag('base.html', takes_context=True)(showmenu) base.html {% showmenu %} {% for service in services %} {{ service.name }} {% endfor %} but receiving this error: Exception Type: TemplateSyntaxError Exception Value:Invalid block tag: 'showmenu' im still a bit confused on inclusion_tags, and ive searched the mailing lists for possible explanations on implementing user specific information in a base template file for use in template inheritance. any guidance is appreciated thx --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Newforms clean_data
On 1/3/07, Honza Král <[EMAIL PROTECTED]> wrote: I do agree that the magic would be bad - but the current state IS confusing, would it be possible to simply a) hide clean_data until validation has been done b) throw some exception when accessing uninitialized clean_data This is a good idea -- I agree it would help avoid confusion. In changeset [4284], I've changed the Form class so that Form.clean_data only exists if a Form is valid. Otherwise, you'll get an AttributeError if you try to access it. Thanks for the suggestion! 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?hl=en -~--~~~~--~~--~--~---
Re: Daily Kos considering switch to python
On 1/3/07, ogghead <[EMAIL PROTECTED]> wrote: This would be an excellent opportunity for Django to be considered if we argue our case well. Ehh... I'm wary of communities wading in and evangelizing people they don't know, so I'd recommend caution and care to anyone who wants to argue the case for Django. The best thing we can do, as a community, is be a source of helpful, civilized and above all *unbiased* information. That way, no matter what they end up choosing it will have been an informed choice, which is the best thing for everyone. -- "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?hl=en -~--~~~~--~~--~--~---
Re: CRUD design question
you would have an html form with if's around each input if there was a value or not or even just around the whole thing. Now that I think about it, it might be easier to make 2 views for this though. --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Daily Kos considering switch to python
The extremely popular left-leaning political website, Daily Kos, is planning to dump their perl-based Scoop backend and start again. They need a highly customizable CMS or framework that can handle heavy loads. This would be an excellent opportunity for Django to be considered if we argue our case well. If nothing else, give python a nudge in the poll, where it currently trails perl: http://www.dailykos.com/storyonly/2007/1/3/182756/0971 --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Unpacking in template loops
Sorry if this has been brought up before, I tried searching... Would it be too complex/controller-y/confusing to allow sequence unpacking in Django's for loops? As far as I can tell it isn't supported. So for example, if I have a list... fruits = [('apple', 10), ('orange', 5), ('banana', 7)] ...as far as I know the only way to access both items is like so: {% for item in fruits %} You have {{ item.1 }} {{ item.0 }}{{ item.1|pluralize }}. {% endfor %} Using a dictionary instead makes things a little prettier: fruits = [{'name': 'apple', 'count': 10}, ...] {% for item in fruits %} You have {{ item.count }} {{ item.name }}{{ item.count|pluralize }}. {% endfor %} ...but in my mind this looks familiar and isn't too crazy for designers: {% for name,count in fruits %} You have {{ count }} {{ name }}{{ count|pluralize }}. {% endfor %} In my opinion that's not doing too much logic to be available in template processing. Also, I think the syntax can remain simple, maybe disallow parentheses, no space around the commas? Too much for template designers? Use a dictionary instead? What do you guys think? I'll write a patch if there's any interest... --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: flatpages with content entirely in template
Makes sense. I guess djangoproject.com might not be the best production deployment of django to look to for the latest-and- greatest way to do things :-) James On 03/01/2007, at 10:40 PM, James Bennett wrote: On 1/3/07, James Tauber <[EMAIL PROTECTED]> wrote: It does, however, raise the question why djangoproject.com does the homepage as a flatpage rather than direct_to_template generic view. If I had to guess, I'd say it's because direct_to_template didn't exist until revision 1247 of Django, and so when the site was originally put together flatpages were the only option. --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: flatpages with content entirely in template
On 1/3/07, James Tauber <[EMAIL PROTECTED]> wrote: It does, however, raise the question why djangoproject.com does the homepage as a flatpage rather than direct_to_template generic view. If I had to guess, I'd say it's because direct_to_template didn't exist until revision 1247 of Django, and so when the site was originally put together flatpages were the only option. -- "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?hl=en -~--~~~~--~~--~--~---
Re: flatpages with content entirely in template
Thanks, that's helpful. It does, however, raise the question why djangoproject.com does the homepage as a flatpage rather than direct_to_template generic view. James On 03/01/2007, at 7:41 PM, James Bennett wrote: On 1/3/07, James Tauber <[EMAIL PROTECTED]> wrote: Or are people using template-only flatpages just going ahead and making flatpage database records with dummy title/content just to specify the template to use? (and is this indeed what djangoproject.com itself is doing?) Off the top of my head, I'd say it depends on how many "template-only" pages you want and how programmatically predictable their URLs will be: * If you've got a lot of these pages, or if they're at lots of random URLs, or both, using flatpages to drop a "template-only" page at a particular URL is probably the simplest thing. * If you don't have very many of these pages, or if they're all in easily-targeted locations in your URL structure, using the direct_to_template generic view is probably the simplest thing (since that gives you the ability to capture parameters out of the URL and pass them to the template, you could then muddle the logic/presentation distinction a bit and trigger different content using nothing but the template system). --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: CRUD design question
[EMAIL PROTECTED] wrote: Create a form where if it's new, it's blank and has a "create" button that makes the thing. If you are viewing, fill in the form with the existing info with an "update" button. You can also add a "delete" button to the view/update version if you want. This is just a couple of conditionals really... I guess I don't understand, what would the HTML look like ;-), and do I need any django parameters passed in so I would know what options to have. For example, can I have the /form option in HTML w/o a submit button? again, remember, real newb here! 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?hl=en -~--~~~~--~~--~--~---
Re: noob help, many to one, model
Awesome, thanks for the help. I think a piece of my problem was being new to Python as well but now I am on the right tracks. 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?hl=en -~--~~~~--~~--~--~---
Sessions without cookies for mobile sites
Hi, I'm fairly new to Django (first post!) and have searched for a solution to this problem without finding anything useful - forgive me if this has been covered before. I'm currently working on a hybrid web/mobile app, and have hit a bit of a stumbling block because a lot of the phones on the Japanese market don't support cookies. "The Django sessions framework is entirely, and solely, cookie-based. It does not fall back to putting session IDs in URLs as a last resort, as PHP does. This is an intentional design decision. Not only does that behavior make URLs ugly, it makes your site vulnerable to session-ID theft via the "Referer" header." I understand the reasoning behind the above design decision (and i completely agree), but in this case URL-based sessions are a necessity (and are standard practice for mobile sites here, although I can't speak for the rest of the world). The risk of session-ID theft is unavoidable due to the limitations of current mobile devices. What would be the best way of implementing URL-based sessions? I've been looking at the contrib/sessions/ code, and am considering writing some custom middleware to try to deal with the problem, but I'm worried about the amount of work this may involve to get working. Has anyone else had any experience with url-based sessions, or have any pointers on a relatively painless way to go about it? I'm guessing building the session from a GET parameter wouldn't be too difficult, but re-writing all the links may be more troublesome. I'd like the whole thing to hook into request.user if possible, rather than creating a completely new session/authentication system. The main drawcard for me is Django's great templating setup, which looks like an easy way to serve XHTML/CHTML/HTML/HDML dependent on the phone model, but if I can't get around the session problem I might have to go back to PHP/XSLT (which I'd like to avoid if at all possible because I'm loving django so far). Any help/suggestions/advice would be much appreciated! thanks dave --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
DATE template filter breaks utf-8 encoded week days
Hello, I had a slight problem with the DATE template filter - it incorrectly truncates localized (in my case to 'cs-cz' locale) week names when I wanted to get 3-char week day name - utf-8 characters got broken "at half". A small fix for that solved the problem: --- django/utils/dateformat.py (revision 4274) +++ django/utils/dateformat.py (working copy) @@ -116,7 +116,7 @@ def D(self): "Day of the week, textual, 3 letters; e.g. 'Fri'" -return WEEKDAYS[self.data.weekday()][0:3] +return WEEKDAYS[self.data.weekday()].decode('utf-8')[0:3].encode('utf-8') def F(self): "Month, textual, long; e.g. 'January'" Something similar was discussed in "To Truncate a Word to # of chars", http://groups.google.com/group/django-users/browse_thread/thread/ace40ec28945c0c4 --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Many-To-Many relationships, select_related()
Is there a problem in django's many-to-many relationship mapper when it comes to selecting the related fields? In this simple example I have a user with permissions and they are related via an intermediary table. "select_related()" only brings back the User object and each access of a Permission object results in a query. Is there a way to avoid making N queries to the database where N is the number of users that I have? Example Model and ORM Call: class App(models.Model): name = models.CharField(maxlength=32) class Permission(models.Model): name = models.CharField(maxlength=32) description = models.CharField(maxlength=255) app = models.ForeignKey(App) class User(models.Model): username = models.CharField(maxlength=32) password = models.CharField(maxlength=48) first_name = models.CharField(maxlength=50) last_name = models.CharField(maxlength=50) permissions = models.ManyToManyField('Permission') user = User.objects.select_related().all() Thanks, Trey --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: flatpages with content entirely in template
On 1/3/07, James Tauber <[EMAIL PROTECTED]> wrote: Or are people using template-only flatpages just going ahead and making flatpage database records with dummy title/content just to specify the template to use? (and is this indeed what djangoproject.com itself is doing?) Off the top of my head, I'd say it depends on how many "template-only" pages you want and how programmatically predictable their URLs will be: * If you've got a lot of these pages, or if they're at lots of random URLs, or both, using flatpages to drop a "template-only" page at a particular URL is probably the simplest thing. * If you don't have very many of these pages, or if they're all in easily-targeted locations in your URL structure, using the direct_to_template generic view is probably the simplest thing (since that gives you the ability to capture parameters out of the URL and pass them to the template, you could then muddle the logic/presentation distinction a bit and trigger different content using nothing but the template system). -- "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?hl=en -~--~~~~--~~--~--~---
Re: user registration app
I made one http://fivethreeo.dynalias.org/pages/using-userprofile-app/ But not very generic --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
user registration app
Has anyone here built a user registration app for django (including email verification and support for password resets, etc) that is generic enough to be shared? In particular, I want a system that works pretty much like the diagrams at: http://jtauber.com/blog/2006/03/20/account_management_patterns (there I was describing what I built for Quisition, an application I'm now porting to Django) I'd rather not have to write my own, but if I do, I'll try to make it generic enough that others can use it. James -- James Tauber http://jtauber.com/ journeyman of some http://jtauber.com/blog/ --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
ProgrammingError: ERROR: invalid input syntax for integer: ""
Hello all, I have a ForeignKey that may be NULL in a table editable inline, see http://www.radix50.net/~ibr/mysite/myapp/models.py (the whole project with the data is available at http://www.radix50.net/~ibr/mysite.tar.gz ). When I fill in the first Price in the Admin Home -> Object page, saving results in the error below. Sometimes (when I change something) I get an error message about aborted transaction with similar symptoms (myapp_attr.id being ''), the backtrace mentions Attr.__str__(). I tried django trunk 3709 and 4276. What is wrong? Thanks in advance, -- Baurzhan Ismagulov http://www.kz-easy.com/ - Forwarded message from [EMAIL PROTECTED] - Date: Wed, 03 Jan 2007 18:50:28 GMT From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [Django] Error (EXTERNAL IP): /mysite-admin/myapp/object/2/ Traceback (most recent call last): File "/home/ibr/tmp/w/h/kz-ez/download/django/django/trunk/django/core/handlers/base.py", line 77, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/home/ibr/tmp/w/h/kz-ez/download/django/django/trunk/django/contrib/admin/views/decorators.py", line 55, in _checklogin return view_func(request, *args, **kwargs) File "/home/ibr/tmp/w/h/kz-ez/download/django/django/trunk/django/views/decorators/cache.py", line 39, in _wrapped_view_func response = view_func(request, *args, **kwargs) File "/home/ibr/tmp/w/h/kz-ez/download/django/django/trunk/django/contrib/admin/views/main.py", line 329, in change_stage new_object = manipulator.save(new_data) File "/home/ibr/tmp/w/h/kz-ez/download/django/django/trunk/django/db/models/manipulators.py", line 209, in save self.fields_added.append('%s "%s"' % (related.opts.verbose_name, new_rel_obj)) File "/home/ibr/tmp/w/h/kz-ez/mysite/myapp/models.py", line 42, in __str__ if self.attr: File "/home/ibr/tmp/w/h/kz-ez/download/django/django/trunk/django/db/models/fields/related.py", line 171, in __get__ rel_obj = self.field.rel.to._default_manager.get(**params) File "/home/ibr/tmp/w/h/kz-ez/download/django/django/trunk/django/db/models/manager.py", line 67, in get return self.get_query_set().get(*args, **kwargs) File "/home/ibr/tmp/w/h/kz-ez/download/django/django/trunk/django/db/models/query.py", line 211, in get obj_list = list(clone) File "/home/ibr/tmp/w/h/kz-ez/download/django/django/trunk/django/db/models/query.py", line 103, in __iter__ return iter(self._get_data()) File "/home/ibr/tmp/w/h/kz-ez/download/django/django/trunk/django/db/models/query.py", line 430, in _get_data self._result_cache = list(self.iterator()) File "/home/ibr/tmp/w/h/kz-ez/download/django/django/trunk/django/db/models/query.py", line 172, in iterator cursor.execute("SELECT " + (self._distinct and "DISTINCT " or "") + ",".join(select) + sql, params) File "/home/ibr/tmp/w/h/kz-ez/download/django/django/trunk/django/db/backends/postgresql/base.py", line 43, in execute return self.cursor.execute(sql, [smart_basestring(p, self.charset) for p in params]) ProgrammingError: ERROR: invalid input syntax for integer: "" SELECT "myapp_attr"."id","myapp_attr"."slug","myapp_attr"."description" FROM "myapp_attr" WHERE ("myapp_attr"."id" = '') , POST:, COOKIES:{'sessionid': 'b5acb55462fc026c69438a56e9a8eb85'}, META:{'AUTH_TYPE': None, 'CONTENT_LENGTH': 0L, 'CONTENT_TYPE': None, 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'HTTP_ACCEPT_CHARSET': 'KOI8-R,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_CONTENT_LENGTH': '98', 'HTTP_CONTENT_TYPE': 'application/x-www-form-urlencoded', 'HTTP_COOKIE': 'sessionid=b5acb55462fc026c69438a56e9a8eb85', 'HTTP_HOST': 'medeu', 'HTTP_KEEP_ALIVE': '300', 'HTTP_REFERER': 'http://medeu/mysite-admin/myapp/object/2/', 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20060926 Debian/1.7.8-1sarge7.3.1', 'PATH_INFO': '/myapp/object/2/', 'PATH_TRANSLATED': None, 'QUERY_STRING': None, 'REMOTE_ADDR': '192.168.0.7', 'REMOTE_HOST': None, 'REMOTE_IDENT': None, 'REMOTE_USER': None, 'REQUEST_METHOD': 'POST', 'SCRIPT_NAME': None, 'SERVER_NAME': 'medeu.radix50.net', 'SERVER_PORT': 0, 'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SOFTWARE': 'mod_python'}> - End forwarded message - --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: psycopg installation error: C compiler cannot create executables
Your path probably doesn't include pg_config on it. Step 4 in the Postgres instructions has you adding /opt/pgsql/bin to your path - I don't have a Mac with me to check, but is pg_config in there? If not, add on to your PATH environment variable for where-ever its located and it should build from there. -joe On 1/3/07, Abe <[EMAIL PROTECTED]> wrote: Hey all. Im trying to get django up and running on my Mac (powerbook, powerpc chip, 10.4 OSX). I got postgresql v 8.2.0 up and going, along with Python 2.4. I go to install psycopg to get the two communicating with one another, and, following the directions on the SetupOnTiger (http://code.djangoproject.com/wiki/SetupOnTiger) part of the Django page, got to configuring psycopg. When I typed ./configure --with-postgres-libraries=$(pg_config --libdir) --with-postgres-includes=$(pg_config --includedir) it gave me: bold -bash: pg_config: command not found -bash: pg_config: command not found checking for python... /Library/Frameworks/Python.framework/Versions/Current/bin/python checking python version... 2.4 checking python installation prefix... /Library/Frameworks/Python.framework/Versions/2.4 checking python installation exec_prefix... /Library/Frameworks/Python.framework/Versions/2.4 checking definitions in Python library makefile... done checking location of python library... $(prefix)/lib/python2.4/site-packages checking location of python shared modules... $(exec_prefix)/lib/python2.4/site-packages checking for gcc... gcc checking for C compiler default output file name... configure: error: C compiler cannot create executables See `config.log' for more details. Any 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: psycopg installation error: C compiler cannot create executables
On 1/3/07, Abe <[EMAIL PROTECTED]> wrote: Hey all. Im trying to get django up and running on my Mac (powerbook, powerpc chip, 10.4 OSX). I got postgresql v 8.2.0 up and going, along with Python 2.4. I go to install psycopg to get the two communicating with one another, and, following the directions on the SetupOnTiger (http://code.djangoproject.com/wiki/SetupOnTiger) part of the Django page, got to configuring psycopg. When I typed ./configure --with-postgres-libraries=$(pg_config --libdir) --with-postgres-includes=$(pg_config --includedir) it gave me: bold -bash: pg_config: command not found -bash: pg_config: command not found checking for python... /Library/Frameworks/Python.framework/Versions/Current/bin/python checking python version... 2.4 checking python installation prefix... /Library/Frameworks/Python.framework/Versions/2.4 checking python installation exec_prefix... /Library/Frameworks/Python.framework/Versions/2.4 checking definitions in Python library makefile... done checking location of python library... $(prefix)/lib/python2.4/site-packages checking location of python shared modules... $(exec_prefix)/lib/python2.4/site-packages checking for gcc... gcc checking for C compiler default output file name... configure: error: C compiler cannot create executables See `config.log' for more details. Any ideas? Maybe you look into `config.log' for more details? ;) you may be better of looking for this issue on google or psycopg website, but my guess would be you have an incorrectly setup system... > -- Honza Kr l E-Mail: [EMAIL PROTECTED] ICQ#: 107471613 Phone: +420 606 678585 --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: psycopg installation error: C compiler cannot create executables
Sorry, ignore the "bold --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
psycopg installation error: C compiler cannot create executables
Hey all. Im trying to get django up and running on my Mac (powerbook, powerpc chip, 10.4 OSX). I got postgresql v 8.2.0 up and going, along with Python 2.4. I go to install psycopg to get the two communicating with one another, and, following the directions on the SetupOnTiger (http://code.djangoproject.com/wiki/SetupOnTiger) part of the Django page, got to configuring psycopg. When I typed ./configure --with-postgres-libraries=$(pg_config --libdir) --with-postgres-includes=$(pg_config --includedir) it gave me: bold -bash: pg_config: command not found -bash: pg_config: command not found checking for python... /Library/Frameworks/Python.framework/Versions/Current/bin/python checking python version... 2.4 checking python installation prefix... /Library/Frameworks/Python.framework/Versions/2.4 checking python installation exec_prefix... /Library/Frameworks/Python.framework/Versions/2.4 checking definitions in Python library makefile... done checking location of python library... $(prefix)/lib/python2.4/site-packages checking location of python shared modules... $(exec_prefix)/lib/python2.4/site-packages checking for gcc... gcc checking for C compiler default output file name... configure: error: C compiler cannot create executables See `config.log' for more details. Any 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
flatpages with content entirely in template
The djangoproject.com site itself seems to use flatpages with the content entirely in the template. For example, http://code.djangoproject.com/browser/djangoproject.com/ django_website/templates/flatfiles/homepage.html doesn't reference flatpage.title or flatpage.content at all. Assuming this is a reasonable practice to follow when it's preferable to store my flat pages on the file system rather than in the DB, it seems cumbersome that: 1) I still have to create a flatpage in the database and specify the template 2) The admin for flatpages requires a title and content to be non- blank even though they are meaningless in the pure-template usage of flat pages. Am I missing something? Or are people using template-only flatpages just going ahead and making flatpage database records with dummy title/content just to specify the template to use? (and is this indeed what djangoproject.com itself is doing?) James -- James Tauber http://jtauber.com/ journeyman of some http://jtauber.com/blog/ --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: CRUD design question
Create a form where if it's new, it's blank and has a "create" button that makes the thing. If you are viewing, fill in the form with the existing info with an "update" button. You can also add a "delete" button to the view/update version if you want. This is just a couple of conditionals really... --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: What user does django server runs?
Hi guys! I'm not very familiar with pg_hba.conf file but with your help I will :D Thanks for help! -- Michel Thadeu Sabchuk Curitiba/PR --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Problem with django installation
Antti - can you give us some more information to help you? It looks like you're running a development server. Is that correct? Did you just start it with "django-admin.py runserver" or something else? It looks like it was trying to throw an exception when it dumped out unhappily. The exception that happened is what's causing the failure - the particular code that dumped out unhappily was attempting to parse the http request, which came through as invalid. It didn't even finish setting itself up to populate self.path, which caused the failure you see above. -joe On 1/2/07, dune <[EMAIL PROTECTED]> wrote: Hey! Need help desperately. There's problem with django installation and when I try to start our web-sevice powered by django i et the following announcement: Exception happened during processing of request from ('127.0.0.1', 36779) Traceback (most recent call last): File "/opt/lib/python2.4/SocketServer.py", line 222, in handle_request self.process_request(request, client_address) File "/opt/lib/python2.4/SocketServer.py", line 241, in process_request self.finish_request(request, client_address) File "/opt/lib/python2.4/SocketServer.py", line 254, in finish_request self.RequestHandlerClass(request, client_address, self) File "/opt/lib/python2.4/site-packages/django/core/servers/basehttp.py", line 537, in __init__ BaseHTTPRequestHandler.__init__(self, *args, **kwargs) File "/opt/lib/python2.4/SocketServer.py", line 521, in __init__ self.handle() File "/opt/lib/python2.4/site-packages/django/core/servers/basehttp.py", line 578, in handle if not self.parse_request(): # An error code has been sent, just exit File "/opt/lib/python2.4/BaseHTTPServer.py", line 276, in parse_request self.send_error(400, "Bad request syntax (%r)" % requestline) File "/opt/lib/python2.4/BaseHTTPServer.py", line 340, in send_error self.log_error("code %d, message %s", code, message) File "/opt/lib/python2.4/BaseHTTPServer.py", line 411, in log_error self.log_message(*args) File "/opt/lib/python2.4/site-packages/django/core/servers/basehttp.py", line 586, in log_message if self.path.startswith(self.admin_media_prefix) or self.path == '/favicon.ico': AttributeError: WSGIRequestHandler instance has no attribute 'path' Any help would be greatly appreciated! BR -antti > --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Newforms and composite widgets
On 1/3/07, gordyt <[EMAIL PROTECTED]> wrote: date_opened = forms.DateField( initial=date.today(),widget=SelectDateWidget) This does render the composite widget just fine, but it will not use a date_opened value that is supplied with the form class is instantiated and so displays the error saying that a required field is missing. When you pass the data to the Form constructor, you'll have to pass three separate values -- 'date_opened_month', 'date_opened_day' and 'date_opened_year' -- rather than one value 'date_opened'. This is necessary because the SelectDateWidget requires three values instead of one. Make sense? 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?hl=en -~--~~~~--~~--~--~---
make free calls across the globe
Download the software and Call any phone anywhere across the globe Free! - http://surl.in/HLGB7238206SVRAKSX --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
CRUD design question
Still a newbie so bear with me.. I'm starting to get into forms, which are pretty easy with manipulators. I'm wondering though, would it be possible to use ONE form for add, view and update? If so, what would I need to do, meaning, obviously two of them have a post, the others dont. Is this a good design? If not, why not? Just trying to get some expert feedback Thanks John --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Newforms and composite widgets
Adrian I have been experimenting with the SelectDateWidget and I have noticed one bit of strange behavior. Wondering if I'm using it incorrectly. My original element in the form class is this: date_opened = forms.DateField(initial=date.today()) This works as expected and if the data supplied when the form is initialized provides a date value for date_opened, it uses the supplied value. If it does not, it uses today's date. Note that it is a required field. Now, if I use this instead: date_opened = forms.DateField( initial=date.today(),widget=SelectDateWidget) This does render the composite widget just fine, but it will not use a date_opened value that is supplied with the form class is instantiated and so displays the error saying that a required field is missing. Any thoughts? Thanks! --gordon --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Django users at WebDD? (Reading, UK, Feb 3rd)
Hi all, http://www.webdd.org.uk/ Are any Django users going to be attending WebDD? It's on February the 3rd, at the Microsoft Campus in Reading (here: http://tinyurl.com/wgaz8). It's a free one-day event. From their website: "The mantra behind the conference is that currently there is no focus on standards, best practice and general patterns based approaches to web development and design being pushed particularly strongly in the UK. Additionally it's rare that the people on the ground are looking ahead at what is coming up and where the web will be in the coming years. We want to change that and give the British web development and design communities a real fighting chance going forward and we feel a regular conference which is free to attend is a good way of getting the messages out to the wider community. We're expecting an attendance of around 350 people with a 50/50 split of web developers and web designers. Topics being spoken on range from CSS, AJAX and User Experience through to Ruby On Rails and other server side technologies." It would be great to meet up with fellow Django developers in that kind of atmosphere :-) I am also able to offer lifts to anyone in Manchester/Warrington/Chester/Liverpool area. --Jon --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Newforms clean_data
On 12/30/06, Waylan Limberg <[EMAIL PROTECTED]> wrote: On 12/29/06, Vadim Macagon <[EMAIL PROTECTED]> wrote: > > Adrian Holovaty wrote: > > > > Would it help if the form automatically called its validation the > > first time you accessed form.clean_data? I'm trying to decide whether > > that would be convenient or too magic. > > > > I kind of like the way it is now, if form.clean_data did the validation > on first access how would you tell if the validation was successful? > You'd have to call form.is_valid() anyway, so it seems logical to me not > to try to access form.clean_data before checking if validation > succeeded. If it's not valid you probably have to redisplay the form > anyway, so no point doing extra work processing clean_data that will get > discarded. > My thought exactly. I couldn't have said it better myself. Although, I will admit that my confusion came from thinking that accessing form.clean_data would call the validation. However, that could be attributed to the current lack of documentation (a problem that will no doubt be addressed soon) than anything else. And once I got the logic worked out in my view, the current implementation certainly made more sense and was less magic. I do agree that the magic would be bad - but the current state IS confusing, would it be possible to simply a) hide clean_data until validation has been done b) throw some exception when accessing uninitialized clean_data this would have saved me quite some time even though I knew this... its just very easy to overlook -- Waylan Limberg [EMAIL PROTECTED] > -- Honza Kr l E-Mail: [EMAIL PROTECTED] ICQ#: 107471613 Phone: +420 606 678585 --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: [Django-users] how about a subject prefix???
On 03/01/07, Honza Král <[EMAIL PROTECTED]> wrote: if you are using gmail, you can set up a filter to put all django related stuff to a specific label, even skip the inbox so that it wouldn't interfere with your normal mail... just search for django-developers@googlegroups.com in To: field... that should do the trick... (if you are using some other client, I am pretty sure it has similar functionality) For gmail users: try the tips on these pages for generating 'unlimited' gmail addresses: http://www.lifehacker.com/software/gmail/generate-unlimited-email-addresses-with-gmail-199280.php http://www.lifehacker.com/software/top/instant-disposable-gmail-addresses-144397.php Regards, Felix --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: [Django-users] how about a subject prefix???
if you are using gmail, you can set up a filter to put all django related stuff to a specific label, even skip the inbox so that it wouldn't interfere with your normal mail... just search for django-developers@googlegroups.com in To: field... that should do the trick... (if you are using some other client, I am pretty sure it has similar functionality) On 1/3/07, LD 'Gus' Landis <[EMAIL PROTECTED]> wrote: Dear Django-users List Mangler, Would it be possible to have something like the above subject prefix put on the Django lists? Please? Would help visually enhance Django stuff from other noise. TIA for your consideration. Cheers, --ldl -- --- LD Landis - N0YRQ - de la tierra del encanto 3960 Schooner Loop, Las Cruces, NM 88012 651/340-4007 N32 21'48.28" W106 46'5.80" "If a thing is worth doing, it is worth doing badly." GK Chesterton. An interpretation: For things worth doing: Doing them, even if badly, is better than doing nothing perfectly (on them). > -- Honza Kr l E-Mail: [EMAIL PROTECTED] ICQ#: 107471613 Phone: +420 606 678585 --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---