Re: No module named views, Django tutorial

2008-04-22 Thread lancemiller777
I am having the same error. Note: A month into learning Python also. I just did this: pydoc -w /usr/local/google_appengine/lib/django/django/core/ urlresolvers.py outputs a nice html file: urlresolvers.html And in it is a link to the source code viewed in the web browser. Python rocks. Now if I

Re: How to use ImageField to save images to dynamic path

2008-04-22 Thread Eric Liu
Why don't you set 'images/' as a variant.then you can change it dynamically 2008/4/23, Rishabh Manocha <[EMAIL PROTECTED]>: > > > Yea, I don't think the method I described would work for directories > (or at-least I can't figure out how). It does, however, work if you > want to add something to a

Re: How to use ImageField to save images to dynamic path

2008-04-22 Thread Rishabh Manocha
Yea, I don't think the method I described would work for directories (or at-least I can't figure out how). It does, however, work if you want to add something to a filename before saving it. The code I use is: request.FILES['resume']['filename'] = request.POST['empid'] + "_" +

Re: Calling self.related_object.save() from self.save() ???

2008-04-22 Thread Malcolm Tredinnick
On Tue, 2008-04-22 at 13:47 -0700, Don Spaulding wrote: [...] > I try to do something like this: > > order = Order() > order.save() > order.items.create(price=Decimal("5.00")) > order.total #gives me 0 > order.save() > order.total #gives me the correct order.total > > My guess

Re: Categorize and List if Item Exists

2008-04-22 Thread andy baxter
Michael Ellis wrote: > Hello all, > > I have the following models: > > class Category(models.Model): > name = models.CharField(core=True, max_length=100) > parent = models.ForeignKey('self', blank=True, null=True, > related_name='child') > > class Product(models.Model): > name =

Re: Iterating through inner dictionaries

2008-04-22 Thread Kenneth Gonsalves
On 23-Apr-08, at 8:11 AM, jwwest wrote: > I have a view that returns a dictionary containing several > dictionaries. What's the proper way to iterate through each sub > dictionary in a template? I tried a nested for, but I'm getting a > template error saying that my top most dictionary is a

Iterating through inner dictionaries

2008-04-22 Thread jwwest
I have a view that returns a dictionary containing several dictionaries. What's the proper way to iterate through each sub dictionary in a template? I tried a nested for, but I'm getting a template error saying that my top most dictionary is a long and is not iterable. - James

Re: how do designers create content

2008-04-22 Thread Kenneth Gonsalves
On 23-Apr-08, at 5:02 AM, Jorge Vargas wrote: > developer (me) starts working on the site outputting plain simple > html, h1,h2, div,etc and forms. not worrying about the master. > designer starts working on the master either photoshop or whatever. > then I sit down with the designer and start

Re: How to get ':' in address?

2008-04-22 Thread Jorge Vargas
On Tue, Apr 22, 2008 at 12:01 PM, James Aylett <[EMAIL PROTECTED]> wrote: > > On Tue, Apr 22, 2008 at 05:36:35PM +0200, Thomas Guettler wrote: > > > AFAIK ':' is not allowed in a URL path. > > RFC 2396 section 3.3 ("Path Component") suggests otherwise. ":" is a > "reserved" character in the

Re: Calling self.related_object.save() from self.save() ???

2008-04-22 Thread Jorge Vargas
On Tue, Apr 22, 2008 at 4:47 PM, Don Spaulding <[EMAIL PROTECTED]> wrote: > > I think I must have fallen through the cracks of "nobody will ever > want to do *this*" when building this app. Given the following two > models (simplified for clarity): > > class Order(models.Model): > total

Re: GeoDjango: distance between PointFields problem

2008-04-22 Thread Nathaniel Whiteinge
On Apr 22, 11:54 am, Justin Bronn <[EMAIL PROTECTED]> wrote: > (1) What geographic fields are in your model, what type are they > (e.g., PointField, etc.), and their SRID. A plain PointField, e.g.: ``location = PointField()``. I believe GeoDjango defaults to WGS84 for the SRID. > (2) The

Re: how do designers create content

2008-04-22 Thread Jorge Vargas
On Sun, Apr 20, 2008 at 2:33 AM, lee <[EMAIL PROTECTED]> wrote: > > I am new to django, but I think it is really cool. I have used other > web dev systems before like zope/plone and php. I am a little new to > the template type system of django and I was wondering how most web > designer

Re: django thumbnail

2008-04-22 Thread Matthias Kestenholz
Hi, On Tue, 2008-04-22 at 22:41 +0200, Alessandro wrote: > I'm trying to use sorl.thumbnail with the latest django trunk. > > It gives me this error. Any hints? > Other options to make automatic thumbnails? > > TemplateSyntaxError at / > 'thumbnail' is not a valid tag library: Could not load

Re: Changing admin index

2008-04-22 Thread Andre Meyer
try this: http://www.djangoproject.com/documentation/tutorial02/#customize-the-admin-index-page http://www.djangobook.com/en/1.0/chapter17/ cheers André On Tue, Apr 22, 2008 at 8:48 PM, Matthias Kestenholz <[EMAIL PROTECTED]> wrote: > > Hi, > > On Tue, 2008-04-22 at 11:37 -0700, dimrub wrote: >

Calling self.related_object.save() from self.save() ???

2008-04-22 Thread Don Spaulding
I think I must have fallen through the cracks of "nobody will ever want to do *this*" when building this app. Given the following two models (simplified for clarity): class Order(models.Model): total = models.DecimalField(...) def save(self): tmp_total = Decimal() for

django thumbnail

2008-04-22 Thread Alessandro
I'm trying to use sorl.thumbnail with the latest django trunk. It gives me this error. Any hints? Other options to make automatic thumbnails? TemplateSyntaxError at / 'thumbnail' is not a valid tag library: Could not load template library from django.templatetags.thumbnail, No module named

Re: I'm not getting URL's. Help!

2008-04-22 Thread Michael
Thanks. It was something in your models. Django can't just magically figure out what url you want besed on the same function. Look at the way that you return the get_absolute_url: def get_absolute_url(self): return ('django.views.generic.list_detail.object_detail', (), { 'slug': self.slug,

Re: I'm not getting URL's. Help!

2008-04-22 Thread jeffself
Here's the elections model: class Election(models.Model): uuid = UUIDField(primary_key=True, editable=False) election_name = models.CharField(max_length=100, unique=True) slug = models.SlugField(prepopulate_from=("election_name",), unique=True) election_date = models.DateField()

Categorize and List if Item Exists

2008-04-22 Thread Michael Ellis
Hello all, I have the following models: class Category(models.Model): name = models.CharField(core=True, max_length=100) parent = models.ForeignKey('self', blank=True, null=True, related_name='child') class Product(models.Model): name = models.CharField('name',

Re: www.djangoproject.com nameservers returning SERVFAIL response

2008-04-22 Thread [EMAIL PROTECTED]
I'm connecting fine so the problem is probably with your DNS(looks like OpenDNS). On Apr 22, 1:23 pm, Michael Becker <[EMAIL PROTECTED]> wrote: > I'm not sure if this is the right place to post this info but nslookup > onwww.djangoproject.comis failing. > Nameserver trace

Re: Changing admin index

2008-04-22 Thread Matthias Kestenholz
Hi, On Tue, 2008-04-22 at 11:37 -0700, dimrub wrote: > The most obvious way would be to override the corresponding template > to include only a specific list of apps. > > On Apr 22, 8:22 pm, "Monica Leko" <[EMAIL PROTECTED]> wrote: > > Hi > > > > Can I somehow exclude sites and auth from admin

Re: Changing admin index

2008-04-22 Thread dimrub
The most obvious way would be to override the corresponding template to include only a specific list of apps. On Apr 22, 8:22 pm, "Monica Leko" <[EMAIL PROTECTED]> wrote: > Hi > > Can I somehow exclude sites and auth from admin index page, and left > only django apps?

www.djangoproject.com nameservers returning SERVFAIL response

2008-04-22 Thread Michael Becker
I'm not sure if this is the right place to post this info but nslookup on www.djangoproject.com is failing. Nameserver trace for www.djangoproject.com: * Looking for who is responsible for root zone and followed k.root- servers.net. * Looking for who is responsible for com and followed

Re: GeoDjango: distance between PointFields problem

2008-04-22 Thread Justin Bronn
> I'm calculating the distance between two plain PointFields in the GIS > branch using the distance GeoQuerySet method [1] and I'm coming up > with some confusing results. > I require more information before I can answer your inquiry: (1) What geographic fields are in your model, what type are

Re: Paginator Help

2008-04-22 Thread DuncanM
Thanks for the advice Peter. I did what you said, and nothing showed (meaning the {% if is_paginated %} was false). How would I make it so is_paginated=True? I don't see how this is set anywhere. When i removed the IF statement so I could just see if the {% load paginator %} code worked I get

Re: form.as_table not displaying in template

2008-04-22 Thread Explore
Thank you all for your quick responses. I was passing the class instead of the instance. Everything is working great now! On Apr 22, 12:20 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Tue, 2008-04-22 at 09:02 -0700, Explore wrote: > > Hi. I am new to django and I am trying to get a

Re: form.as_table not displaying in template

2008-04-22 Thread Explore
Karan and Malcolm, Thank you both - that was the problem. It is working great now! On Apr 22, 12:20 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Tue, 2008-04-22 at 09:02 -0700, Explore wrote: > > Hi. I am new to django and I am trying to get a handle around the form > > processing. I

Changing admin index

2008-04-22 Thread Monica Leko
Hi Can I somehow exclude sites and auth from admin index page, and left only django apps? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Requesting clarification on multiple subdomains and sites

2008-04-22 Thread Stephen Hood
Hi there, New to Django and Web server setups and need some help correlating the different pieces to match our needs..I've read thru the site framework, searched the threads here and found a collection of posts that are related to multi-site hosting etc .. but it's still quite a bit to digest

Re: python-ldap: searching without specifying an OU?

2008-04-22 Thread hotani
Right - sorry. I mistyped that. It is correct in my code and reads: DC=server, DC=local. So this works: 'OU=some office, DC=server, DC=local' this does not: 'DC=server, DC=local', nor does this: 'OU=,DC=server,DC=local', nor does any wildcard character I've tried so far. This is the error

Re: python-ldap: searching without specifying an OU?

2008-04-22 Thread Eric Chamberlain
On Apr 22, 2008, at 9:27 AM, hotani wrote: > > I am attempting to pull info from an LDAP server (Active Directory), > but cannot specify an OU. In other words, I need to search users in > all OU's, not a specific one. > > Here is what works: > > con = ldap.initialize("ldap://server.local;) >

python-ldap: searching without specifying an OU?

2008-04-22 Thread hotani
I am attempting to pull info from an LDAP server (Active Directory), but cannot specify an OU. In other words, I need to search users in all OU's, not a specific one. Here is what works: con = ldap.initialize("ldap://server.local;) con.simple_bind_s('[EMAIL PROTECTED]', pass) result =

Re: form.as_table not displaying in template

2008-04-22 Thread Malcolm Tredinnick
On Tue, 2008-04-22 at 09:02 -0700, Explore wrote: > Hi. I am new to django and I am trying to get a handle around the form > processing. I am using the svn trunk Revision: 7419 on Windows with > the development server. I have a views.py setup in my app that looks > like this: > > form =

Re: form.as_table not displaying in template

2008-04-22 Thread Karen Tracey
On Tue, Apr 22, 2008 at 12:02 PM, Explore <[EMAIL PROTECTED]> wrote: > > Hi. I am new to django and I am trying to get a handle around the form > processing. I am using the svn trunk Revision: 7419 on Windows with > the development server. I have a views.py setup in my app that looks > like

Re: form.as_table not displaying in template

2008-04-22 Thread Kenneth Gonsalves
On 22-Apr-08, at 9:32 PM, Explore wrote: > test 1 > > {{ form.as_table }} > > > nothing prints out (maybe because it is trying to print the object > instead of calling the method?) this is correct. It should work, but to diagnose you should post the full template and the full view

Re: Confused on a foriegnkey error

2008-04-22 Thread Karen Tracey
On Mon, Apr 21, 2008 at 12:06 PM, Rishabh Manocha <[EMAIL PROTECTED]> wrote: > > Thanks for writing back, Karen. I guess the snippets of code I > inserted were a little misleading. I have many other modelforms too, > which all have a user = ForeignKey(User) defined. Problem is that I > have to

GeoDjango: distance between PointFields problem

2008-04-22 Thread Nathaniel Whiteinge
I'm calculating the distance between two plain PointFields in the GIS branch using the distance GeoQuerySet method [1] and I'm coming up with some confusing results. The distance between nearby things is often about right, maybe off by a mile or two. But the distance between farther locations is

Re: how do designers create content

2008-04-22 Thread Erik Vorhes
I'm (currently) a low-budget developer, so I'll do mock-ups on graph paper, edit images in Acorn, and then hand code in BBEdit (which I got a great deal on, before TextMate was as robust & awesome as it is now). A good solution for the cost-conscious, aside from TextMate, is Coda. (If you're

form.as_table not displaying in template

2008-04-22 Thread Explore
Hi. I am new to django and I am trying to get a handle around the form processing. I am using the svn trunk Revision: 7419 on Windows with the development server. I have a views.py setup in my app that looks like this: form = TestingForm() print form.as_table() print form.as_table

Re: How to get ':' in address?

2008-04-22 Thread James Aylett
On Tue, Apr 22, 2008 at 05:36:35PM +0200, Thomas Guettler wrote: > AFAIK ':' is not allowed in a URL path. RFC 2396 section 3.3 ("Path Component") suggests otherwise. ":" is a "reserved" character in the URI spec, but that doesn't mean it must be escaped in *all* components of a URI, and in

Re: how do designers create content

2008-04-22 Thread Peter Rowell
To expand on what Kenneth just said: It really depends on the individuals involved. I love the work my primary designer does in Photoshop, but her HTML/CSS makes me cringe. I got her to stop using GoLive to create these Tables From Hell (multi- row/multi-col spans all over the place), but she is

Re: datetime 8 hours off

2008-04-22 Thread Sander Steffann
Hi, > The only safe way to run multiple Django instances with different > timezone settings is to run them in separate processes using mod_wsgi > daemon mode or fastcgi type solutions. We are using runfcgi with protocol=ajp, with proxy_ajp on the Apache side. Works great here. Sander

Re: How to get ':' in address?

2008-04-22 Thread Erik Vorhes
This is more mundane, but ':' is called a colon. On Tue, Apr 22, 2008 at 5:17 AM, Manuel Meyer <[EMAIL PROTECTED]> wrote: > > Hey, > > I wonder how to get a ':' (btw: what's its name in english?) in my > url, so it is shown as : in the address and not as %3A . > > Like wikipedia does: >

Re: How to get ':' in address?

2008-04-22 Thread Thomas Guettler
AFAIK ':' is not allowed in a URL path. Nevertheless there is an open ticket about ':' in URLs: http://code.djangoproject.com/ticket/6621 Thomas Manuel Meyer schrieb: > Hey, > > I wonder how to get a ':' (btw: what's its name in english?) in my > url, so it is shown as : in the address

Re: London Django User Group

2008-04-22 Thread siudesign
I'll be moving this over to http://groups.google.com/group/django-london. Simon Willison, Ross Bruniges, Stuart Colville, Cyril Doussin and I are working on making the London Django User Group a reality. We've decided to name the user group "Djugl", which is pronounced "Juggle" and stands for

Re: guidance on sub-classing models

2008-04-22 Thread Peter Rowell
> I need some guidance on sub-classing a model ... Actually, you can't subclass a model ... anymore / yet. Something like this existed prior to an momentous event called the Magic Removal Branch, which was before my time but appears to have been the Django equivalent of the Spanish Inquisition

2 job positions in Barcelona

2008-04-22 Thread bcurtu
Hi, We are a dotcom company, based in Barcelona,and we are looking for python/django developers to work in a new web 2.0 portal, with international projection. The goal of the project is to build a social network powered with a recommendation engine, in a non-explored segment in Europe. We are

Re: how do designers create content

2008-04-22 Thread Kenneth Gonsalves
On 22-Apr-08, at 7:31 PM, lee wrote: > In the django world of template coding would the artist be the one who > added content to this layout or the programmer? > Would he use a text editor to add the django template code for dynamic > content or something like dreamweaver? a lot depends on the

Re: how do designers create content

2008-04-22 Thread lee
Thanks for all the responses. I want to be more specific, so lets say I have two guys a programmer that manages the back end data and an Artist who does great web designs and can write django template code. For my example lets say the artist came up with a page like this (from vit.dlouhy at

Re: Question about urls.py

2008-04-22 Thread Alex Morega
On Apr 22, 2008, at 16:34 , jmDesktop wrote: > But what I don't understand is the comment on GET. I thought that was > what I was doing. Or am I doing the same thing only wrong? Are you > saying that I should use a querystring in the url like myurl/? > email=theemail=something... instead of

guidance on sub-classing models

2008-04-22 Thread Ken
I have added similar method to my models and forms and would like to factorize them into base classes. The forms part has been straightforward. But, it seems that models is little harder to sub- class. I need some guidance on sub-classing a model or if it's too complicated, that I shouldn't

Re: Question about urls.py

2008-04-22 Thread jmDesktop
I ended up with this (from both of you, thanks): urls.py: (r'^contact/thanks/(?P.*)/$','mysite.books.views.thanks'), and in my views.py: def thanks(request, sender): return render_to_response('books/thanks.html',{'user': sender}) thanks.html: {% extends 'base.html' %} {% block

how to obtain session key after create

2008-04-22 Thread [EMAIL PROTECTED]
hi all please i am unable to find how to obtain sesssion key after i create the session. from http://www.djangoproject.com/documentation/sessions/#using-sessions-out-of-views i save some data from django.contrib.sessions.backends.db import SessionStore s = SessionStore(session_key='')

FileField filename validation examples?

2008-04-22 Thread Kevin Monceaux
Django Fans, Could someone point me towards some examples of validating the filenames/types of uploaded files? Digging through the list archives I came across a post from 2006: http://groups.google.com/group/django-users/browse_thread/thread/ebe1768bce0a01e3/ which has an example of a

Re: Suggestions on UI (client side web) framework to complement Django

2008-04-22 Thread desfrenes
Don't miss JQuery ! On Apr 21, 8:33 pm, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > On Apr 21, 2:13 pm, ydjango <[EMAIL PROTECTED]> wrote: > > > Django is a pretty good framework for server side web development. > > > client side Web development is also very time consuming and painful. > > > For

Re: ANN: This Week in Django 19 - Special Feature Internationalisation

2008-04-22 Thread Michael
I want to thank you guys for this great work. I really enjoy it and it is a great way to keep in touch with what is going on in the Django community. Keep up the awesome job! Michael On Mon, Apr 21, 2008 at 10:59 PM, mtrier <[EMAIL PROTECTED]> wrote: > > I usually refrain from posting this

Re: Quick question about qs-rf and queries using distinct and order_by on foreign key fields

2008-04-22 Thread Malcolm Tredinnick
On Tue, 2008-04-22 at 02:22 -0700, Matt Hoskins wrote: > I see that in the latest svn checkout of qs-rf if you have a query set > which has had distinct() called and then order_by() on a foreign key > field you don't get the ordering on that foreign key field - the > resulting generated sql

Re: Javascript GUI Editor that works with Django templates

2008-04-22 Thread Peter Melvyn
> Since Opera is used by a very very small percentage of web users, > I don't think it would be a major problem in most use cases. My experience says the well behaved applications runs on IS6+, FF2+, Safari3+ and Opera9+ --~--~-~--~~~---~--~~ You received this

Re: Template and Static content

2008-04-22 Thread [EMAIL PROTECTED]
Actually Duke you can use Django to store static content, it is just inefficient, for example if you are doing a school project it is perfectly acceptable but commercial development you want to go and grab Apache. On Apr 22, 7:32 am, Alex Morega <[EMAIL PROTECTED]> wrote: > On Apr 22, 2008, at

Django praised on Meebo blog

2008-04-22 Thread Daniel Hepper
I thought you might find it interesting that Django is used be Meebo and mentioned in a positive way on their blog: "It's worth mentioning that we've been using the Django framework to build the site and that's allowed us to move much faster than if we had hand-coded each page individually. We

user profile for all methods ?

2008-04-22 Thread [EMAIL PROTECTED]
hi all please i have another question about some data. I have created a model for user profile in my app. Edited the settings, and it is working ok. So when user logged in through this method i save this to variable and i am able to call it from this method. But what if i needed to call this

Re: datetime 8 hours off

2008-04-22 Thread Graham Dumpleton
Andrew Durdin wrote: > On Apr 4, 1:16�pm, Simon Oberhammer <[EMAIL PROTECTED]> > wrote: > > Magus on IRC told me that multiple django projects with different > > timezones serverd by apache / mod_python could be a problem - ie one > > changing TZ in a thread that also servers the other

Re: How to use ImageField to save images to dynamic path

2008-04-22 Thread PENPEN
How do you mean of changing request.FILES there itself? I tried to add the directory to request.FILES but failed. Django ignored the directory and savethe image to the MEDIA_ROOT not MEDIA_ROOT/images. class Thing(models.Model): photo = models.ImageField( upload_to='images/',

Re: Paginator Help

2008-04-22 Thread Peter Melvyn
On 4/21/08, DuncanM <[EMAIL PROTECTED]> wrote: > Please could someone have a look through and see what I'm missing? I'm not a Django skilled user, but I use the similiar pagination and what I see at glance is, that you mix paginator's template with view's template. ### Paginator is inclusion

Re: Javascript GUI Editor that works with Django templates

2008-04-22 Thread John Hensley
On Apr 21, 2008, at 10:44 PM, blis102 wrote: > p.s. FCKeditor's connector feature, which allows you to browse your > server to insert images, files, and flash, is highly useful, although > I have not gotten to get it to work with django yet. There is a google > code project called fckconnector

Re: DateField widget, ModelForm and javascript

2008-04-22 Thread Guillaume Lederrey
2008/4/22 Peter Melvyn <[EMAIL PROTECTED]>: > > On 4/21/08, Rishabh Manocha <[EMAIL PROTECTED]> wrote: > > > I'd be interested in knowing how to get it to show up too (what JS/CSS > > files need to be added, whether there is some setting we can use in > > the python code itself or do we

Re: datetime 8 hours off

2008-04-22 Thread Andrew Durdin
On Apr 4, 1:16 pm, Simon Oberhammer <[EMAIL PROTECTED]> wrote: > Magus on IRC told me that multiple django projects with different > timezones serverd by apache / mod_python could be a problem - ie one > changing TZ in a thread that also servers the other project. > > So I set timezone-setting

Re: Template and Static content

2008-04-22 Thread Alex Morega
On Apr 22, 2008, at 14:30 , Duke wrote: > Can i use Template directory or its subdirectory to store the static > content(JPG, CSS, JS GIF). No, the preferred way is to serve those files separately (see http://www.djangoproject.com/documentation/static_files/ ).

Template and Static content

2008-04-22 Thread Duke
Can i use Template directory or its subdirectory to store the static content(JPG, CSS, JS GIF). Pls comment on this topic Thank Duke --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

easy to get money soho life style

2008-04-22 Thread lyh3147
HOMEPAGE: http://www.brandedsite.com CONTACT: [EMAIL PROTECTED] PAYMENT: Western Union / Bank of china / paypal We are a proffesional asian wholesaler of --wholesale cheap Nike Sneakers: Air Force One,Air Jordans1-22, Jordan2.2,Jordan2.5,3.5,4.5,

Break mobile phone brand fashion trend

2008-04-22 Thread lyh3147
http://www.brandedsite.com/ [EMAIL PROTECTED] Nike Air Jordan 1 ,Nike Air Jordan 2 Shoes,Nike Air Jordan 3,Nike Air Jordan 4 Shoes ,Nike Air Jordan 5 Chaussure Shoes,Nike Air Jordan 6 Catalog ,Nike Air Jordan 7 Shoes Catalog , Nike Air Jordan 8 Customized ,Nike Air Jordan 9 Shoes Customized

Summing monetary values

2008-04-22 Thread Tim Sawyer
Hi Folks, I have a Donation object in my model which includes: amount = models.DecimalField(max_digits=12,decimal_places=2,core=True) patron = models.ForeignKey(Patron) From my Patron object, I want to select the total donations for that patron, so something like: def

Re: Template path error

2008-04-22 Thread Gaurav
Hi All, Please help me with this issue. I have created a template folder at C:/python25/django/templates and I have updated the settings.py file with "forward slashes" in path. When I hit the url, it gives me the following error. c:\python25\django\templates\current_datetime.html (File does

Help

2008-04-22 Thread sexylany
I need some help with the following site http://href.hu/x/5ex4 . I cant make it work, whats the problem? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Best practices sending out http requests from within django code

2008-04-22 Thread DanB
Guys, thank you all for tips. All clear now. Cheers, DanB On Apr 19, 1:55 am, Peter Rowell <[EMAIL PROTECTED]> wrote: > > I've been using urllib2 very effectively - do be careful with it though > > I second this (both halves). Very easy to use. > > The only gotcha I encountered was making sure

How to get ':' in address?

2008-04-22 Thread Manuel Meyer
Hey, I wonder how to get a ':' (btw: what's its name in english?) in my url, so it is shown as : in the address and not as %3A . Like wikipedia does: http://en.wikipedia.org/wiki/Portal:Arts If i try def get_absolute_url(self): return '/top-category:'+self.title_plural it gets

Re: Threadedcomments works on Mac, but not on Debian

2008-04-22 Thread Manuel Meyer
I twisted some letters in the urls-entry Am 19.04.2008 um 22:28 schrieb Manuel Meyer: > Hey, > as described here [1] I get an NoReverseMatch error on debian when > using django-threadedcomments, while everything works well an mac. > > In both cases I use 0.97-pre-SVN-7436. > > Does anybody

Re: CommaSeparatedEmailField

2008-04-22 Thread Berco Beute
Ah, Django's documentation is a treasure: http://www.djangoproject.com/documentation/newforms/#a-simple-example --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: DateField widget, ModelForm and javascript

2008-04-22 Thread Peter Melvyn
On 4/21/08, Rishabh Manocha <[EMAIL PROTECTED]> wrote: > I'd be interested in knowing how to get it to show up too (what JS/CSS > files need to be added, whether there is some setting we can use in > the python code itself or do we have to print out each field > independently and insert the

Quick question about qs-rf and queries using distinct and order_by on foreign key fields

2008-04-22 Thread Matt Hoskins
I see that in the latest svn checkout of qs-rf if you have a query set which has had distinct() called and then order_by() on a foreign key field you don't get the ordering on that foreign key field - the resulting generated sql query has the joins for the foreign table ready to be used for the

Re: Can't get ThreadLocals (user in threadlocal storage) working.

2008-04-22 Thread Hilbert Schraal
Thanks for the tip. I fiddled around with the imports, but no results :( On 20 apr, 21:33, Doug B <[EMAIL PROTECTED]> wrote: > Its been a while, but I had problems getting this to work at first > too. It turned out to be how I was importing the module that > contained thread locals. I

Re: Can't get ThreadLocals (user in threadlocal storage) working.

2008-04-22 Thread Hilbert Schraal
check, that was a bit stupid :) On 21 apr, 15:16, "Marty Alchin" <[EMAIL PROTECTED]> wrote: > On Sun, Apr 20, 2008 at 10:45 AM, Hilbert Schraal > > <[EMAIL PROTECTED]> wrote: > > # Make this unique, and don't share it with anybody. > > SECRET_KEY = '[EMAIL

Re: File upload with no database - Fantasy or reality?

2008-04-22 Thread python_fan
On Apr 22, 10:32 am, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > On 22-Apr-08, at 1:23 PM, python_fan wrote: > > >>> Can I see a working example? I tried various things, and it almost > >>> worked (I got a widget on the page, got an upload button, etc), but > >>> nothing happens when i press

Re: File upload with no database - Fantasy or reality?

2008-04-22 Thread Kenneth Gonsalves
On 22-Apr-08, at 1:23 PM, python_fan wrote: >>> Can I see a working example? I tried various things, and it almost >>> worked (I got a widget on the page, got an upload button, etc), but >>> nothing happens when i press Upload/Submit. >> >> paste your view and template please > > I guess the

Re: using zope.interface with Django models

2008-04-22 Thread Robert Gravina
On 22/04/2008, at 3:37 PM, Robert Gravina wrote: > Hi All, > > Others have experiemented with using the zope component architecture > in Django, with great results: > http://www.stereoplex.com/two-voices/adapters-in-django-and-the-revenge-of-zope > > I'd really like to make use of it too, but

Re: Can't get ThreadLocals (user in threadlocal storage) working.

2008-04-22 Thread Hilbert Schraal
Some extra info. I printed the _thread_locals variable in the get_current_user() method and in the process_request() method. They are different: middleware: get_current_user: Here's the threadlocals.py: import logging try: from threading import local except ImportError: from

Re: File upload with no database - Fantasy or reality?

2008-04-22 Thread python_fan
On Apr 22, 9:41 am, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > On 22-Apr-08, at 1:00 PM, python_fan wrote: > > >>> yes - just get the filename and content from request.POST and > >>> save it > >>> wherever you like using ordinary python > > >> oops - from request.FILES > > > Great! Thanks! >

Re: File upload with no database - Fantasy or reality?

2008-04-22 Thread Kenneth Gonsalves
On 22-Apr-08, at 1:00 PM, python_fan wrote: >>> yes - just get the filename and content from request.POST and >>> save it >>> wherever you like using ordinary python >> >> oops - from request.FILES >> > > Great! Thanks! > > Can I see a working example? I tried various things, and it almost >

Re: Basic ModelForm operation question

2008-04-22 Thread zmalloc
Unless your model has defined columns with unique_together, and the form attempts to save fields which violate the constraint. In that case, an integrity exception is raised because ModelForm does not currently valid it. You must perform this validation yourself. On Apr 19, 10:20 pm, Malcolm

Re: File upload with no database - Fantasy or reality?

2008-04-22 Thread python_fan
On Apr 22, 9:30 am, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > On 22-Apr-08, at 12:54 PM, Kenneth Gonsalves wrote: > > >> So, my question is: Is it possible to add file upload functionality > >> (upload file from client to server -> save it on server somewhere -> > >> pass the path to python

Re: File upload with no database - Fantasy or reality?

2008-04-22 Thread Kenneth Gonsalves
On 22-Apr-08, at 12:54 PM, Kenneth Gonsalves wrote: >> So, my question is: Is it possible to add file upload functionality >> (upload file from client to server -> save it on server somewhere -> >> pass the path to python code on the server) without any underlying >> databases? > > yes - just

Re: File upload with no database - Fantasy or reality?

2008-04-22 Thread Kenneth Gonsalves
On 22-Apr-08, at 12:42 PM, python_fan wrote: > So, my question is: Is it possible to add file upload functionality > (upload file from client to server -> save it on server somewhere -> > pass the path to python code on the server) without any underlying > databases? yes - just get the

File upload with no database - Fantasy or reality?

2008-04-22 Thread python_fan
Hey! Currently, I'm having a project where I use django to generate some simple web pages. I don't want to use a database in this project since it is really small and it suits me very well that way. However, as far as I can see, it seems like file upload via django (using newforms & FileField)

Newforms-admin - Problem prepopulating an inline slug field

2008-04-22 Thread tenni
I'm trying to prepopulate a slug field with newforms-admin. It works fine for the 'normal' Article model, but the inline Photo model's slug field won't prepopulate from it's title field. (If the code below doesn't make sense, I can paste the whole model.) Two models: Article and Photo in the

[Newforms-admin] Prepopulating a slug field in an inline

2008-04-22 Thread tenni
I'm trying to prepopulate a slug field with newforms-admin. It works fine for the 'normal' Article model, but the inline Photo model's slug field won't prepopulate from it's title field. (If the code below doesn't make sense, I can paste the whole model.) Two models: Article and Photo in the