Re: I install v1.5 Django, and run a my first site, then have an error: 'utf-8' codec can't decode byte 0xbc in position 0: invalid start byte. I use Sublime editor.

2012-11-25 Thread Julien Phalip
Hi, Can you please post the entire traceback? Thanks! Julien On Sunday, November 25, 2012 4:03:11 PM UTC+1, 名宏贾 wrote: > > I don't know why, editer have default utf-8 setting. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this dis

Validating a specific model field

2010-03-10 Thread Julien Phalip
Hi, It's the first time I'm playing with model validation, and I'm a bit stuck with something. I couldn't find any help on this mailinglist or in the doc, but if there is please let me know where :) Basically I'd like to validate a model field in the context of its instance. First I assumed it wo

Weird transaction problem with postgresql

2010-02-25 Thread Julien Phalip
Hi, After looking through this mailing list I've seen many threads discussing issues relating to transaction issues with postgresql, but none like the one I'm facing. If I've missed any relevant thread, please let me know. I've got a Profile model which is instantiated each time a new user is cre

Re: MySQL and 'NoneType object is unsubscriptable' error

2009-11-11 Thread Julien Phalip
On Nov 11, 10:07 am, Julien Phalip wrote: > On Nov 11, 9:37 am, Julien Phalip wrote: > > > > > On Nov 10, 9:12 pm, Daniel Roseman wrote: > > > > On Nov 10, 1:36 am, Julien Phalip wrote: > > > > > Hi, > > > > > I've

Re: MySQL and 'NoneType object is unsubscriptable' error

2009-11-10 Thread Julien Phalip
On Nov 11, 9:37 am, Julien Phalip wrote: > On Nov 10, 9:12 pm, Daniel Roseman wrote: > > > > > On Nov 10, 1:36 am, Julien Phalip wrote: > > > > Hi, > > > > I've tried to install MySQL for an existing project, and I'm getting a &

Re: MySQL and 'NoneType object is unsubscriptable' error

2009-11-10 Thread Julien Phalip
On Nov 10, 9:12 pm, Daniel Roseman wrote: > On Nov 10, 1:36 am, Julien Phalip wrote: > > > > > Hi, > > > I've tried to install MySQL for an existing project, and I'm getting a > > strange error (see traceback below). Apparently "self.converte

MySQL and 'NoneType object is unsubscriptable' error

2009-11-09 Thread Julien Phalip
Hi, I've tried to install MySQL for an existing project, and I'm getting a strange error (see traceback below). Apparently "self.converter" is None, but I can't see why. I can access the database just fine using the 'mysql' command in the terminal or using PhpMyAdmin. Do you know how this could

Re: Replicating Google Groups in Django

2009-10-24 Thread Julien Phalip
Thank you Clifford and all for your tips. There are apparently a few options to explore. I'll give them a shot and see how far I get. Cheers! Julien On Oct 25, 4:35 am, CLIFFORD ILKAY wrote: > Preston Holmes wrote: > > It doesn't seem like it would be that hard to combine django- > > extension

Replicating Google Groups in Django

2009-10-23 Thread Julien Phalip
Hi, On one site I'm considering the possibility of replicating the (basic) functionality of Google Groups in Django. The idea is: - There would be 5 different mailing lists. Users can subscribe to one or more lists. - People can purely use emails to access the lists. - All the emails can then al

Re: Strange error saving in admin

2009-07-25 Thread Julien Phalip
off and validate the URL (verify_exists=False) - perhaps the > timeout for checking the url is longer than the timeout on the proxy > response? > > On Jul 25, 9:12 am, Julien Phalip wrote: > > > Thanks a lot Jamie. Your stab in the dark is very useful indeed. > > >

Re: Strange error saving in admin

2009-07-25 Thread Julien Phalip
> I'd like to say I'd then use this exact situation as a test case, but > being new to testing myself I really can't offer any real assistance > in this one. > > Hope this stab is dark helps. > > Cheers, > > Jamie. > > On Jul 24, 1:08 pm, Julien Phal

Strange error saving in admin

2009-07-24 Thread Julien Phalip
Hi, I've got a really strange error on one of my sites. There is an Organisation model which has a dozen of fields and 1,300 rows. Saving organisation details in the admin usually works fine except for one organisation. When I click 'Save', the page loads for ever and then it fails with a 502 Pr

How to delete a setting

2009-06-07 Thread Julien Phalip
Hi, In a unit test, I'd like to test the behaviour of a middleware in the absence of a setting. To make sure the setting is not present, I try to delete it: def test_middleware(self): if hasattr(settings, 'BLAH'): delattr(settings, 'BLAH') response = self.client.get('

Re: Strange issue with session not being saved

2009-04-12 Thread Julien Phalip
On Apr 13, 9:43 am, Julien Phalip wrote: > Hi, > > I've implemented and ajax upload progress bar and I've got a strange > issue with sessions. I've reused the exact same code from another > project where it works perfectly, so I assume there is some kind of > c

Strange issue with session not being saved

2009-04-12 Thread Julien Phalip
Hi, I've implemented and ajax upload progress bar and I've got a strange issue with sessions. I've reused the exact same code from another project where it works perfectly, so I assume there is some kind of configuration problem. Any hint on how to debug this would be very welcome. Basically, th

Re: Strange behaviour with ImageField

2009-03-25 Thread Julien Phalip
On Mar 26, 4:42 pm, Michael Strickland wrote: > You should just be able to take out the MEDIA_ROOT portion of your > upload_to path. So instead of: >     upload_to='%s/images/' % settings.MEDIA_ROOT > You would have: >     upload_to='images/' > > That should make it store the relative address and

Strange behaviour with ImageField

2009-03-25 Thread Julien Phalip
Hi, Sorry if my question seems trivial, but I've looked around for an answer and I'm really at loss... I've got a simple model: class Photo(models.Model): image_file = models.ImageField(_('image file'), upload_to='%s/ images/' % settings.MEDIA_ROOT) But when I upload an image via the admin

Re: Auth (or session?) issue and www prefix

2009-03-25 Thread Julien Phalip
On Mar 26, 11:55 am, Graham Dumpleton wrote: > On Mar 26, 11:04 am, Julien Phalip wrote: > > > Hi there, > > > If I login on my site on example.com, and then visitwww.example.com > > it asks me to login again. I can't tell if it's an issue with > > co

Auth (or session?) issue and www prefix

2009-03-25 Thread Julien Phalip
Hi there, If I login on my site on example.com, and then visit www.example.com it asks me to login again. I can't tell if it's an issue with contrib.auth or contrib.session, or if that's a problem with my Apache configuration. My guess is that the session/cookies are not shared between www.exampl

Re: Possible bug in admin?

2009-03-04 Thread Julien Phalip
On Mar 5, 2:40 pm, Alex Gaynor wrote: > On Mar 4, 2009, at 10:33 PM, Julien Phalip wrote: > > > > > > > On Mar 5, 2:16 pm, Alex Gaynor wrote: > >> On 3/4/09, Julien Phalip wrote: > >>> Hi, > > >>> I can't find the exact cause of

Re: Possible bug in admin?

2009-03-04 Thread Julien Phalip
On Mar 5, 2:16 pm, Alex Gaynor wrote: > On 3/4/09, Julien Phalip wrote: > > Hi, > > > I can't find the exact cause of this, but it seems as though something > > has changed in the admin's email widget. > > > For one of my project I just upg

Possible bug in admin?

2009-03-04 Thread Julien Phalip
Hi, I can't find the exact cause of this, but it seems as though something has changed in the admin's email widget. For one of my project I just upgraded Django from revision 9294 to 9975. Symptomatically, with the recent version, the email field doesn't have the CSS class 'vTextField', which m

Re: Strange 404 error in admin

2009-02-09 Thread Julien Phalip
On Feb 10, 3:19 pm, Karen Tracey wrote: > On Mon, Feb 9, 2009 at 4:17 PM, Julien Phalip wrote: > > Hello again, > > > I finally fixed it with the following nasty hack: > > > class Entry(models.Model): > >        ... some fields ... > > >      

Re: Strange 404 error in admin

2009-02-09 Thread Julien Phalip
On Feb 10, 7:52 am, Julien Phalip wrote: > On Feb 10, 7:41 am, Alex Gaynor wrote: > > > I don't know what manager old forms admin used, but do you have a custom > > manager that blocks access to some objects. > > Thanks Alex for your reply. You've made a r

Re: Strange 404 error in admin

2009-02-09 Thread Julien Phalip
On Feb 10, 7:41 am, Alex Gaynor wrote: > I don't know what manager old forms admin used, but do you have a custom > manager that blocks access to some objects. Thanks Alex for your reply. You've made a really good point which helped me track this down. Here are the model and manager: class Publ

Re: Strange 404 error in admin

2009-02-09 Thread Julien Phalip
On Feb 9, 7:20 pm, Julien Phalip wrote: > Hi, > > This is a strange case. I have a simple blog entry model which can be > edited in the admin, from the URL that looks > like:http://www.example.com.au/admin/blog/entry/52/ > > Now, what is strange is that the link above ret

Strange 404 error in admin

2009-02-09 Thread Julien Phalip
Hi, This is a strange case. I have a simple blog entry model which can be edited in the admin, from the URL that looks like: http://www.example.com.au/admin/blog/entry/52/ Now, what is strange is that the link above returns a 404. Same with the entry id=51. Yet, entries with id=51,52 do exist.

Re: Displaying the names of executed tests

2009-02-02 Thread Julien Phalip
On Feb 3, 2:47 am, Alex Koshelev wrote: > Look at the `--verbosity` test command option Thanks Alex, I should have thought of that. Cheers, Julien --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" gro

Displaying the names of executed tests

2009-02-02 Thread Julien Phalip
Hi, I'd find quite useful to have the names of all the tests displayed after they have been executed. Instead of just having something like 'Ran 3 tests 0.672s', it'd be good to have something like 'Ran 3 tests 0.672s: test_useraccounts, test_trees, test_blah'. If that's possible to do, could yo

Re: Seeking design advice on Django implementation

2009-02-02 Thread Julien Phalip
On Feb 2, 7:40 pm, Malcolm Tredinnick wrote: > On Mon, 2009-02-02 at 00:17 -0800, Julien Phalip wrote: > > Hi, > > > I'm a bit stuck with the design of a system and so I was wondering if > > someone could give some advice. > > > The system works as follows.

Seeking design advice on Django implementation

2009-02-02 Thread Julien Phalip
Hi, I'm a bit stuck with the design of a system and so I was wondering if someone could give some advice. The system works as follows. Users can create documents, which are stored in a Django model. To ensure there's no conflict, a document can be modified only by one user at a time. The edition

Re: Testing uploads and content types

2009-01-23 Thread Julien Phalip
On Jan 24, 12:57 pm, Malcolm Tredinnick wrote: > On Fri, 2009-01-23 at 12:15 -0800, Julien Phalip wrote: > > On Jan 24, 2:45 am, varikin wrote: > > > The UploadedFile[1] object has a field called content_type. So if you > > > have this in a form: > > >

Re: Testing uploads and content types

2009-01-23 Thread Julien Phalip
On Jan 24, 2:45 am, varikin wrote: > The UploadedFile[1] object has a field called content_type. So if you > have this in a form: > > myfile = request.FILES['some_file'] > if myfile.content_type != 'application/zip': >      #raise error > > I don't know if this will help you in your test. I hope

Testing uploads and content types

2009-01-22 Thread Julien Phalip
Hi, I have a view which processes a multi-part form and whose behaviour varies depending on the content types of the uploaded files. I've written some tests for that view as follows: post_data = { 'name1': 'blah', 'file_field1': image_data, } respo

'extra' modifier and generic relations

2008-12-05 Thread Julien Phalip
Hi, I have an Event model which can have comments. Comments can be added to any kind of objects so the Comment model uses a generic relation via content types. When displaying a list of events I would like to display the number of comments for each event. To improve performance and limit the num

Strange timeout issue

2008-12-04 Thread Julien Phalip
Hi, I have a pretty big database of organisations, countries and news entries. It all works fine except when I edit one of the organisations in the admin. The edit page loads fine, but when I click 'Save' it takes for ever before eventually timing out. The error my clients get on their system (IE

Re: Preventing spam attacks on Ajax views

2008-11-29 Thread Julien Phalip
On Nov 29, 10:32 pm, Andrei Eftimie <[EMAIL PROTECTED]> wrote: > Probably best thing would be to have accounts... > > On Nov 29, 12:27 am, Julien Phalip <[EMAIL PROTECTED]> wrote: > > > Hi, > > > I'm building a rating app, so people can rate any kind of

Preventing spam attacks on Ajax views

2008-11-28 Thread Julien Phalip
Hi, I'm building a rating app, so people can rate any kind of object (e.g. a video, a news entry, etc.). The rating is done anonymously (there's no user account on that site) and via an Ajax query. The view currently only takes one parameter, the rating value (a float), so I don't think I can use

Re: Testing dynamic apps

2008-11-27 Thread Julien Phalip
On Nov 28, 1:21 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On Thu, Nov 27, 2008 at 11:21 AM, Julien Phalip <[EMAIL PROTECTED]> wrote: > > > I'm keen to try to find some proper ways to fix this, but before I go > > too deep into th

Re: Clearing test client's session

2008-11-27 Thread Julien Phalip
On Nov 27, 7:17 pm, Julien Phalip <[EMAIL PROTECTED]> wrote: > Hi, > > I'm writing some tests for a view that sets entries in the session. > Everything works fine, the entries are properly set and the session > seems to work ok (using the default DB SessionStore). &g

Clearing test client's session

2008-11-27 Thread Julien Phalip
Hi, I'm writing some tests for a view that sets entries in the session. Everything works fine, the entries are properly set and the session seems to work ok (using the default DB SessionStore). However, I can't seem to find how to clear the session. I've tried the following, which doesn't work:

Re: Testing dynamic apps

2008-11-26 Thread Julien Phalip
I'm keen to try to find some proper ways to fix this, but before I go too deep into the bowels of Django's testing framework, I was wondering what would be the criticisms you'd have about the "solution" I came up with (at the start of this thread)? It sort of works without patching Django, but is

Re: Testing dynamic apps

2008-11-26 Thread Julien Phalip
On Nov 27, 10:55 am, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On Thu, Nov 27, 2008 at 8:33 AM, Julien Phalip <[EMAIL PROTECTED]> wrote: > > > So, all this works pretty well. The 'fakeapp' app is loaded > > dynamically, tables are created

Testing dynamic apps

2008-11-26 Thread Julien Phalip
Hi, I have an app which allows users to rate/vote for any kind of object. Now, to test this app I need to have a fake model contained in a fake app. Here's the file structure of my app: myapp/ tests/ fakeapp/ __init__.py models.py __init__.py m

Re: Testing dynamic templates

2008-11-25 Thread Julien Phalip
On Nov 25, 11:18 pm, Tim Chase <[EMAIL PROTECTED]> wrote: > > Check out django.contrib.auth.tests.views.py. > > Is there some master index of documentation for "if you want to > test X, see Y.py or http://Z for an example of how to do it"? > where X is any of a number of Django features such as mo

Re: Testing dynamic templates

2008-11-25 Thread Julien Phalip
On Nov 25, 10:56 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Tue, 2008-11-25 at 20:47 +0900, Russell Keith-Magee wrote: > > On Tue, Nov 25, 2008 at 8:40 PM, Julien Phalip <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > I've got a vi

Re: Testing dynamic templates

2008-11-25 Thread Julien Phalip
On Nov 25, 11:01 pm, Julien Phalip <[EMAIL PROTECTED]> wrote: > On Nov 25, 10:56 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> > wrote: > > > > > On Tue, 2008-11-25 at 20:47 +0900, Russell Keith-Magee wrote: > > > On Tue, Nov 25, 2008 at 8:40 PM, Julien Phal

Re: Testing dynamic templates

2008-11-25 Thread Julien Phalip
Excellent! Thanks for the tip Russ ;) On Nov 25, 10:47 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On Tue, Nov 25, 2008 at 8:40 PM, Julien Phalip <[EMAIL PROTECTED]> wrote: > > > Hi, > > > I've got a view which uses a different template

Testing dynamic templates

2008-11-25 Thread Julien Phalip
Hi, I've got a view which uses a different template depending on an input parameter. For example: def my_view(request, theme): ... return render_to_response('my_app/%s/page.html' %s theme, {...}) I would like to write some tests for this view, but I couldn't find any clean way to do so.

Valid URL rejected by URLField

2008-11-11 Thread Julien Phalip
Hi, The following URL is rejected when validating a URLField form field: http://portal.oas.org/Portal/Topic/SEDI/Educaci%C3%B3nyCultura/Cultura/ReunionesdelosMinistrosdeCultura/Cuartareuni%C3%B3nministerial/tabid/1416/language/en-US/language/es-CO/Default.aspx Yet, that URL works perfectly in a

Clash between file upload handler and middleware accessing request's dictionaries

2008-09-18 Thread Julien Phalip
Hi, Upload handlers cannot be set after the request's POST or FILES dictionaries have been accessed. The problem I'm having is that one of the middleware I use (packaged with the django-pagination app) actually accesses request.REQUEST when the request comes in. Therefore it is impossible to set

Re: Template.render and custom tags

2008-09-13 Thread Julien Phalip
You might want to give a shot with 'add_to_builtins': http://blog.michaeltrier.com/2007/8/7/common-template-tags On Sep 13, 11:05 am, akonsu <[EMAIL PROTECTED]> wrote: > hello, > > is there a way to make my custom tags and filters available to a > template that i create from a string like this: >

Ongoing UnicodeDecodeError's with web crawlers and file caching

2008-09-12 Thread Julien Phalip
Hi, I'm running a fairly large website (10,000 news items). Initially it was made in ASP with MSSQL, then I took the project over and ported it to PHP and MYSQL. Finally, 6 months ago I ported it to Django and MySQL. Now, ever since the site has been running on Django, I've received about a doze

Re: Comments customization

2008-09-08 Thread Julien Phalip
Jarek Zgoda wrote: > Is there any document with new comment framework customization tips? > I'd like to switch finally to 1.0 but I don't know how to accomplish > few things (or have ugly workarounds): > > * do not display preview page after succesful posting of comment, go > to commented docume

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

Re: Changing the AuthenticationForm username's max_length field (impossible!?)

2008-08-30 Thread Julien Phalip
As an alternative, you can also check the patch in ticket #8274 http://code.djangoproject.com/ticket/8274 It has been pushed post-1.0, but in the meantime it could be of some help for you. It gives full control on the form to use in the login view, and so allows you not to monkey-patch the code d

Re: Changing the AuthenticationForm username's max_length field (impossible!?)

2008-08-30 Thread Julien Phalip
Keltus, The patch I mentioned in that thread solved the problem of validating the input. For the rendering of the form, you also need to patch the widget as follows: AuthenticationForm.base_fields['username'].widget.attrs['maxlength'] = 75 Note that here 'maxlength' doesn't take an underscore.

Weird ImproperlyConfigured error

2008-08-30 Thread Julien Phalip
Hi, I've spent a couple hours trying to debug this, in vain... I'm setting up a very simple site. In that site I've copied/pasted the flatpages app to be able to extend it at will (I call the new app 'staticpages'). Everything works fine on the local machine running with the dev server. But whe

Re: File upload and access properties

2008-08-25 Thread Julien Phalip
> That is the subject of ticket #8454. Thanks Malcolm! I had missed that one. I like the proposed patch. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to djan

File upload and access properties

2008-08-25 Thread Julien Phalip
Hi, I'm using the FileSystem storage to save uploaded files, in a very basic way: storage.save('/blah/test.mp3', uploaded_file) Now, the resulting file has '600' file access properties. That file is then served by apache, but because of those access properties, it cannot be accessed as you get

Re: Noob: form class location

2008-08-23 Thread Julien Phalip
ngo (or my code if you will) knows > where to find this class. There should be an import statement somewhere then, > right? > > Forgive my Django noobness. And thanx a lot!! > > Regards, > > Gerard. > > > > Russell Keith-Magee wrote: > > On Sat, Aug 23, 2008

Re: Noob: form class location

2008-08-23 Thread Julien Phalip
Hi, In Django there are no 'standard' as such. You'd talk more about 'conventions'. One common way is to put all your forms in forms.py. But that's just for cleanliness. Python lets you create whatever architecture you like for your apps. So, basically, do whatever you feel most comfortable with

Re: Upload image in own form

2008-08-20 Thread Julien Phalip
Hi, I think that you need to set the form's object instance when collecting the POST data too: form = WrestlerProfileForm(request.POST, request.FILES, instance=profile) That way, the image will be set with the existing one, and the form won't complain when validating. Hope it helps, Julien O

Re: Renaming of mailing lists to avoid user confusion

2008-08-20 Thread Julien Phalip
On Aug 21, 4:43 am, "Tom Tobin" <[EMAIL PROTECTED]> wrote: > On Tue, Aug 19, 2008 at 11:16 AM, Tom Tobin <[EMAIL PROTECTED]> wrote: > > Let me propose a stopgap: edit the django-users and django-developers > > pages to state, in large bold text, what the purpose of each list is > > (this is "edit

Re: Browser timeout on long processes

2008-08-20 Thread Julien Phalip
> If the view is running a loop -  how would you provide a variable to another > view (that Ajax is calling) about the situation? Let's say a percentage > complete -- I immediately think of a global variable, but am not sure how > this works in a multi-user web situation. You could use the cache

Re: Browser timeout on long processes

2008-08-19 Thread Julien Phalip
On Aug 20, 12:15 pm, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > That is only half the answer. > > Before you get to this point you need a means of backgrounding the > task to be completed. You're quite right, I had completely overlooked that side of things ;) --~--~-~--~~--

Re: Browser timeout on long processes

2008-08-19 Thread Julien Phalip
Hi, You could use Ajax for this. The client could periodically (say, every second) send a request to the server asking if the calculation is over. When the calculation is over, a flag would be set (in the server's cache, for example) and the client would be notified at the next ajax request. Tha

Saving tests' output to a file in Windows

2008-07-22 Thread Julien Phalip
Hi, I'm running Django's whole test suite in Windows, from a clean checkout. I get lots of errors and failures, but there's apparently some known issues, as described in [1]. Anyway, I can't really debug these errors because the output doesn't entirely fit in the command window. So I'd like to s

Re: propagation of modification in children to parents

2008-07-20 Thread Julien Phalip
Hi, The declarative attribute 'auto_now' (as well as 'auto_now_add') is deprecated and its support will eventually be dropped. To achieve that you need to override the 'save' method. In that same method you can also call the parent's 'save' method to propagate the change to the ancestors: ModelA

Re: Standard documentation method.

2008-07-20 Thread Julien Phalip
Hi, Django is just Python, and documentation works the same way as in any Python code. Not sure what you're actually after but you might want to check this excellent article by J. Bennett about documentation: http://www.b-list.org/weblog/2008/jun/21/documentation/ On Jul 19, 1:52 am, Chris <[EMA

Re: Using Django Syndication for RSS Feed

2008-07-20 Thread Julien Phalip
Just found this via google: http://lexhair.wordpress.com/2007/08/29/rss-feeds-and-internet-explorer-6/ Apparently IE 6 and RSS are not friends... On Jul 20, 3:23 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I'm trying to generate RSS feed for my site using Django's syndication > framewo

Re: Sets

2008-07-19 Thread Julien Phalip
'set' is a Python standard object [1], since version 2.4. In version 2.3 you need to import the 'Set' package first. So, if you care about backward compatibility in Python, the most secure way to import it is: try: set except NameError: from sets import Set as set # Python 2.3 fallback [

Re: Problems with Template "Extends" - Voodoo, anyone?

2008-07-19 Thread Julien Phalip
Hi, It is not very clear what problem you're having here. What are those noticeable differences? On Jul 19, 12:54 pm, Tye <[EMAIL PROTECTED]> wrote: > Quick background: I started a new project ("mpi") and app ("main"), > created a template folder and added its path to settings, and did > everyth

Re: Unicode errors

2008-07-19 Thread Julien Phalip
Hi, Could you post the whole traceback? Also, precise what version of Django you're using. Without that info it's a bit hard to help you. Cheers, Julien On Jul 19, 10:01 pm, Amirouche <[EMAIL PROTECTED]> wrote: > I got an encoding error while rendering in the admin some text I > parsed from a

Re: Strange ProgrammingError - What causes it?

2008-07-17 Thread Julien Phalip
Seems like it could be, as you say, related to a problem with psycopg, see: http://groups.google.com/group/comp.lang.python/browse_thread/thread/8e78649ac40472fe/ On Jul 18, 9:14 am, Julien Phalip <[EMAIL PROTECTED]> wrote: > Which version of Django are you using? > > As a fir

Re: Strange ProgrammingError - What causes it?

2008-07-17 Thread Julien Phalip
Which version of Django are you using? As a first attempt, I'd replace your __str__ method by __unicode__ and replace the calls to 'str' by 'unicode'. On Jul 18, 7:02 am, andrewljohnson <[EMAIL PROTECTED]> wrote: > Hi, > > I am getting a strange programming error, and I wonder what causes it? >

Re: file upload

2008-07-16 Thread Julien Phalip
Hi, Django's upload handling has recently been refurbished and it is now possible upload large files without upsetting the server. Check the doc for more info at: http://www.djangoproject.com/documentation/upload_handling/ Cheers, Julien On Jul 16, 7:49 pm, Niall Mccormack <[EMAIL PROTECTED]>

Re: Complex queryset construction

2008-07-15 Thread Julien Phalip
How about: Item.objects.filter(categories__watching__user=request.user).distinct() I haven't tested it, but if it works it would return all items watched by the user. Then, to display items by category, I would use the regroup tag [1] in the template. [1] http://www.djangoproject.com/documentat

Re: url (reverse) as a filter

2008-07-15 Thread Julien Phalip
I guess you would have to preprocess the text with the template system, reversing all the URLs, and then pass it to markdown processing. So, you'd have: ({% url mylink %} "Check this link") On Jul 16, 3:11 am, gzy <[EMAIL PROTECTED]> wrote: > Hi, > > I like the idea of seperating the.. "address

Re: Logging in with emails longer than 30 characters

2008-07-15 Thread Julien Phalip
Sorry, I forgot to give the link: [1] http://www.djangosnippets.org/snippets/74/ On Jul 15, 9:04 pm, Julien Phalip <[EMAIL PROTECTED]> wrote: > Hi, > > On my site users must login with their email address. I'm successfully > using a custom authentication backend based on

Logging in with emails longer than 30 characters

2008-07-15 Thread Julien Phalip
Hi, On my site users must login with their email address. I'm successfully using a custom authentication backend based on [1]. The problem is with email addresses longer than 30 characters. At the moment, these addresses can't log in because the django.contrib.auth.forms.AuthenticationForm's use

Re: IOError with files uploads bigger than 2.5 MB

2008-07-14 Thread Julien Phalip
for the moment, but need to change that > back to the FILE_UPLOAD_TEMP_DIR soon. > > cheers, tom > > On 14 Jul., 04:54, Julien Phalip <[EMAIL PROTECTED]> wrote: > > > Looks like apache does not have write access to that directory. > > Try setting

Re: IOError with files uploads bigger than 2.5 MB

2008-07-13 Thread Julien Phalip
Looks like apache does not have write access to that directory. Try setting a different directory where Apache will have appropriate access, use the FILE_UPLOAD_TEMP_DIR setting for that. On Jul 14, 11:48 am, tom <[EMAIL PROTECTED]> wrote: > Hi, > > I have a problem with file uploads which are bi

Re: ANN: Join us at a sprint!

2008-07-11 Thread Julien Phalip
... and for the impatient ones, there's a sprint starting... now! It is physically taking place at Europython, but as for other sprints any one can join from all around the world. For for info: http://code.djangoproject.com/wiki/SprintEuroPython2008 On Jul 12, 8:25 am, "Jacob Kaplan-Moss" <[EMAIL

Re: django-registration

2008-07-11 Thread Julien Phalip
django-registration uses the standard settings for sending emails. You need to use the following settings: EMAIL_USE_TLS (Set to True if using Gmail) EMAIL_HOST EMAIL_HOST_USER EMAIL_HOST_PASSWORD EMAIL_PORT More info is available here: http://www.djangoproject.com/documentation/settings/ On

Re: "ImportError No module named django"

2008-07-08 Thread Julien Phalip
n/2.5/site-packages', '/System/Library/Frameworks/ > Python.framework/Versions/2.5/Extras/lib/python/PyObjC'] > > > > Hope this tells you something, I relatively new to Apple computers so > I feel a bit lost, and to top things off, I'm new to Python as well : >

Re: Import issues since newforms-admin

2008-07-08 Thread Julien Phalip
Ok, I've just opened a ticket and posted some code illustrating the issue: http://code.djangoproject.com/ticket/7684 Thanks, Julien On Jul 9, 2:14 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Tue, 2008-07-08 at 21:10 -0700, Julien Phalip wrote: > > Thanks

Re: Import issues since newforms-admin

2008-07-08 Thread Julien Phalip
Tue, 2008-07-08 at 16:20 -0700, Julien Phalip wrote: > > Hi, > > > There's an issue that arose as I upgraded an external app of mine to > > newforms-admin. > > > I created the conventional admin.py, which does all the registration > > business, and did "

Re: "ImportError No module named django"

2008-07-08 Thread Julien Phalip
Hi, This means that Django is not in the PYTHONPATH. To check what's in that path, run the following in Python: >>> import sys >>> print sys.path On Jul 9, 9:35 am, Juanjo Conti <[EMAIL PROTECTED]> wrote: > How did you exactly install it? > Which folders are in your PYTHONPATH? > > Juanjo > --

Import issues since newforms-admin

2008-07-08 Thread Julien Phalip
Hi, There's an issue that arose as I upgraded an external app of mine to newforms-admin. I created the conventional admin.py, which does all the registration business, and did "import admin" in the module's __init__.py After I did that, I got some import errors at compilation time (or say, proj