Re: ImportError: No module named django

2006-06-30 Thread Craig Marshall
> I downloaded the svn version of django a couple of weeks ago, and had > it working fine within Debian. I installed Ubuntu 6.06 today, and my > django install has stopped working. > > I can run python interactively and type "import django" and get no > errors, but when I go into our project direc

Re: ImportError: No module named django

2006-06-30 Thread Jeroen Ruigrok van der Werven
On 6/28/06, Craig Marshall <[EMAIL PROTECTED]> wrote: > I downloaded the svn version of django a couple of weeks ago, and had > it working fine within Debian. I installed Ubuntu 6.06 today, and my > django install has stopped working. This is very strangely worded. You installed Ubuntu completely

Re: ImportError: No module named django

2006-06-30 Thread Craig Marshall
> This is very strangely worded. You installed Ubuntu completely on top > of Debian and then installed Django from SVN again? You're not being > explicit enough. Sorry for being unclear. I had debian sarge installed, and I installed django from svn at that point. Then I wiped my machine entirely,

Re: ImportError: No module named django

2006-06-30 Thread Jeroen Ruigrok van der Werven
On 6/30/06, Craig Marshall <[EMAIL PROTECTED]> wrote: > Only the symlink I made called "django" which points to the actual > django dir in my $HOME I'd advise you to drop the symlink and use the PYTHONPATH variable, but that's just my hunch based on no empirical data. -- Jeroen Ruigrok van der

Re: One-One relationship

2006-06-30 Thread ama55
hi i have create the a save method, to add the user. but the user cannot be accessed from the person class. this is the code any suggestion to correct it: from django.db import models import datetime class Persons (models.Model): user = models.OneToOneField(Users) firstName = models.Char

Re: ImportError: No module named django

2006-06-30 Thread Craig Marshall
> I'd advise you to drop the symlink and use the PYTHONPATH variable, > but that's just my hunch based on no empirical data. Okay, I just deleted /usr/lib/python2.4/site-packages/django (which was the symlink), and added to the PYTHONPATH environment variable the actual django directory, and if f

Secret Password + validating two passwords

2006-06-30 Thread MissLibra
Hello, I am trying to make the password appearing as stars, in other words a secret password but didn't know how. Also I want to validate two passwords. Can anyone help me? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gr

unique=True, one to one relationship

2006-06-30 Thread bernadet
1- if I combine related objects in the same page (by using the edit_inline attribute), and add to one of the fields the unique atrribute (unique=True), when trying to save the page, i got the following exception: Exception Type: TypeError Exception Value: Cannot resolve keyword 'username' into fi

Re: Almost there: A little help in how template dirs under Linux

2006-06-30 Thread David Reynolds
On 29 Jun 2006, at 5:03 am, mamcxyz wrote: > > I forgot to add this details: > > django is installed in /root/django_src > > The project is in > > /root/vulcano/jhonWeb/ This is a bit off-topic, but you shouldn't really run things as root, if at all possible. Cheers, David -- David Reynol

Re: Secret Password + validating two passwords

2006-06-30 Thread Frankie Robertson
Making passwords masked is as simple as changing this in the html: to this: What do you mean about validatating two passwords? Try and be more specific. On 30/06/06, MissLibra <[EMAIL PROTECTED]> wrote: > > Hello, I am trying to make the password appearing as stars, in other > words a secret p

Re: One-One relationship

2006-06-30 Thread Bryan Chow
You can import User from django.contrib.auth.models The save method of the Person class needs to create a User object programatically, e.g. User.objects.create_user(username, email, password) Then you can call super(Person, self).save() This should give you enough to figure out the rest, but if

syncdb ignores db_index=True

2006-06-30 Thread spako
when i do: > manage.py syncdb no indexes are created, i've printed out all the sql statements and the SQL for the indexes were infact missing. to check if django at least knows about them i did: > manage.py sqlall and the SQL for the indexes were printed. i've found the ticket http://code.dj

Re: ImportError: No module named django

2006-06-30 Thread Jeroen Ruigrok van der Werven
On 6/30/06, Craig Marshall <[EMAIL PROTECTED]> wrote: > I can > import django at the python prompt, but running syncdb gives me the > ImportError. What does python -v manage.py yield? 't Will be a long output. Probably best to put it up on a URL if you can. -- Jeroen Ruigrok van der Werven --~

Limiting 'displayed' choices on a field (esp. in admin)

2006-06-30 Thread [EMAIL PROTECTED]
I've been poking people on freenode#django about this, but nobody seems to have a good feel for the stuff i'm looking for. For the record, I am working off of trunk (post-mr), keeping it regularly up to date. The crux of the problem is that we're using the Admin interface to administer a large n

Re: Django Boot Camp

2006-06-30 Thread Jeremy Dunck
On 6/29/06, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > Zeldman very politely suggests I'm nuts. :) ...but I'm too dumb to let it go. One more round: -- Forwarded message -- From: Jeffrey Zeldman <[EMAIL PROTECTED]> Date: Jun 30, 2006 8:14 AM Subject: Re: Contact from aneventap

Re: Limiting 'displayed' choices on a field (esp. in admin)

2006-06-30 Thread Jacob Kaplan-Moss
What you're looking for is the ``raw_id_admin`` option; fetching 11k rows from the database is going to be slow no matter how you cut it. ``raw_id_admin`` is documented at http://www.djangoproject.com/ documentation/model_api/#many-to-one-relationships. Jacob --~--~-~--~~

Re: Problem upgrading from 0.95 build 3085 to 3233

2006-06-30 Thread Frankie Robertson
Svn tries do patch your project with loads of diffs at once, this usually work, but can sometimes fail horribly. Try deleting the django_src directory then checking it out from scratch. Frankie On 29/06/06, olive <[EMAIL PROTECTED]> wrote: > > Hi, > > there is no problem using the database in pl

Re: One-One relationship

2006-06-30 Thread ama55
Thanks Bryan: i will try to do that. and i will be glad if i u can post ur app 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@google

Re: Limiting 'displayed' choices on a field (esp. in admin)

2006-06-30 Thread [EMAIL PROTECTED]
This seems to be closest to what we need; thanks. Yup, I figured selecting 11k rows was not going to be 'optimisable', which is why I was looking for a way to reduce what was actually selected. Now to see if i can customise the presentation of raw_id_admin. Thanks. --~--~-~--~~---

Re: Limiting 'displayed' choices on a field (esp. in admin)

2006-06-30 Thread [EMAIL PROTECTED]
I needed the same thing and adapted the code so that it changes the text as well as the id field when you pick the related objects, it helps the user see what actually happens. The text used is the str() of the related object. I posted the change to the developers list (http://groups.google.com/g

Re: Almost there: A little help in how template dirs under Linux

2006-06-30 Thread mamcxyz
I know... but currently I'm looking how secure the things... --~--~-~--~~~---~--~~ 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 fr

ManyToMany field on User object

2006-06-30 Thread Paul
Hi all, I'm trying to write a model to extend the standard Django user model, which will add (among other things) the ability to have a list of users recorded as your friends (like Flickr, or Digg). The model looks like this (stripped down to just the relevant fields) -- fro

Re: MS SqlServer in Django

2006-06-30 Thread Filipe
>From the posts I've seen it seems MSSqlServer isn't yet fully supported by Django's ORM, but that wouldn't be a problem in this case because I just need to issue some custom sql queries to a SqlServer DB. I've seen references to both pymssql and ado_mssql being bundled with Django. Is this alrea

Re: MS SqlServer in Django

2006-06-30 Thread Jeremy Dunck
On 6/30/06, Filipe <[EMAIL PROTECTED]> wrote: > I've seen references to both pymssql and ado_mssql being bundled with > Django. Is this already implemented in the current trunk? If so, is it > enough to change the "DATABASE_ENGINE" setting to something like > "pymssql"? :) Trunk comes with an ado

Re: Time Tracking Tool

2006-06-30 Thread Rob Hudson
I have a time tracking tool I wrote in PHP a long time ago. It's not perfect but it works. Now that I have a couple Django sites under my belt I've considered using it for rewriting it. So if you're interested in pushing this along I'd be willing to contribute. My system is basically this one

django.shortcuts.render_with_request_context() ?

2006-06-30 Thread Todd O'Bryan
I find that just about all of my HttpResponse objects have a RequestContext inside. How would people feel about adding another function to django.shortcuts parallel to render_to_response? Instead of t = loader.get_template('foo.html') return HttpResponse(t.render(RequestContext(request, {'form'

Re: django.shortcuts.render_with_request_context() ?

2006-06-30 Thread James Bennett
On 6/30/06, Todd O'Bryan <[EMAIL PROTECTED]> wrote: > I find that just about all of my HttpResponse objects have a > RequestContext inside. How would people feel about adding another > function to django.shortcuts parallel to render_to_response? render_to_response already takes a 'context_instanc

Unicode strings through Database API

2006-06-30 Thread Paul
Hi, I'm in need of a little education. This may be a python issue rather than a Django one, but is anybody can help I'd appreciate it. I've written an a little script which gets external data and inserts it into the database using the Django models. Unfortunately (or fortunately, depending on yo

Re: MS SqlServer in Django

2006-06-30 Thread Filipe
Jeremy Dunck wrote: > Trunk comes with an ado_mssql backend, which works only on Windows. > pymssql is cross-platform, but not in trunk (yet). > > If all you're doing is custom SQL and your server is Windows, then > yeah, you should be able to use ado_mssql. But test first, and > understand that

Re: django.shortcuts.render_with_request_context() ?

2006-06-30 Thread Jay Parlar
On 6/30/06, James Bennett <[EMAIL PROTECTED]> wrote: > > On 6/30/06, Todd O'Bryan <[EMAIL PROTECTED]> wrote: > > I find that just about all of my HttpResponse objects have a > > RequestContext inside. How would people feel about adding another > > function to django.shortcuts parallel to render_to

Re: django.shortcuts.render_with_request_context() ?

2006-06-30 Thread Todd O'Bryan
On Fri, 2006-06-30 at 16:23 -0400, Jay Parlar wrote: > > render_to_response already takes a 'context_instance' keyword argument > > which can be used to specify the Context class to use, so you can just > > do > > > > from django.template import RequestContext > > return render_to_response('foo.h

Re: django.shortcuts.render_with_request_context() ?

2006-06-30 Thread James Bennett
On 6/30/06, Jay Parlar <[EMAIL PROTECTED]> wrote: > That should be: > > context_instance=RequestContext(request)) Heh. Not sure how I got that wrong, considering I had it right in the blog entry I wrote about it... -- "May the forces of evil become confused on the way to your house." -- Georg

Re: django.shortcuts.render_with_request_context() ?

2006-06-30 Thread Jay Parlar
On 6/30/06, James Bennett <[EMAIL PROTECTED]> wrote: > > On 6/30/06, Jay Parlar <[EMAIL PROTECTED]> wrote: > > That should be: > > > > context_instance=RequestContext(request)) > > Heh. Not sure how I got that wrong, considering I had it right in the > blog entry I wrote about it... > We can just

Re: Unicode strings through Database API

2006-06-30 Thread Paul
Ok, I've dug a little more and I realised I'd got the wrong end of the stick. The string I'm assigning to the field is a unicode string. Django is trying to do a .encode('ascii') on it and failing. Understandable really I assume I have to do a .encode('utf-8') on it before I store it. Does that

hi guys

2006-06-30 Thread spamlicious
whats going on in this topic? --~--~-~--~~~---~--~~ 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 [E

Re: Unicode strings through Database API

2006-06-30 Thread Jeremy Dunck
On 6/30/06, Paul <[EMAIL PROTECTED]> wrote: > The string I'm assigning to the field is a unicode string. Django is > trying to do a .encode('ascii') on it and failing. Understandable > really Are you sure it's the unicode type, and not just a byte string? > I assume I have to do a .encode('utf-8

Re: Unicode strings through Database API

2006-06-30 Thread Jeremy Dunck
On 6/30/06, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > On 6/30/06, Paul <[EMAIL PROTECTED]> wrote: > > The string I'm assigning to the field is a unicode string. Django is > > trying to do a .encode('ascii') on it and failing. Understandable > > really > > Are you sure it's the unicode type, and no

Help with regex for URL with spanish characters

2006-06-30 Thread mamcxyz
I'm building a site for restaurants, like a yellow pages. I wanna provide listing based in state / city /zones. Some citys in Colombia are "Medellín", "Santa Marta" and so on... So, the url are transformed to Medell%C3%ADn and Santa%20Marta. Easy, I think... in the urls: (r'^(?P[a-zA-Z0-9%\-]+

Re: Help with regex for URL with spanish characters

2006-06-30 Thread Jeremy Dunck
On 6/30/06, mamcxyz <[EMAIL PROTECTED]> wrote:> > I'm building a site for restaurants, like a yellow pages.> > I wanna provide listing based in state / city /zones. Some citys in > Colombia are "Medellín", "Santa Marta" and so on...> > So, the url are transformed to Medell%C3%ADn and Santa%20Marta.

Re: Help with regex for URL with spanish characters

2006-06-30 Thread Jeremy Dunck
On 6/30/06, Jeremy Dunck <[EMAIL PROTECTED]> wrote: So, unless I'm a moron (in the Pilgrim sense[1]), in general, you can expect to get UTF-8 URLs. Sorry, let me clarify:In general, you should expect to get -unicode- URLs from the server, and this explanation will hopefully serve to reduce confusio

Re: Unicode strings through Database API

2006-06-30 Thread Paul
Jeremy Dunck wrote: > I've seen some situations where multiple encodings were stuck into the > same column, and you don't want to go there. I can believe that :-/ That for the advice. Things seem to be working now I've encoded into utf-8. Even Django's admin interface seems to understand utf-8

Re: Help with regex for URL with spanish characters

2006-06-30 Thread mamcxyz
I understand the encoding issue. I modified the regex to: ^(?[a-zA-Z0-9%\\\-]+)/(?[a-zA-Z0-9%\\\-]+)/$ With this test string: re.match(r'^(?P[a-zA-Z0-9\%\\\-]+)/(?P[a-zA-Z0-9\%\\\-]+)/$',r'Medell%C3%ADn/Medell\xEDn/').groups() Work outside django but not inside it... In where I need to look

Re: ManyToMany field on User object

2006-06-30 Thread Malcolm Tredinnick
On Fri, 2006-06-30 at 09:48 -0700, Paul wrote: > Hi all, > > I'm trying to write a model to extend the standard Django user model, > which will add (among other things) the ability to have a list of users > recorded as your friends (like Flickr, or Digg). > > The model looks like this (stripped

Re: ManyToMany field on User object

2006-06-30 Thread Paul Sargent
On 7/1/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: If you could make that change (change "User" to "user", for example) andsee if the problem reoccurs, that would be great.I think that did it. I'd changed it a while back, but I'd also commented out the field that was giving me problems so I h

ValidationErrors

2006-06-30 Thread Todd O'Bryan
How do people handle validation errors in a standard way? Surely, the {% if form.name.errors %}*** {{ form.name.errors|join:", " }}{% endif %} repeated over and over again (with field changes) in the documentation example cries out for some better way. I was thinking of creating a custom tag, b

Re: Help with regex for URL with spanish characters

2006-06-30 Thread Jeremy Dunck
On 6/30/06, mamcxyz <[EMAIL PROTECTED]> wrote: > In where I need to look to see exactly what is evaluated? django.core.urlresolvers.RegexURLPattern.resolve ...and from the look of that test, no, you don't understand the encoding issue. it'd be more like: re.match(r'[a-zA-Z0-9\%\\\xED-\xEF]',

Re: ValidationErrors

2006-06-30 Thread Max Battcher
Todd O'Bryan wrote: > How do people handle validation errors in a standard way? Surely, the > > {% if form.name.errors %}*** {{ form.name.errors|join:", " }}{% endif %} > > repeated over and over again (with field changes) in the documentation > example cries out for some better way. > > I was