string to unicode Was: Issue with database Postgresql :(

2007-05-09 Thread Thomas Guettler
Am Dienstag, 8. Mai 2007 22:54 schrieb Gerard M: > Thanks for all your help guys, but I'm facing another little thing > here, if I'm getting the word from a file (this means I'm not typing > the word directly into the code), for example: Maybe this helps: s="München" # simple string

http://tinyurl.com/36pw6k Fired Aaron swartz attacs Reddit brings it down

2007-05-09 Thread Rico
http://tinyurl.com/36pw6k Fired Aaron swartz attacs Reddit brings it down --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To u

Re: Error creating super user

2007-05-09 Thread Kabads
On 9 May, 07:38, Ben Schwarze <[EMAIL PROTECTED]> wrote: > Hi Kabads, > > you need to add "django.contrib.admin" to your installed apps in > settings: > > E.g.: > > INSTALLED_APPS = ( > 'django.contrib.admin', > 'django.contrib.auth', > 'django.contrib.contenttypes', > 'django.cont

Re: Error creating super user

2007-05-09 Thread Kabads
On 9 May, 09:56, Kabads <[EMAIL PROTECTED]> wrote: > On 9 May, 07:38, Ben Schwarze <[EMAIL PROTECTED]> wrote: > > > > > Hi Kabads, > > > you need to add "django.contrib.admin" to your installed apps in > > settings: > > > E.g.: > > > INSTALLED_APPS = ( > > 'django.contrib.admin', > > 'djan

♥♥ DATING HOT GIRLS - 100% FREE ♥♥

2007-05-09 Thread [EMAIL PROTECTED]
Real-time matching, 100% free online dating Meet Hot Local Women Tonight ! Free Access Find people for Dates & Fun in your area. 100% Free So, Date, Chat & Flirt online More info: http://easylnk.com/?340 http://easylnk.com/?341 --~--~-~--~~~---~--~~ You rece

Re: Feed Displaying Odd Dates

2007-05-09 Thread Malcolm Tredinnick
On Wed, 2007-05-09 at 02:06 +, Bryan Veloso wrote: > Thanks for the help Malcom, > > > The feed framework looks at the attribute called "pubdate" to determine > > the publication date for items. Your attribute is called "pub_date", so > > ti isn't being examined. Simplest solution here is to

Re: \d and \w regular expressions?

2007-05-09 Thread Ian Lawrence
Ola, http://www.amk.ca/python/howto/regex/ is a pretty gentle intro []'s Ian On 5/9/07, gsmith <[EMAIL PROTECTED]> wrote: > > Is there any documentation of what these do? I'm assuming that this > is a Python regular expression? > > The reason I ask is becuase I have a line in my urls.py file tha

Re: Models as separate files and doctest

2007-05-09 Thread Glin
I have exactly same problem. Any solution yet? BTW. I would like to django run test not only for models, but for templatetags (mainly filters), too. And maybe even other files in apps (like shortcuts.py etc.). Is that possible? --~--~-~--~~~---~--~~ You received

get objects in templates

2007-05-09 Thread Alessandro Ronchi
I have an item in my model with one or more photos, linked by a foreign key. I want to put in my template the first image at the head of the page, and the second in another place. The result i need is that: ixx ixx xx

Re: Weird get_or_create error

2007-05-09 Thread Andy Dustman
On 5/8/07, Brandon Low <[EMAIL PROTECTED]> wrote: > > Still not sure what's going on myself -- I've had one more occurence of > the error, and have now confirmed that autocommit is on in the > production application (by printing the result of select @@autocommit). > > It sounds quite possible that

Re: Curious error with Session Variables

2007-05-09 Thread Diego pylorca
Nop, when I disable mod-php5, the admin works correctly :( my web browsers are firefox and opera and IE, but it is not a client host problem :'( On 5/8/07, John DeRosa <[EMAIL PROTECTED]> wrote: > > > Perhaps check your firewall, anti-hijack, anti-trojan, etc. software. > You may have a cookie g

Scalability / Traffic-Volume Numbers

2007-05-09 Thread Jimmy
I am trying to get good stats for sites run off of Django to prove that Django can really be a business solution and can scale well. So far the only good articles I have found are: http://wiki.rubyonrails.com/rails/pages/Framework+Performance http://www.alrond.com/en/2007/jan/25/performance-test

Re: Models as separate files and doctest

2007-05-09 Thread Russell Keith-Magee
On 5/9/07, Glin <[EMAIL PROTECTED]> wrote: > > I have exactly same problem. Any solution yet? > > BTW. I would like to django run test not only for models, but for > templatetags (mainly filters), too. And maybe even other files in apps > (like shortcuts.py etc.). Is that possible? The simple opt

Re: Retrieving 'attributes' of a product for generic views

2007-05-09 Thread Adam Fast
Thank you James, that's perfect. However I did run into a snag - I was going to use the slug field of my attribute to be the "defined term" so in this case brightness-ansi-lumens, but I'm getting another "Cannot parse remainder" on the hyphens. It's a perfectly acceptable limitation to just renam

Re: Serving static content with development server?

2007-05-09 Thread gsmith
James, I use get_image_url and the src is still 'c:/django/site_media/ IMG_0394.JPG'. I think their is a property that I don't have correct. Below is a list of properties that might be wrong settings.py MEDIA_ROOT = '' MEDIA_URL = '' urls.py (r'^site_media/(?P.*)$', 'dj

Re: get objects in templates

2007-05-09 Thread va:patrick.kranzlmueller
just a guess. for the first image: {% for image in object.images.all.0 %} ... and for the rest: {% for image in object.images.all %} {% if not forloop.first %} ... note: what you described here (object.images.all) is not a foreignkey but a m2m-relationship. patrick. Am 09.05.2007 um 14:52 sc

how to use django model independently?

2007-05-09 Thread bear330
Hello, everyone: I am a newbie of django but I like its model design which is powerful and elegant. I want to use this feature in my other python applications, but I don't know how! In django's design philosophy "Loose coupling" said that "Although Django comes with a full stack for convenience,

Re: Serving static content with development server?

2007-05-09 Thread Alexander Pugachev
Images are uploaded to directory which name is constructed from 2 parts: MEDIA_ROOT + model's upload_to. Then image url gets constructed from MEDIA_URL and upload_to (and image name itself). So if your C:\django\site_media\ is accessible with web-server, and say C:/django/ is DOCUMENT_ROOT of Apac

Re: How can I get the admin interface to not ignore newlines in a text field?

2007-05-09 Thread Alexander Pugachev
What is the type of the field? It should be TextField? 2007/5/9, Michael Lake <[EMAIL PROTECTED]>: > > > Hi all > > I have a content field which has newlines in it. When I do a select from > the database > of that field I get the output like this: > line 1 > line 2 > > But when I view this in th

Validating dynamically generated forms

2007-05-09 Thread Laundro
Hi, I have built this class: class FormClass(forms.Form): def __init__(self, *args, **kwargs): super(FormClass, self).__init__(*args, **kwargs) # Get tags and their id for t in Item.objects.get(pk=id).tags.values(): field_id = t['id'] # tag ID is the form's field na

Re: Scalability / Traffic-Volume Numbers

2007-05-09 Thread Tom
I too would love to see some ideas on what others are doing for scaling in all aspects. There was another recent post looking for ideas on scaling the back end. As well there have been a number of discussions centered on the concept multiple database support, SQLRelay, SQL Alchemy ... I'll start

Re: how to use django model independently?

2007-05-09 Thread James Bennett
On 5/9/07, bear330 <[EMAIL PROTECTED]> wrote: > Did anyone try to use django model independently? > How to do that? Yes, it's a fairly frequently asked question on this list, and in fact I think it's been asked and answered at least once in the last week. I don't mean to go after anyone in partic

Komodo and Django - code completion / code intellisensing

2007-05-09 Thread oliver
Hi i am evaluating komodo as my django/python ide but i can't get the code completion to work. It gives me this error: error evaluating 'models' at models.py#4: NameError: global name 'XXX' is not defined (C:\Prog..\Active..\lib\mozilla\python\komodo \codintel2\tree_python.py#169 in _members_from

Re: Use django's models without running web server

2007-05-09 Thread hoamon
After i posted this comment, i found the keyword is "use models outside djagno", not "without web server". so many posts talk about this topic. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group.

Fwd: SImple :: Nature

2007-05-09 Thread Kooooool forwords
[image: FOREST DESKTOP WALLPAPER , RAIN FOREST WALLPAPER] [image: FOREST DESKTOP WALLPAPER , RAIN FOREST WALLPAPER]

assertRedirects

2007-05-09 Thread Jiri Barton
Why does assertRedirects of TestCase succeeds only if the response code is 302? One would think any 3xx should do - they are *redirects* at all. At least, I would think 301 were okay because that is what django.views.generic.simple.redirect_to generates. How am I supposed to think about that? Whe

Re: dumpdata/loaddata does not use database encoding

2007-05-09 Thread Jiri Barton
You can use the YAML serializer until this is fixed. It worked for me. You will have to install PyYaml first (http://pyyaml.org/) - or easy_install pyyaml. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django use

Re: Multiple Profiles

2007-05-09 Thread Amit Upadhyay
On 5/8/07, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > > On 5/8/07, Amit Upadhyay <[EMAIL PROTECTED]> wrote: > > I would recommend you take a look at lost-theories.com source code. One > anti > > pattern that django docs seems to recommend is use > > django.contrib.auth.models.User as your main user

Re: Multiple Profiles

2007-05-09 Thread Vinay Sajip
On May 8, 2:57 pm, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote: > On 5/8/07, Amit Upadhyay <[EMAIL PROTECTED]> wrote: > > I'm having this issue currently as well-- an app I'm working on is > heavily based on profiles and relations to it, so most code is > constantly doing user.get_profile.something

TypeError: expected string or buffer on django.utils.functional.__proxy__

2007-05-09 Thread sandro dentella
Hi, the following code raises error as per subject: import re from django.db import models from django.newforms.models import form_for_model from django.utils.translation import gettext_lazy as _ class Abc(models.Model): choice = models.CharField(maxlength=10, help_text

Re: Multiple Profiles

2007-05-09 Thread Vinay Sajip
On May 9, 6:37 pm, Vinay Sajip <[EMAIL PROTECTED]> wrote: > part of the user model. Is the intention just to avoid saying > user.get_profile().xxx? Can't this be done by judiciously overriding > __getattribute__ in User, to delegate to a profile if one is defined? It appears not. Just to see if

Re: Scalability / Traffic-Volume Numbers

2007-05-09 Thread Joseph Heck
Back in February, TrenchMice was hit with a reasonable load from a front-page Slashdot article, and they wrote it up at http://www.cogitooptimus.com/2007/02/11/wow-we-made-it/ I helped them with some load testing before the site ever went live, and it looked to be able to handle it with aplomb. T

Re: Multiple Profiles

2007-05-09 Thread Vinay Sajip
On May 9, 7:21 pm, Vinay Sajip <[EMAIL PROTECTED]> wrote: > It appears not. Just to see if it would work, I tried just adding > overriding __getattribute__ (which just calls the superclass > behaviour) and it causes some unexpected behaviour in the unit tests. False alarm - it was a typo on my

Re: Newforms and foreign keys

2007-05-09 Thread Bob Dively
[Following up to myself to post about my resolution] I resolved the issue by: 1. setting editable=true for the foo class 2. hiding the bar field in the rendered HTML with: FooForm.base_fields['bar'] = forms.CharField(widget=HiddenInput(), initial=bar_id) 3. replacing form.save() with: n = fo

How well should I know Python before using Django?

2007-05-09 Thread walterbyrd
Before attempting to use Django, a person should have a Python programming skill level of: 1) beginner 2) intermediate 3) expert To use Django, a developer should have an exceptionally strong knowledge of the following area(s) of Python: __ --~--~-~--~~

Re: How well should I know Python before using Django?

2007-05-09 Thread Joseph Heck
Beginner, at least in my opinion. YMMV. On 5/9/07, walterbyrd <[EMAIL PROTECTED]> wrote: > Before attempting to use Django, a person should have a Python > programming skill level of: > > 1) beginner > 2) intermediate > 3) expert > > To use Django, a developer should have an exceptionally strong

Re: How well should I know Python before using Django?

2007-05-09 Thread [EMAIL PROTECTED]
I was (and really still am) an utter newb to python. Then again, I think I've proven that more than I'd like. On May 9, 4:08 pm, "Joseph Heck" <[EMAIL PROTECTED]> wrote: > Beginner, at least in my opinion. YMMV. > > On 5/9/07, walterbyrd <[EMAIL PROTECTED]> wrote: > > > Before attempting to use

Re: How well should I know Python before using Django?

2007-05-09 Thread John DeRosa
(1) If you're making a simple web site. (2) If you're making a site with a non-trivial use of authentication, session variables, complicated db lookups; or uses complicated algorithms under the hood. $.02, John walterbyrd wrote: > Before attempting to use Django, a person should have a Pytho

Re: How well should I know Python before using Django?

2007-05-09 Thread Greg Donald
On 5/9/07, walterbyrd <[EMAIL PROTECTED]> wrote: > Before attempting to use Django, a person should have a Python > programming skill level of: > > 1) beginner > 2) intermediate > 3) expert 0) None But what about experience in other programming languages? If you currently know zero programming

Re: How well should I know Python before using Django?

2007-05-09 Thread Nic James Ferrier
"Greg Donald" <[EMAIL PROTECTED]> writes: >> 1) beginner >> 2) intermediate >> 3) expert > > 0) None > > But what about experience in other programming languages? If you > currently know zero programming languages, learning any new > programming language or framework will require some significan

Re: assertRedirects

2007-05-09 Thread Russell Keith-Magee
On 5/10/07, Jiri Barton <[EMAIL PROTECTED]> wrote: > > Why does assertRedirects of TestCase succeeds only if the response > code is 302? One would think any 3xx should do - they are *redirects* > at all. At least, I would think 301 were okay because that is what > django.views.generic.simple.redir

widgets.py And unicode

2007-05-09 Thread Thomas Rabaix
Hello, I have a newform object which I prepopulate some fields : form = MenuForm() tu = () for m in Menu.objects.all(): tu += ((m.id,m),) form.fields['parent_id'].choices = tu In the case of Menu.__str__ return a utf-8 string, the SelectWidget raise an UnicodeErro

Re: How well should I know Python before using Django?

2007-05-09 Thread dballanc
As someone who jumped in as new to python, and django both. I'd say you won't have much trouble, if you're comfortable with another language. You can start out knowing nothing about it, but you'll need some basics pretty quickly. Things about Python that I wish I'd focused on before starting w

Re: How can I get the admin interface to not ignore newlines in a text field?

2007-05-09 Thread Michael Lake
Alexander Pugachev wrote: > What is the type of the field? It should be TextField? Yes it is: description = models.TextField(core=True) >>Hi all >> >>I have a content field which has newlines in it. When I do a select from >>the database of that field I get the output like this: >>line 1 >>li

Re: How can I get the admin interface to not ignore newlines in a text field?

2007-05-09 Thread Michael Lake
Michael Lake wrote: > Alexander Pugachev wrote: >>What is the type of the field? It should be TextField? > > Yes it is: >description = models.TextField(core=True) To be more precise; the new lines do not show when the admin interface just displays the field but it does show the newlines wh

Re: Curious error with Session Variables

2007-05-09 Thread Graham Dumpleton
Try reenabling PHP, but delve into the PHP setup and disable the loading of the PHP mhash module first. There have been cases where the PHP mhash module has clashed in some way with the Python md5 hash modules and caused the Python module to give back incorrect results. This may have an effect on

Re: How well should I know Python before using Django?

2007-05-09 Thread walterbyrd
Thanks to all who replied. BTW: I have programmed professionally in about a dozen different languages, and have a degree in math with a concentration in comp sci. But, I'm new to Python. I've been reading up, and writing a few simple programs, but I'm still a beginner. > iPython. First thing af

Re: How well should I know Python before using Django?

2007-05-09 Thread Aldarion
http://ipython.scipy.org/ An enhanced Python shell designed for efficient interactive work. walterbyrd wrote: > I'm sorry, what is iPython? > > > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django us

Re: How well should I know Python before using Django?

2007-05-09 Thread James Bennett
On 5/9/07, walterbyrd <[EMAIL PROTECTED]> wrote: > Thanks to all who replied. BTW: I have programmed professionally in > about a dozen different languages, and have a degree in math with a > concentration in comp sci. But, I'm new to Python. I've been reading > up, and writing a few simple progra

Re: How well should I know Python before using Django?

2007-05-09 Thread Kenneth Gonsalves
On 10-May-07, at 2:37 AM, walterbyrd wrote: > Before attempting to use Django, a person should have a Python > programming skill level of: none - but he would be advised to do the python tutorial side by side with the django tutorial > > 1) beginner > 2) intermediate > 3) expert > > To use Dj

Re: TypeError: expected string or buffer on django.utils.functional.__proxy__

2007-05-09 Thread Malcolm Tredinnick
On Wed, 2007-05-09 at 11:17 -0700, sandro dentella wrote: > > Hi, > > the following code raises error as per subject: > >import re >from django.db import models >from django.newforms.models import form_for_model >from django.utils.translation import gettext_lazy as _ > > >

Re: widgets.py And unicode

2007-05-09 Thread Malcolm Tredinnick
On Thu, 2007-05-10 at 01:45 +0200, Thomas Rabaix wrote: > Hello, > > I have a newform object which I prepopulate some fields : > > form = MenuForm() > > tu = () > for m in Menu.objects.all(): > tu += ((m.id,m),) > form.fields['parent_id'].choices = tu > > In the ca