Re: formset issue

2008-09-01 Thread patrickk
found a solution: with using threadlocals, it´s possible to define a custom manager which only returns the data assigned to the currently logged-in user. since threadlocals has been considered a "hack" recently by one of the main django-developers (I think it was malcolm), this is probably not the

threadlocals: hack or best practice?

2008-09-01 Thread patrickk
http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser using threadlocals has been considered a "hack" recently by one of the main django-developers (james bennett, see http://groups.google.com/group/django-users/browse_frm/thread/f5b2b7775d7c7422/). on the other hand, writing a custom ma

Re: use crypt algo for user passwords

2008-09-01 Thread SammyRulez
I agree, and my basic idea was to enable the use of a stronger algo than sha1, which is breakable too. Hashlib supports sha256 and sha 512. As I said in the ticket comment adding the app secret key could mitigete the danger of a brute force attack on the sql dump of the database. On 29 Ago, 20:29

Re: How to pass queryset to the next request (e.g., search term refinement)?

2008-09-01 Thread Egon Esser
> You actually wouldn't need to set up the table. The way the sessions > framework works is that it returns info already set up in the > django_session. All you have to do is call some code that looks > something like this to save the session info: > > ifrequest.session['querysets']: >request.

Re: threadlocals: hack or best practice?

2008-09-01 Thread krylatij
I'm still using threadlocals. It's more convenient for 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

Re: How to pass queryset to the next request (e.g., search term refinement)?

2008-09-01 Thread Egon Esser
> Now a user submits two different searches, one in each of two browser > tabs. > After that, queryset contains two dicts/pairs. > > Then the user refines the query in one of the tabs. Obviously, I want > to know which one. But I only have at most a chronology of previously > submitted searches. I

Re: photologue installation

2008-09-01 Thread Briohny
Thanks again. I'll file an issue within the pressroom tracker. On Aug 29, 5:11 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Fri, Aug 29, 2008 at 11:24 AM, Briohny <[EMAIL PROTECTED]>wrote: > > > > > Hi again Karen, > > > Just wondering about Pressroom too.  I couldn't see a new version > >

Re: How to pass queryset to the next request (e.g., search term refinement)?

2008-09-01 Thread Egon Esser
> Now a user submits two different searches, one in each of two browser > tabs. > After that, queryset contains two dicts/pairs. > > Then the user refines the query in one of the tabs. Obviously, I want > to know which one. But I only have at most a chronology of previously > submitted searches. I

Re: Weird ImproperlyConfigured error

2008-09-01 Thread Julien Phalip
> I've spent a couple hours trying to debug this, in vain... I figured out my problem, so I just thought I'd post it here. It was in fact due to some stale .pyc files and folders, not in my apps but in Django itself. I had just done an 'svn update' on it, and apparently some old stuff kept hangi

FileUploadHandler Temp-file delete problem

2008-09-01 Thread mwebs
When I use the TemporaryFileUploadHandler I get the following exception: [Errno 13] Permission denied The problem is that the temporary-upload files dkhskjds.upload cannot be deleted When taking a look on the stack-trace I discovered this: 82. try: 83. os.remove(old_file_name) ...

FileUploadHandler Temp-file delete problem

2008-09-01 Thread mwebs
When I use the TemporaryFileUploadHandler I get the following exception: [Errno 13] Permission denied The problem is that the temporary-upload files dkhskjds.upload cannot be deleted When taking a look on the stack-trace I discovered this: 82. try: 83. os.remove(old_file_name) ...

how to use queryset to get some attribute but not all of the modle

2008-09-01 Thread babatu
how to use queryset to get some attribute but not all of the modle. for example: queryset = Entry.objects.all() i just want to sql like this" select id from Entry " but not "select * from Entry", and another Question, i want to count(id) instead of count(*), the formar is faster. --~--~--

Re: "Cannot convert Decimal to Decimal" Probably not a Django issue but hoped someone knows

2008-09-01 Thread Devil Landlord
You're using PsycoPG with multiple interpreters. I had the same problem: http://groups.google.com/group/django-users/browse_thread/thread/91aa6c088f6c090/929f2fd69307cd22 There is a reference to the psycopg2 ticket with patch attached to it, unfortunately the psycopg site appears to be down due t

Verbose model name in Admin interface

2008-09-01 Thread Nick Day
Hi, I have a model called "en". In the admin interface this appears as "En" on the site administration page and in the breadcrumb trail. Is it possible to set a verbose name of "en" to be, for example, "English Site" in models.py? Otherwise, is there any easy way to do this without directly mo

Re: Verbose model name in Admin interface

2008-09-01 Thread James Bennett
On Mon, Sep 1, 2008 at 4:56 AM, Nick Day <[EMAIL PROTECTED]> wrote: > I have a model called "en". In the admin interface this appears as > "En" on the site administration page and in the breadcrumb trail. http://docs.djangoproject.com/en/dev/ref/models/options/#verbose-name -- "Bureaucrat Con

Re: neue Dateien für den Q-Spooler

2008-09-01 Thread Adi J. Sieker
Damn, wrong email address. Sorry about that. adi --~--~-~--~~~---~--~~ 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 grou

Re: simple multiplication in models

2008-09-01 Thread akaihola
Fabio, The only reasons I can think of for this kind of denormalization of the database are performance (as you mentioned, unsignificant benefit here) or using the resulting value in a filter condition. The latter can be better worked around by mixing raw SQL with Django's ORM expressions (with

Don't mix *args and **kwargs in call to reverse()!

2008-09-01 Thread Adrián Ribao
Change in rev:8760 introduced this exception: "Don't mix *args and **kwargs in call to reverse()!" -- django/trunk/django/core/urlresolvers.py -- ... def reverse(self, lookup_view, *args, **kwargs): if args and kwargs: raise ValueError("Don't mix *args and **kwargs in call to reverse(

Re: Verbose model name in Admin interface

2008-09-01 Thread Nick Day
Oops I totally missed that - thanks! Nick On Sep 1, 10:58 am, "James Bennett" <[EMAIL PROTECTED]> wrote: > On Mon, Sep 1, 2008 at 4:56 AM, Nick Day <[EMAIL PROTECTED]> wrote: > > I have a model called "en".  In the admin interface this appears as > > "En" on the site administration page and in t

Re: Verbose model name in Admin interface

2008-09-01 Thread Nick Day
No, sorry, my mistake - I hadn't had enough coffee when I posted this... I actually wanted to change the app name in the admin interface. My app is called "en" and I would like this to appear as "English Site" within the admin interface. Is there any way to do this without modifying the admin t

Re: formset issue

2008-09-01 Thread koenb
I have not tried this, but can't you just in your view instantiate the formset and then loop over the forms and set the queryset on your field ? Koen On 1 sep, 09:24, patrickk <[EMAIL PROTECTED]> wrote: > found a solution: with using threadlocals, it´s possible to define a > custom manager which

average posts per month?

2008-09-01 Thread Will Rocisky
How do I find average number of posts per month? --~--~-~--~~~---~--~~ 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,

how to use "if element in List" from a template?

2008-09-01 Thread joune
Hi all, I'm totally new to Django and i'm starting to play with templates... I have a list to display and a separate list of elements considered special; so i'd like to display the first list with a different style if the element is contained in the "specials list" for instance: list = [ 'john',

Re: Setting different attributes in a SplitDateTimeWidget

2008-09-01 Thread diadya_vova
Hello Torsten, I just looked for a way to assign different classes for this widget. Thank you for this code sample. On 21 июл, 14:28, Torsten Bronger <[EMAIL PROTECTED]> wrote: > Hallöchen! > > I wanted to have those neat Javascript functions with my > DateTimeField that Django's admin facility o

Re: formset issue

2008-09-01 Thread patrickk
that seems to be possible. on the other hand, it also seems to be a strange way to go: instantiating the formset (retrieving all data/ querysets) and then changing the querysets? performance-wise, this is probably not a good solution. and I doubt that this is a good decision design-wise ... thank

Re: how to use "if element in List" from a template?

2008-09-01 Thread Daniel Roseman
On Sep 1, 1:05 pm, joune <[EMAIL PROTECTED]> wrote: > Hi all, > I'm totally new to Django and i'm starting to play with templates... > I have a list to display and a separate list of elements considered > special; > so i'd like to display the first list with a different style if the > element is c

Using subclass of RequestContext in generic views?

2008-09-01 Thread Tim Chase
I've been trying to figure out how to use a custom subclased RequestContext[1] object in my generic views. Looking at the code of django/views/generic/*.py it looks like this class is hard-coded in each of the views. Ideally, I'd be able to set something in the settings.py to specify my defa

EnvironmentError: Could not import settings

2008-09-01 Thread Weber Sites
Hi I'm trying to get the the tutorial02 (mysite) to work with apache. No matter what I do I keep getting this error : EnvironmentError: Could not import settings 'mysite.settings' (Is it on sys.path? Does it have syntax errors?): No module named mysite.settings SetHandler python-program

Re: how to use queryset to get some attribute but not all of the modle

2008-09-01 Thread Daniel Roseman
On Sep 1, 10:21 am, babatu <[EMAIL PROTECTED]> wrote: > how to use queryset to get some attribute but not all of the modle. > > for example: > > queryset = Entry.objects.all() > > i just want to sql like this" select id from Entry " > > but not "select * from Entry", See the documentation: http:/

Re: EnvironmentError: Could not import settings

2008-09-01 Thread Daniel Roseman
On Sep 1, 1:52 pm, "Weber Sites" <[EMAIL PROTECTED]> wrote: > Hi > > I'm trying to get the the tutorial02 (mysite) to work with apache. > No matter what I do I keep getting this error : > > EnvironmentError: Could not import settings 'mysite.settings' (Is it on > sys.path? Does it have syntax erro

Re: average posts per month?

2008-09-01 Thread Artis Caune
On Mon, Sep 1, 2008 at 2:54 PM, Will Rocisky <[EMAIL PROTECTED]> wrote: > > How do I find average number of posts per month? For more options, visit this group at http://groups.google.com/group/django-users?hl=en :) -- regards, Artis Caune <. CCNA <| <' didii

Re: average posts per month?

2008-09-01 Thread Will Rocisky
yeah, I am visiting that group :) On Sep 1, 6:55 pm, "Artis Caune" <[EMAIL PROTECTED]> wrote: > On Mon, Sep 1, 2008 at 2:54 PM, Will Rocisky <[EMAIL PROTECTED]> wrote: > > > How do I find average number of posts per month? > > For more options, visit this group > athttp://groups.google.com/group

Custom Comment Form - post_comment()

2008-09-01 Thread oversize
Hello, i just had the following problem and am not sure whether this is the way its wants to be: I used {% get_comment_form for foo as form %} to build my own custom form. The Form is very simple because only logged in user can access the page where one would be able to comment. Which is why i

Rendering template tags from strings?

2008-09-01 Thread Leaf
I'm writing a "Pages" app, and I'm wondering - would it be possible to load template tags out of strings? For example, the user wants a list of all pages in a specific category for one of their sideboxes, so they type {% category-list pie %} (which would be a custom tag I'd write) Would there be

Re: Django new comments framework error

2008-09-01 Thread SammyRulez
zapped django from site-packeges, updated to 8797 but still have this error. Running the django/test over a fresh checkout got a lot of fails on comments contrib app. es ERROR: testRenderCommentFormFromLiteral (regressiontests.comment_tests.tests.templatetag_tests.CommentTemplateTagTests) -

python list to string conversion

2008-09-01 Thread Bobby Roberts
Hi all. I have a simple list such as: ['1','2','3','4'] I need to convert this to a string such as: 1,2,3,4 so that I can use that in a sql function. any help is appreciated... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the G

Re: python list to string conversion

2008-09-01 Thread Valts Mazurs
yourList = ['1','2','3','4'] stringForQuery = ','.join(yourList) Regards, Valts. On Mon, Sep 1, 2008 at 4:30 PM, Bobby Roberts <[EMAIL PROTECTED]> wrote: > > Hi all. > > > I have a simple list such as: > ['1','2','3','4'] > > I need to convert this to a string such as: > 1,2,3,4 > > so that I ca

Re: formset issue

2008-09-01 Thread koenb
Are you sure the data will be retrieved twice ? I thought those queryset definitions were lazy, so they are only executed when the widgets are rendered. Hmm, I'll try that out some time to check. Koen On 1 sep, 14:18, patrickk <[EMAIL PROTECTED]> wrote: > that seems to be possible. on the other

Re: python list to string conversion

2008-09-01 Thread Bobby Roberts
On Sep 1, 9:34 am, "Valts Mazurs" <[EMAIL PROTECTED]> wrote: > yourList = ['1','2','3','4'] > stringForQuery = ','.join(yourList) > > Regards, > Valts. Thanks for the quick reply. here's what I have: selchecks=ctx.request.field_value("selItems") myselchecks=','.join(selchecks) assert False, m

Re: python list to string conversion

2008-09-01 Thread Valts Mazurs
Hello, "selItems" is not the same as "selitems". Probably you have mixed the name of the field that you are looking for in the forst row. Valts. On Mon, Sep 1, 2008 at 4:44 PM, Bobby Roberts <[EMAIL PROTECTED]> wrote: > > > On Sep 1, 9:34 am, "Valts Mazurs" <[EMAIL PROTECTED]> wrote: > > yourLi

Different __unicode__ return values for admin site?

2008-09-01 Thread Nick Day
Hi, I have a model with a __unicode__ method as follows: def __unicode__(self): return self.short_name However, if this is being called from within the admin site, I would like it to return something different e.g: def __unicode__(self): return self.full_name This is so I can allow fo

Re: python list to string conversion

2008-09-01 Thread Bobby Roberts
On Sep 1, 9:47 am, "Valts Mazurs" <[EMAIL PROTECTED]> wrote: > Hello, > > "selItems" is not the same as "selitems". Probably you have mixed the name > of the field that you are looking for in the forst row. the variable name is selltems (with a capital i) --~--~-~--~~~

Re: limiting choices in admin.ModelAdmin based on request.user

2008-09-01 Thread Nick Day
Would somebody be able to provide a simple example of using get_form() within the ModelAdmin to retrieve the currently logged-in user? Thanks in advance, Nick On Aug 26, 10:16 am, patrickk <[EMAIL PROTECTED]> wrote: > can someone provide an example for this? > > moreover, how is it possible to

Re: Different __unicode__ return values for admin site?

2008-09-01 Thread Valts Mazurs
Hello, I guess that you want to have more details in admin list view. You can use list_display configuration attribute in admin class for your model. << models.py >> class MyModel(models.Model): short_name = models.CharField(max_length = 20) full_name = models.CharField(max_length = 100) de

Re: python list to string conversion

2008-09-01 Thread Valts Mazurs
Hello, So, which exact line raises the error? Valts. On Mon, Sep 1, 2008 at 4:52 PM, Bobby Roberts <[EMAIL PROTECTED]> wrote: > > On Sep 1, 9:47 am, "Valts Mazurs" <[EMAIL PROTECTED]> wrote: > > Hello, > > > > "selItems" is not the same as "selitems". Probably you have mixed the > name > > of t

Re: python list to string conversion

2008-09-01 Thread Bobby Roberts
On Sep 1, 9:57 am, "Valts Mazurs" <[EMAIL PROTECTED]> wrote: > Hello, > > So, which exact line raises the error? > > Valts. very very strange seems to be working beautifully now. Thanks for your help! --~--~-~--~~~---~--~~ You received this message because yo

RE: EnvironmentError: Could not import settings

2008-09-01 Thread Weber Sites
Thanks, looks like we are making progress :) Now I get Page not found (404) Request Method: GET Request URL: http://django.weberdev.com:82/mysite/ Using the URLconf defined in mysite.urls, Django tried these URL patterns, in this order: ^admin/ The current URL, /mysite/, didn't match any o

Re: Using subclass of RequestContext in generic views?

2008-09-01 Thread Benjamin Buch
Hi Tim, > I've been trying to figure out how to use a custom subclased > RequestContext[1] object in my generic views. Looking at the > code of django/views/generic/*.py it looks like this class is > hard-coded in each of the views. > > > Ideally, I'd be able to set something in the settings.py

Re: limiting choices in admin.ModelAdmin based on request.user

2008-09-01 Thread Daniel Roseman
On Sep 1, 2:53 pm, Nick Day <[EMAIL PROTECTED]> wrote: > Would somebody be able to provide a simple example of using get_form() > within the ModelAdmin to retrieve the currently logged-in user? > > Thanks in advance, > Nick > Not difficult: class MyAdmin(admin.ModelAdmin): def get_form(self,

Re: define "_default_manager" and the admin-interface

2008-09-01 Thread Matthias Kestenholz
On Fri, Aug 29, 2008 at 7:59 AM, Brot <[EMAIL PROTECTED]> wrote: > > Hello, > > At the moment I am reading the "Practical Django Projects" - Book > written by James Bennett. > On page 120 there is a admonition about using Default Managers. Above > this paragraph there is the explanation about the

Re: define "_default_manager" and the admin-interface

2008-09-01 Thread Brot
is there anybody out there who could answer this question? On 29 Aug., 07:59, Brot <[EMAIL PROTECTED]> wrote: > Hello, > > At the moment I am reading the "Practical Django Projects" - Book > written by James Bennett. > On page 120 there is a admonition about using Default Managers. Above > this p

Re: S3 tutorial for File Storage Refactor?

2008-09-01 Thread Ramdas S
David, I think this is still not fixed. I am getting the same errors R On Aug 25, 2:02 pm, David Larlet <[EMAIL PROTECTED]> wrote: > Le 20 août 08 à 17:56, shadfc a écrit : > > > > > > > With the code from the django-storages you referenced installed > > somewhere on PYTHONPATH, its as easy as

Re: Don't mix *args and **kwargs in call to reverse()!

2008-09-01 Thread Adrián Ribao
I'll write an example of the problem. All my urls are prepared following the best SEO rules, so in many places I have urls like: (r'^(.*)-f(?P\d+)\.html$','view_photo') this would make the url: my-photo-f2.html I get the url using: reverse('app.views.view_photo', args=[slugify(photo.title),], kw

Re: Different __unicode__ return values for admin site?

2008-09-01 Thread Nick Day
Thanks for your help - I used list_display and it works fine. Cheers, Nick On Sep 1, 2:55 pm, "Valts Mazurs" <[EMAIL PROTECTED]> wrote: > Hello, > > I guess that you want to have more details in admin list view. > You can use list_display configuration attribute in admin class for your > model.

Re: EnvironmentError: Could not import settings

2008-09-01 Thread Daniel Roseman
On Sep 1, 3:10 pm, "Weber Sites" <[EMAIL PROTECTED]> wrote: > Thanks, looks like we are making progress :) > > Now I get > > Page not found (404) > Request Method: GET > Request URL:http://django.weberdev.com:82/mysite/ > > Using the URLconf defined in mysite.urls, Django tried these URL patterns,

Re: limiting choices in admin.ModelAdmin based on request.user

2008-09-01 Thread Nick Day
Thanks! :) Nick On Sep 1, 3:18 pm, Daniel Roseman <[EMAIL PROTECTED]> wrote: > On Sep 1, 2:53 pm, Nick Day <[EMAIL PROTECTED]> wrote: > > > Would somebody be able to provide a simple example of using get_form() > > within the ModelAdmin to retrieve the currently logged-in user? > > > Thanks in a

Re: Using subclass of RequestContext in generic views?

2008-09-01 Thread Tim Chase
>> I've been trying to figure out how to use a custom subclased >> RequestContext[1] object in my generic views. Looking at the >> code of django/views/generic/*.py it looks like this class is >> hard-coded in each of the views. >> >> Ideally, I'd be able to set something in the settings.py to >>

Using model instances as dictionary keys

2008-09-01 Thread Rodrigo Culagovski
I have a weird dictionary key issue: I have an 'Article' model, with textfields for Year and Country and foreignkeys for Magazine and Author. I generate a frequency list for each criteria (e.g.: Year=2005) which I use to keep the count. To do this, I subclassed dictionary like so: class dictinc(d

How to add a info on the many side of a foreingkey with admin

2008-09-01 Thread Luis Miguel Morillas
I'm working with admin and a model as the following: class Publisher(models.Model): name = models.CharField(maxlength=30) [snip] class Book(models.Model): title = models.CharField(maxlength=100) publisher = models.ForeignKey(Publisher, blank=True) [snip] I can add a Publishe

Unicode decode errors with Admin and Postgres

2008-09-01 Thread Paolo Corti
hello Django users I am a beginner using Django from the trunk and Postgres 8.2 I have this issue with utf8, you can replicate it this way (it is something similiar to this with MySql i guess: http://groups.google.com/group/django-users/browse_frm/thread/d7dd21493ab5f1fa/a0bd99e381d9de2a?tvc=1&q=

Unicode decode errors with Admin and Postgres

2008-09-01 Thread Paolo Corti
Hi all I am a beginner using Django from the trunk and Postgres 8.2 I have this issue with utf8, you can replicate it this way (it is something similiar to this with MySql i guess: http://groups.google.com/group/django-users/browse_frm/thread/d7dd21493ab5f1fa/a0bd99e381d9de2a?tvc=1&q=encoding+ad

Schema Evolution Choices?

2008-09-01 Thread Jon Loyens
Hi guys, I have a small project coming up that I think having some sort of schema evolution facilities will be handy on. I was wondering what the current and best project choices for schema evolution are? I was leaning towards django-evolution until I saw a post from Russell saying that he hadn

RE: EnvironmentError: Could not import settings

2008-09-01 Thread Weber Sites
How do I know which ver? -Original Message- From: django-users@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Daniel Roseman Sent: יום ב 01 ספטמבר 2008 17:48 To: Django users Subject: Re: EnvironmentError: Could not import settings On Sep 1, 3:10 pm, "Weber Sites" <[EMAIL PROTE

Re: Unicode decode errors with Admin and Postgres

2008-09-01 Thread Malcolm Tredinnick
On Mon, 2008-09-01 at 08:37 -0700, Paolo Corti wrote: > Hi all > > I am a beginner using Django from the trunk and Postgres 8.2 > > I have this issue with utf8, you can replicate it this way (it is > something similiar to this with MySql i guess: > http://groups.google.com/group/django-users/br

Re: Template tag i18n failing

2008-09-01 Thread Luis Rodrigues
Thanks for the info. 2008/8/31 Ramiro Morales <[EMAIL PROTECTED]>: > > On Sun, Aug 31, 2008 at 2:09 PM, Ramiro Morales <[EMAIL PROTECTED]> wrote: >> >> This is a bug and has been reported as ticket |1] #7027, you can track >> the advance of the issue there. >> > > This is fixed as of revision 876

Re: threadlocals: hack or best practice?

2008-09-01 Thread Malcolm Tredinnick
On Mon, 2008-09-01 at 00:33 -0700, patrickk wrote: > http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser > > using threadlocals has been considered a "hack" recently by one of the > main django-developers (james bennett, see > http://groups.google.com/group/django-users/browse_frm/thr

Re: Verbose model name in Admin interface

2008-09-01 Thread Malcolm Tredinnick
On Mon, 2008-09-01 at 04:41 -0700, Nick Day wrote: > No, sorry, my mistake - I hadn't had enough coffee when I posted > this... > > I actually wanted to change the app name in the admin interface. My > app is called "en" and I would like this to appear as "English Site" > within the admin inter

Models list

2008-09-01 Thread fabio natali
Hi all of you! I need a table similar to what you get when entering the admin panel, that is a list of all my models inside a certain app. So, say my app is called virtual_shop, then I would need to get Buyer, Product, Transaction, ... Is there a way to accomplish this via generic views? Is the

Problem with 404 page

2008-09-01 Thread marsii
Hi! I have a problem with the 404 page. First I get: "You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 404 page. " and when I change DEBUG to False I get: Traceback (most recent call last): File "/us

Re: Django Image thumbnail and save

2008-09-01 Thread Luis Rodrigues
Thanks, allready got it to work. 2008/8/31 julianb <[EMAIL PROTECTED]>: > > On Aug 31, 6:45 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > wrote: >> Can someone please point me in the right direction > > I got problems after the refactoring, too: > > http://groups.google.com/group/django-users/br

ValueError at /pages/

2008-09-01 Thread Leaf
All the info is at http://dpaste.com/75250/. I really have no idea what this error is trying to tell me. Can anyone explain what it might be? Regards, Leaf --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django user

Re: Working but ugly model code. Need advice.

2008-09-01 Thread Guillaume Lederrey
If you just want to have a clean working solution, have a look at django-photologue (http://code.google.com/p/django-photologue/). It is amazing, and really easy to integrate well. Also have a look at sorl-thumbnail (http://code.google.com/p/sorl-thumbnail/). If you want to write your own code an

Re: ValueError at /pages/

2008-09-01 Thread Malcolm Tredinnick
On Mon, 2008-09-01 at 10:39 -0700, Leaf wrote: > All the info is at http://dpaste.com/75250/. I really have no idea > what this error is trying to tell me. Can anyone explain what it might > be? It's an internal Python error that is raised when you try to update a dictionary with bad data. What

Re: EnvironmentError: Could not import settings

2008-09-01 Thread Daniel Roseman
On Sep 1, 5:39 pm, "Weber Sites" <[EMAIL PROTECTED]> wrote: > How do I know which ver? What does it say when you start up the development server? Or in the shell, you can do >>> import django >>> django.get_version() u'1.0-alpha-SVN-8210' To be honest, I'm not sure you actually want the /mysite/

Re: Using model instances as dictionary keys

2008-09-01 Thread Malcolm Tredinnick
On Mon, 2008-09-01 at 08:35 -0700, Rodrigo Culagovski wrote: [...] > So, I guess the problem is using a model instance as a dictionary key. > What's weird is the development/production server discrepancy. > Development is running 0.97, production 0.96, which I guess might > account for the differ

Re: Modify settings.py file through admin?

2008-09-01 Thread Dana
Hey Malcolm, Thanks a ton, that explains my utter frustration! So, there would be no way to control settings such as TIME_ZONE or other Django specific settings then? How about setting non-Django settings? I have a few settings I'd like to control that are our custom settings like NUM_LISTINGS.

Re: "core" is not a field constructor argument anymore

2008-09-01 Thread Guillaume Lederrey
2008/8/30 James Bennett <[EMAIL PROTECTED]>: > > On Fri, Aug 29, 2008 at 5:58 PM, Guillaume Lederrey > <[EMAIL PROTECTED]> wrote: >> After updating to the latest trunk, I get a couple of errors when I >> have field that define "core=True". After digging into the code, I >> find changeset 8616 (htt

Using full SQL LIKE matching in database operations

2008-09-01 Thread Djn
I'm in the process of moving an existing app over to python and Django, and ran into one snag I haven't been able to find any comments on. Basically, I have objects that describe themselves as an SQL-style pattern (they represent small chunks of possible patterns from DNA, so things like "GTGCGG_

Send emails using sendmail or postfix

2008-09-01 Thread Mathieu Leplatre
Hi all, According to the documentation, email sending is done through smtp. Is there a way to use sendmail or postfix instead ? Thank you. Mathieu. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" gro

dumb question model-dictionary

2008-09-01 Thread Vance Dubberly
So I'm finding there are multiple places where I'm needing to iterate over the properties of a Model and I'm absolutely certain it's got to be insanely easy to get a dictionary from a model but for the life of me I can't figure it out, and I can't find any documentation on the matter. basically

Re: Send emails using sendmail or postfix

2008-09-01 Thread Malcolm Tredinnick
On Mon, 2008-09-01 at 11:39 -0700, Mathieu Leplatre wrote: > Hi all, > > According to the documentation, email sending is done through smtp. > Is there a way to use sendmail or postfix instead ? Yes, start up sendmail or postfix to listen on a port. :-) Presumably, you mean sending by calling

Re: average posts per month?

2008-09-01 Thread James Matthews
On the sides it should say the stats! On Mon, Sep 1, 2008 at 6:09 AM, Will Rocisky <[EMAIL PROTECTED]> wrote: > > yeah, I am visiting that group :) > > On Sep 1, 6:55 pm, "Artis Caune" <[EMAIL PROTECTED]> wrote: > > On Mon, Sep 1, 2008 at 2:54 PM, Will Rocisky <[EMAIL PROTECTED]> wrote: > > > > >

Re: dumb question model-dictionary

2008-09-01 Thread Jay Parlar
On Mon, Sep 1, 2008 at 2:48 PM, Vance Dubberly <[EMAIL PROTECTED]> wrote: > > So I'm finding there are multiple places where I'm needing to iterate > over the properties of a Model and I'm absolutely certain it's got to > be insanely easy to get a dictionary from a model but for the life of > me

Re: dumb question model-dictionary

2008-09-01 Thread Malcolm Tredinnick
On Mon, 2008-09-01 at 15:10 -0400, Jay Parlar wrote: > On Mon, Sep 1, 2008 at 2:48 PM, Vance Dubberly <[EMAIL PROTECTED]> wrote: > > > > So I'm finding there are multiple places where I'm needing to iterate > > over the properties of a Model and I'm absolutely certain it's got to > > be insanely

Re: Send emails using sendmail or postfix

2008-09-01 Thread Mathieu Leplatre
On Sep 1, 4:02 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Mon, 2008-09-01 at 11:39 -0700, Mathieu Leplatre wrote: > > Hi all, > > > According to the documentation, email sending is done through smtp. > > Is there a way to use sendmail or postfix instead ? > > Yes, start up sendmail or

Re: ValueError at /pages/

2008-09-01 Thread Leaf
Well, as it turns out, my URLConf looked something like: urlpatterns = patterns('devsite.djpages.views', (r'(?P\w+)/$', 'display_page', 'dj_pages_display'), (r'$', 'display_page', 'dj_pages_default'), ) The default value for the second one was processed by putting "pagename=GET_DEFAULT_F

Running doctests

2008-09-01 Thread Guillaume Lederrey
Hello ! I have an app that has a "utils.py" module. I have written quite a few doctests inline. Now my problem is to actually run those tests. Reading the documentation, I get the feeling that I should be able to call them from the tests.py file, but I cant find an example. I have seen a few proj

CSS error in change_password.html

2008-09-01 Thread davor
Hi, On the "change password" page (when you go to edit your users in Django administration) submit button is floated right and it's container () doesn't wrap around it because submit button hasn't got clear:both set. or something similar. I suggest using overflow:auto on .submit-row class so str

Re: Running doctests

2008-09-01 Thread Malcolm Tredinnick
On Mon, 2008-09-01 at 22:48 +0200, Guillaume Lederrey wrote: > Hello ! > > I have an app that has a "utils.py" module. I have written quite a few > doctests inline. Now my problem is to actually run those tests. > Reading the documentation, I get the feeling that I should be able to > call them

Re: Running doctests

2008-09-01 Thread Guillaume Lederrey
Thanks for your very fast answer ! But ... see inline 2008/9/1 Malcolm Tredinnick <[EMAIL PROTECTED]>: > > > On Mon, 2008-09-01 at 22:48 +0200, Guillaume Lederrey wrote: >> Hello ! >> >> I have an app that has a "utils.py" module. I have written quite a few >> doctests inline. Now my problem is t

utf8 works on my dev server but not on my production server

2008-09-01 Thread Max
Hi, I ve been trying to figure out why I can t handle utf-8 properly on my production server, while it works perfectly on my local django dev server When I try to run this line unicode_data.decode("utf-8") With data coming from DB " Rémi " I get on production only 'ascii' codec can't encode cha

Re: Problem with 404 page

2008-09-01 Thread Karen Tracey
On Mon, Sep 1, 2008 at 1:23 PM, marsii <[EMAIL PROTECTED]> wrote: > > Hi! > I have a problem with the 404 page. > > First I get: > "You're seeing this error because you have DEBUG = True in your Django > settings file. Change that to False, and Django will display a > standard 404 page. " > > and

Url template tag errors post-8760, invalid literal for int

2008-09-01 Thread Dave Lowe
I saw the note about revision 8760 introducing changes to reverse and the url template tag, specifically that passing extra parameters won't work. I haven't been able to find anywhere in my code where extra parameters are being passed. However, after I update to 8760, I start getting the following

Re: Url template tag errors post-8760, invalid literal for int

2008-09-01 Thread Malcolm Tredinnick
On Mon, 2008-09-01 at 15:16 -0700, Dave Lowe wrote: > I saw the note about revision 8760 introducing changes to reverse and > the url template tag, specifically that passing extra parameters won't > work. I haven't been able to find anywhere in my code where extra > parameters are being passed. H

Re: Schema Evolution Choices?

2008-09-01 Thread Russell Keith-Magee
On Tue, Sep 2, 2008 at 12:37 AM, Jon Loyens <[EMAIL PROTECTED]> wrote: > > Hi guys, > > I have a small project coming up that I think having some sort of > schema evolution facilities will be handy on. I was wondering what > the current and best project choices for schema evolution are? I was >

Re: Url template tag errors post-8760, invalid literal for int

2008-09-01 Thread Dave Lowe
I wish I could find that. I've already been looking for anything like that and keep coming up empty. None of the URL variables I'm using include '}'. If it helps, here's the original traceback. File "/Library/Python/2.5/site-packages/django/template/debug.py", line 71, in render_node result

Re: Url template tag errors post-8760, invalid literal for int

2008-09-01 Thread Malcolm Tredinnick
On Mon, 2008-09-01 at 15:55 -0700, Dave Lowe wrote: > I wish I could find that. I've already been looking for anything like > that and keep coming up empty. None of the URL variables I'm using > include '}'. Not the variables. The regular-expression patterns. In one of your urls.py files. Regar

Re: Url template tag errors post-8760, invalid literal for int

2008-09-01 Thread Malcolm Tredinnick
On Mon, 2008-09-01 at 15:59 -0700, Malcolm Tredinnick wrote: > > On Mon, 2008-09-01 at 15:55 -0700, Dave Lowe wrote: > > I wish I could find that. I've already been looking for anything like > > that and keep coming up empty. None of the URL variables I'm using > > include '}'. > > Not the vari

Re: Url template tag errors post-8760, invalid literal for int

2008-09-01 Thread Dave Lowe
I found a workaround, maybe a fix? In regex_helper's get_quantifier function, starting at line #244: while ch != '}': ... quant.append(ch) I tested this and it looks like quant gets appended every time, even when ch == '}'. So I added a simple: "if ch != '}'" before "quant.append(ch)",

Re: Url template tag errors post-8760, invalid literal for int

2008-09-01 Thread Dave Lowe
Thanks 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]

  1   2   >