Re: full-text indexing

2007-08-08 Thread Gábor Farkas
Jarek Zgoda wrote: > I don't know what do you mean by "transactions" in case of full-text > search engine as it doesn't do any multi-step updates (only single- > step deletes or inserts in case of PyLucene). > > Anybody who wants to use PyLucene, be aware that you cann't embed (iow > "use", "impo

Re: Single-line comment doesn't seem to work

2007-08-08 Thread Collin Grady
What version of django are you using? I seem to remember the single line comments being added after 0.96, though I could be mistaken. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: How to specify engine type for particular table?

2007-08-08 Thread Collin Grady
Nope. You have to change that manually. --~--~-~--~~~---~--~~ 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 e

Re: Overriding save methot problem

2007-08-08 Thread Collin Grady
There is no solution, really - the links can't be added until the model is saved, so they will not be available in save() The only way you could work with m2m data is in a custom view, since then you can connect them and do whatever. --~--~-~--~~~---~--~~ You rec

Re: DateField() , AttributeError: 'str' object has no attribute 'strftime'

2007-08-08 Thread Collin Grady
This is not a backend issue at all - the problem is you're assigning a string to the DateField, which is not what it needs. DateField/TimeField/DateTimeField need the python objects for them, not strings. They convert it to a string internally before save, so that the database gets the right val

Re: Changing filter_interface for groups in User model?

2007-08-08 Thread Collin Grady
Only if you edit the django source :) --~--~-~--~~~---~--~~ 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 ema

django.views.generic.simple

2007-08-08 Thread james_027
hi, is the purpose of this view for showing static html page? if not what is the use of this view? Thanks james --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send ema

Re: Changing filter_interface for groups in User model?

2007-08-08 Thread Jarek Zgoda
On 8 Sie, 09:53, Collin Grady <[EMAIL PROTECTED]> wrote: > Only if you edit the django source :) God, I was hoping we wouldn't have to do that... :( Cheers J. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Djang

Overwriting the login function

2007-08-08 Thread Matt Davies
I've copied the /contrib/auth/views.py into my project and edited it like so redirect_to = request.META["HTTP_REFERER"] return render_to_response(template_name, { 'form': oldforms.FormWrapper(manipulator, request.POST, errors), 'matts_back_to': redirect_to, 'site_name': Site.objects.g

Re: value for choices arguments for newforms.MultipleSelectField

2007-08-08 Thread Peter Melvyn
On 8/7/07, Chris Brand <[EMAIL PROTECTED]> wrote: > self.fields[f].queryset = queryset > # Have to force the widget to update itself (bug 4787) > self.fields[f].widget.choices = self.fields[f].choices Hi Chris, thanks for your help - it solved my problem,

Re: Overwriting the login function

2007-08-08 Thread Matt Davies
Getting there. It's not setting the logged in as yes as it's not logging me in :-) This conditional in the login function in views if request.POST: is not getting a positive and it's falling through to the else which is setting errors to blank else: print 'balls' errors = {}

https://simon.bofh.ms/cgi-bin/trac-django-projects.cgi/file/cms/trunk/apps/cms/search.py whyit is not working any more

2007-08-08 Thread Mary
I just want to take a look on the search.py there as i need to use search in my cms and i tried this lin https://simon.bofh.ms/cgi-bin/trac-django-projects.cgi/file/cms/trunk/apps/cms/search.py but it is not working any help ?? Thanks Mary Adel --~--~-~--~~~---~--~--

Re: Overwriting the login function

2007-08-08 Thread Matt Davies
Ok, I'm now using the login_required decorator, much better one problem though, here's a snippet of a form http://pastie.caboo.se/85932 How do I check the IP prior to askign for a login check, and if the IP is good, not ask for login? I'm stumped On 08/08/07, Matt Davies <[EMAIL PROTECTED]>

Re: Using Filter on a list of objects?

2007-08-08 Thread Nis Jørgensen
Greg skrev: > Tim, > I added your code into my view. However, it seems to error out on me > when I get to the line 'if 'color' in request and request['color'] <> > NO_COLOR: '. The error says: > > KeyError at /rugs/searchresult/ > '0 not found in either POST or GET' > The error message indica

Can't see the SQL queries being executed by Django

2007-08-08 Thread AnaReis
Hi, I've been having some problems in the project I'm building with Django and a legacy MySQL database. I needed to see the SQL queries that are being executed by Django. I have DEBUG=true in the settings file. I opened a python shell and typed: >>> from django.db import connection >>> connection.

Re: django.views.generic.simple

2007-08-08 Thread Chris Hoeppner
This view is useful for showing static "process done" messages, where you actually might need a bit of context, like a username of confirmation number. Any page that doesn't need anything more complex than echoing a few vars, can be done with this. If what you really need is absolutely static page

Commenting on Comments

2007-08-08 Thread Ramdas S
How do I use the comments framework, so that users can comment on comments made by others? The free comments example does not Is it possible without hacking the comments app? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Will Django.core.validators remain stable

2007-08-08 Thread Ramdas S
It is clear that old forms and manipulators will be replaced with new forms. But what about Django.core.validators. Will that too go off? If so, what do we use? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Djang

Re: Can't see the SQL queries being executed by Django

2007-08-08 Thread Jeremy Dunck
On 8/8/07, AnaReis <[EMAIL PROTECTED]> wrote: > I have DEBUG=true in the settings file. Perhaps you mean DEBUG = True? The case of "true" matters. > I opened a python shell and typed: > >>> from django.db import connection > >>> connection.queries > [] Had you previously done queries using tha

Re: Can't see the SQL queries being executed by Django

2007-08-08 Thread AnaReis
On Aug 8, 12:53 pm, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote: > On 8/8/07, AnaReis <[EMAIL PROTECTED]> wrote: > > > I have DEBUG=true in the settings file. > > Perhaps you mean DEBUG = True? The case of "true" matters. > > > I opened a python shell and typed: > > >>> from django.db import conne

Re: Can't see the SQL queries being executed by Django

2007-08-08 Thread AnaReis
On Aug 8, 12:53 pm, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote: > On 8/8/07, AnaReis <[EMAIL PROTECTED]> wrote: > > > I have DEBUG=true in the settings file. > > Perhaps you mean DEBUG = True? The case of "true" matters. > > > I opened a python shell and typed: > > >>> from django.db import conne

automatic form submission

2007-08-08 Thread cesco
Hi, I need to retrieve automatically some information from an e-commerce site. The site doesn't offer any API, so the only way to perform the search is via the form they provide. The form is submitted via a POST method and the URL doesn't change after clicking the search button even if I select d

database permissions

2007-08-08 Thread Stephen Bunn
Perhaps I am wrong, or just going about this the wrong way, but I have been looking the Django documentation and asking around in #django and nobody can (or do not want to) give me a straight answer and the minimum database permissions Django needs to operate. So I am assuming that everybody is

Re: automatic form submission

2007-08-08 Thread Nimrod A. Abing
On 8/8/07, cesco <[EMAIL PROTECTED]> wrote: > > Hi, > > I need to retrieve automatically some information from an e-commerce > site. > The site doesn't offer any API, so the only way to perform the search > is via the form they provide. The form is submitted via a POST method > and the URL doesn't

Re: automatic form submission

2007-08-08 Thread Thejaswi Puthraya
> 1. check a specific checkbox in the search form > 2. submit the search form > 3. save in a file the html source of the webpage displaying the search > results Try ClientForm...it is an awesome library for this purpose. Check it out at http://wwwsearch.sourceforge.net/ Cheers Thejaswi Puthraya

Error from URLs with non-ascii characters and that need login

2007-08-08 Thread web-junkie
Hi, I get that error emailed, apparently Google tries to crawl pages that need a login. Now when there's Unicode in the URL this error is raised. Can anyone tell me why I get this error? It's really just Google's crawl, when I surf the site everything works fine. Traceback (most recent call last

Re: DateField() , AttributeError: 'str' object has no attribute 'strftime'

2007-08-08 Thread Russell Keith-Magee
On 8/8/07, Collin Grady <[EMAIL PROTECTED]> wrote: > > This is not a backend issue at all - the problem is you're assigning a > string to the DateField, which is not what it needs. You are completely correct. I saw the error message, saw it was similar to a problem I was triaging recently, an

Re: database permissions

2007-08-08 Thread Kenneth Gonsalves
On 08-Aug-07, at 6:51 PM, Stephen Bunn wrote: > Is there any documentation anywhere that describes setting up correct > database permissions for use with Django. use whatever permissions you are happy with. As long as the user under which django accesses the database, can do everything django

Re: How to add a javascript calendar to date textboxes

2007-08-08 Thread [EMAIL PROTECTED]
I've done that, and it's not hard, but there's quite a few good js datepickers out there, and on my most recent one I used one of those gives me a bit more control over how I want it to look on the public-facing part, and I'm not making 5 http calls to do it. Here's the one I went with: http:

Re: database permissions

2007-08-08 Thread Stephen Bunn
Kenneth Gonsalves wrote: > > On 08-Aug-07, at 6:51 PM, Stephen Bunn wrote: > > use whatever permissions you are happy with. As long as the user > under which django accesses the database, can do everything django > requires to be done, it's fine. I dont think this is any different > from a

Re: database permissions

2007-08-08 Thread Kenneth Gonsalves
On 08-Aug-07, at 7:19 PM, Stephen Bunn wrote: > therein lies the problem. What is 'everything' that Django > requires to > be done? > > I know it obviously needs to be able to execute SELECT, UPDATE, and > INSERT statements, but what about ALTER? SHOW? does it need to create > views? create i

(1040, 'Too many connections')

2007-08-08 Thread Michel Thadeu Sabchuk
Hi guys! I´m having a problem with a django site, sometimes my server stuck and goes down. Just before it happens I receive about 200 traceback messages telling me the same error: (1040, 'Too many connections'), I get these messages in an interval of 1 minutes. I changed mysql configuration and s

Re: database permissions

2007-08-08 Thread Hongqing Li
You need certain permissions to setup the superuser account, although I don't know which, only Select,Update and Insert are not enough for setup the superuser account. On 8/8/07, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > > > > On 08-Aug-07, at 7:19 PM, Stephen Bunn wrote: > > > therein lies t

Re: database permissions

2007-08-08 Thread Stephen Bunn
Kenneth Gonsalves wrote: > > > you have to divide the tasks into those that you want to do through > django and those that you want to do outside django - django needs > permissions to do the first set. I dont think one can be clearer than > that. > Understandable. But for somebody new

Re: database permissions

2007-08-08 Thread Andrey Khavryuchenko
Steve, SB> Perhaps I am wrong, or just going about this the wrong way, but I have SB> been looking the Django documentation and asking around in #django and SB> nobody can (or do not want to) give me a straight answer and the minimum SB> database permissions Django needs to operate. So I am

testing

2007-08-08 Thread nikolay marinov
Hi,there.I'm a young tester (4 months,still learning what is "testing software!?!"). I work on Linux and i write my tests with Python. Our assignment is to build a module from our 'BIG' program that have to be able to edit xls files, without using MSExcel, OpenOffice or something like that,

Re: testing

2007-08-08 Thread Hodren Naidoo
try sending this to the python mailing list. On Wed, 2007-08-08 at 17:18 +0300, nikolay marinov wrote: > Hi,there.I'm a young tester (4 months,still learning what is "testing > software!?!"). I work on Linux and i write my tests with Python. > Our assignment is to build a module from our 'BI

A question on lists and sorting, to prepare for a template

2007-08-08 Thread drkfce
I have a views code that produces a dictionary like the one below, and I want to get them in order in accordance to the keys within the dicts; how can one do that? Example: {'Breakfast':[{'day':'1', 'main_course':'pancakes', 'beverage':'milk'}, {'day':'3', 'main_course':'cereal', 'beverage':'ora

Re: How to add a javascript calendar to date textboxes

2007-08-08 Thread Noam Raphael
It looks great, thanks! Noam On 8/8/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I've done that, and it's not hard, but there's quite a few good js > datepickers out there, and on my most recent one I used one of > those gives me a bit more control over how I want it to look on > the

Why aren't my flatpages working?

2007-08-08 Thread [EMAIL PROTECTED]
OK, I've looked over this again: http://www.djangoproject.com/documentation/flatpages/ I've got MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'd

Re: Why aren't my flatpages working?

2007-08-08 Thread Jay Parlar
On 8/8/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > OK, I've looked over this again: > http://www.djangoproject.com/documentation/flatpages/ > > I've got > MIDDLEWARE_CLASSES = ( > 'django.middleware.common.CommonMiddleware', > 'django.contrib.sessions.middleware.SessionMiddleware'

Re: Why aren't my flatpages working?

2007-08-08 Thread [EMAIL PROTECTED]
I believe so. There's only one, and the domain matches the site domain. In the DB, it has the ID 1. Not seeing anything wrong there. On Aug 8, 10:28 am, "Jay Parlar" <[EMAIL PROTECTED]> wrote: > On 8/8/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > > > > OK, I've looked over this again

Re: Why aren't my flatpages working?

2007-08-08 Thread [EMAIL PROTECTED]
Unless it's the subdomain... I've got it set up as test.domain.com, could that hose it? Should I just have domain.com? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, sen

Re: django app for managing sending email to users...

2007-08-08 Thread James Tauber
I've checked in a first pass at the lowest layer of the architecture: the queue and send loop, don't send list and log. http://code.google.com/p/django-mailer/ It doesn't actually send email at the moment, just tells you it's done so, but it's enough to show how the bottom layer works. I've

Re: Why aren't my flatpages working?

2007-08-08 Thread Jay Parlar
On 8/8/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Unless it's the subdomain... I've got it set up as test.domain.com, > could that hose it? Should I just have domain.com? Not really sure :) All I know is that I've had 404s with flatpages before, and it's always because I forgot to chang

Re: django app for managing sending email to users...

2007-08-08 Thread James Tauber
On 07/08/2007, at 10:16 AM, Kai Kuehne wrote: > Just a question: > Why not add this bulk-email-support in the first place? E.g., the > function would > take a list of contrib.auth.models.User objects and iterate over > it. You could > check whether it's a QuerySet and cast it to list if needed

Re: {SPAM 01.3} Re: django app for managing sending email to users...

2007-08-08 Thread James Tauber
On 07/08/2007, at 11:42 AM, Ramdas S wrote: > > I am not very sure whether the bulk-mail support personalization. > > I think that should be an important feature. Yes, it will support templates with the user passed in the context. James --~--~-~--~~~---~--~~ Yo

Re: Why aren't my flatpages working?

2007-08-08 Thread [EMAIL PROTECTED]
I dunno. Never had a problem with them before. Lemme try the subdomain thing. On Aug 8, 10:36 am, "Jay Parlar" <[EMAIL PROTECTED]> wrote: > On 8/8/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > > Unless it's the subdomain... I've got it set up as test.domain.com, > > could that hose it?

Comments framework

2007-08-08 Thread Ramdas S
I had asked this earlier. May be it was not clear. I am able to use both comments and free comments from Django Comments framework. However, I am not able to figure out how I can get users to make comments on comments posted by others. I think this must be trivial and the framework developers alr

Re: Why aren't my flatpages working?

2007-08-08 Thread Jay Parlar
On 8/8/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I dunno. Never had a problem with them before. Lemme try the subdomain > thing. Also, make sure you've got all the correct templates and everything, as described in the documentation. That's caused issues for me as well. Jay P. --~--~-

Re: django app for managing sending email to users...

2007-08-08 Thread Kai Kuehne
Sure, that's not the point. The point is that the user has to give the function a QuerySet. Imho, it should be a QureySet *or* a list.. was just an idea. You're the boss. :-) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google G

Re: Why aren't my flatpages working?

2007-08-08 Thread [EMAIL PROTECTED]
On Aug 8, 10:48 am, "Jay Parlar" <[EMAIL PROTECTED]> wrote: > On 8/8/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > > I dunno. Never had a problem with them before. Lemme try the subdomain > > thing. > > Also, make sure you've got all the correct templates and everything, > as described

Sexy - Nude - Uncensored - Updated Hollywood Videos and Wallpapers.....

2007-08-08 Thread nehaishot
Hey guys just logon to http://hollywoodvideos.besttofind.com to get hot by seeing unplugged wallpapers and hot unresistable hollywood videos http://hollywoodvideos.besttofind.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: database permissions

2007-08-08 Thread James Bennett
On 8/8/07, Stephen Bunn <[EMAIL PROTECTED]> wrote: > Understandable. But for somebody new to an ORM type model (like me) > things might not be so clear. If I am writing a PHP or Perl > application, I know exactly what permission it needs because I am > constructing the SQL. With Django, it is b

Re: full-text indexing

2007-08-08 Thread Joseph Heck
There was a very impressive demonstration of SOLR at OSCON this year, and it looks very, very easy to set up for light(i.e. reasonable but not-heavy) usage. The default install comes pretty much ready to roll - you'll have to tweak out a "schema" description of what you're indexing, and work on a

Re: Will Django.core.validators remain stable

2007-08-08 Thread Vincent Foley
Use validators in newforms. class MyForm(newforms.Form): secret_phrase = newforms.CharField(label='Secret phrase', required=True) def clean_secret_phrase(self): if self.cleaned_data.get('secret_phrase') == 'xyzzy': return True else: raise newforms.

Re: database permissions

2007-08-08 Thread [EMAIL PROTECTED]
On Aug 8, 9:49 am, Stephen Bunn <[EMAIL PROTECTED]> wrote: > I know it obviously needs to be able to execute SELECT, UPDATE, and > INSERT statements, but what about ALTER? SHOW? does it need to create > views? create indexes? what about locking tables and creating temporary > tables? The true min

Re: django app for managing sending email to users...

2007-08-08 Thread James Tauber
My point is that you just need an iterable. Both lists and QuerySets meet this requirement. There is no casting in Python. You don't need to "cast" a QuerySet to a list. James On 08/08/2007, at 12:05 PM, Kai Kuehne wrote: > > Sure, that's not the point. The point is that the user has to >

Testing/Fixtures/Production/TestRunner

2007-08-08 Thread Chris Green
Good day, I'm running into some confusion on the intended way to architect tests/ users/etc. I've been playing with the latest SVN snapshot. I've currently got my test cases setup around: 1) Setup Custom Users, Groups,Permissions that are used for all test cases 2) Change out my authenticatio

Re: django app for managing sending email to users...

2007-08-08 Thread Kai Kuehne
Hi, On 8/8/07, James Tauber <[EMAIL PROTECTED]> wrote: > My point is that you just need an iterable. Both lists and QuerySets > meet this requirement. > > There is no casting in Python. You don't need to "cast" a QuerySet to > a list. Sorry.. I mixed my thoughts a bit. I shouldn't post to the li

RE: value for choices arguments for newforms.MultipleSelectField

2007-08-08 Thread Chris Brand
Hi Peter, > What should I pass as a dummy queryset parameter: this is positional > mandatory argument and I cannot pass None. If you're going to replace it before you render the form, it really doesn't matter - any queryset will do. I used .objects.all(), but that has the disadvantage of actua

Cookie in MSIE7

2007-08-08 Thread Michal
Hello, I have problem with setting cookie expiration in Django. I have this code in view (I am using django.views.generic.list_detail): [...] ret = object_list( request, queryset = queryset, template_name = "journals/list.html", allow_empty = True ) ret.se

can't unlink, move files

2007-08-08 Thread Enoch
Hi I have a question about how to manipulate files by os.unlink() and shutil.move() If I write a script like this === #!/usr/bin/python os.unlink('afile.txt') === there is no problem, but if I write one function in django views.py ==

Python/Django n00b having problems with flup/fastcgi .

2007-08-08 Thread John Menerick
I'm having trying to get django, to serve content with fastcgi. I have installed flup version. Django/FCGI appears to hang and become unresponsive. For testing purposes, I have created a blank project, django-admin.py startproject mysite . Inside the project's shell, python manage.py shell ,

nova

2007-08-08 Thread knjaz milos
proba --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more o

Re: can't unlink, move files

2007-08-08 Thread Forest Bond
Hi, On Wed, Aug 08, 2007 at 12:08:17PM -0700, Enoch wrote: > I have a question about how to manipulate files by os.unlink() and > shutil.move() [...] > I always get the error > OSError: [Errno 13] Permission denied: afile.txt' To move or unlink a file, the user your code is running as needs to

Tuning - Styling

2007-08-08 Thread knjaz milos
Cool cars, tuning & styling, here you can find many tuned cars with tons of pictures!!! http://tuning-styling.blogspot.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this gr

Single-object serializers?

2007-08-08 Thread Shawn Allen
Hey everyone, I'm about to tackle an API that supports multiple response formats using serializers. I realize that the API (as simple as it is) is subject to change, but it seems like a totally sensible pattern for what I'd like to do. One problem I've come across already is that the base

Re: Using Filter on a list of objects?

2007-08-08 Thread Greg
Nis, Thanks for the help. We'll I got my view to work for website visitors searching by any combintation of Size, Price, and Color. My code is not the most efficient and I wonder how the performance is going to be once I add more products and take it off of developmental version and into a produ

Re: Using Filter on a list of objects?

2007-08-08 Thread Collin Grady
Why are you doing request['price'] ? Do you perhaps mean request.POST['price'] or request.GET['price'] ? :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Six Figure Income

2007-08-08 Thread SFI
Start Your Own Profitable Internet Business From Home. Since 1998, SFI has been leading the Internet income revolution with its cutting edge affiliate program that empowers even average people to earn $20, $50, even $100 per hour working from their home computer. SFI has shown millions of men and

Re: Using Filter on a list of objects?

2007-08-08 Thread Greg
Collin, Doesn't request['price'] return the same as request.POST['price']? assert False, request['price'] assert False, request.POST['price'] They both return 1 (in my example) I guess it would be better to make sure it's the price variable that's been posted. I've made the change. Thanks

Re: can't unlink, move files

2007-08-08 Thread Enoch
Hi Thanks for your reminding, I think the code works now. Kind Regards On Aug 8, 10:33 pm, Forest Bond <[EMAIL PROTECTED]> wrote: > Hi, > > On Wed, Aug 08, 2007 at 12:08:17PM -0700, Enoch wrote: > > I have a question about how to manipulate files by os.unlink() and > > shutil.move() > > [...]

I am not able to run custom SQL commands

2007-08-08 Thread Peter Melvyn
Hi all, I am not able to run custom SQL commands and I cannot discover what is the reason: 1. My models reside in bizweb/wss/models/ package 2. bizweb.wss application is included in INSTALLED_APPS 3. I use customized settings files: local-settings referring common-settings --> I run dja

Re: Python/Django n00b having problems with flup/fastcgi .

2007-08-08 Thread RajeshD
> I attempt to run the project with fastcgi instead of > runserver, python manage.py runfcgi protocol=fcgi daemonize=false > host= port= . No errors or warnings are sent to the > screen. When I attempt to view the site on my browser, the django > fastcgi script instance does not respond in any m

Showing a Maintenance Page

2007-08-08 Thread cwurld
I do my development locally on windows xp. When things are the way I want them, I upload the code to a linux based shared server. Occasionally, even thought the code works locally, it breaks the live site. This would be much less of a problem if I could display a static page describing to the use

direct_to_template and extra_content

2007-08-08 Thread tyman26
Is it possible to use a parameter from the url with the extra_content dictionary when using the generic direct_to_template? I know it executes functions within the extra_content right before loading the template, so I would think you should be able to access this someone. Any help would be much a

Re: Sexy - Nude - Uncensored - Updated Hollywood Videos and Wallpapers.....

2007-08-08 Thread Levi McCallum
How do we block spam? On Aug 8, 6:11 am, nehaishot <[EMAIL PROTECTED]> wrote: > Hey guys just logon tohttp://hollywoodvideos.besttofind.comto get > hot by seeing unplugged wallpapers and hot unresistable hollywood > videoshttp://hollywoodvideos.besttofind.com --~--~-~--~~---

Re: Showing a Maintenance Page

2007-08-08 Thread James Bennett
On 8/8/07, cwurld <[EMAIL PROTECTED]> wrote: > Occasionally, even thought the code works locally, it breaks the live > site. This would be much less of a problem if I could display a static > page describing to the users that the site is temporarily unavailable > because of maintenance. The templ

Templates: dynamic attribute referencing?

2007-08-08 Thread rskm1
(I know I can't simply _NEST_ {{}}'s in a template, but I'm using it as pseudosyntax to help express what I'm _trying_ to do.) Is there any way, in a template, to get an attribute of an object when the NAME of that attribute is dynamic (i.e. in/from another object)? What I really want is: {{

Re: A question on lists and sorting, to prepare for a template

2007-08-08 Thread RajeshD
{'Breakfast':[{'day':'1', 'main_course':'pancakes', 'beverage':'milk'}, {'day':'3', 'main_course':'cereal', 'beverage':'orange_juice'}, {'day':'2', 'main_course':'waffles', 'beverage':'milk'}], 'Supper': [{'day':'1', 'main_course':'spaghetti', 'beverage':'water'}, {'day':'2', 'main_course':'pork_c

Re: Using Filter on a list of objects?

2007-08-08 Thread Tim Chase
> If anybody has any suggestions on how to make the code more > optimized would be appreciated. Here is my view: First, a style issue: it's considered bad form to shadow the python built-in "dict" by using a variable with the same name. Second, my eyes are bleeding from the convolution of tha

Re: Single-line comment doesn't seem to work

2007-08-08 Thread [EMAIL PROTECTED]
Thanks for all the replies! I am using 0.95, maybe that's why it doesn't work. ~cw On Aug 8, 12:42 am, Collin Grady <[EMAIL PROTECTED]> wrote: > What version of django are you using? I seem to remember the single > line comments being added after 0.96, though I could be mistaken. --~--~--

Re: Templates: dynamic attribute referencing?

2007-08-08 Thread Doug B
See if this tag won't work for you: class ObjectAttribNode(template.Node): def __init__(self, obj, attr): self.obj = obj self.attr = attr def render(self, context): print self.attr try: obj = resolve_variable(self.obj, context) attr

Re: Using Filter on a list of objects?

2007-08-08 Thread Greg
Tim, Thanks for the reply. Very helpful. In the past I did try the statement: if 'price' in request and request['price'] <> NOT_PICKED: However when that line was accessed I would get the following error: KeyError at /rugs/searchresult/ '0 not found in either POST or GET' /

Re: Using Filter on a list of objects?

2007-08-08 Thread Tim Chase
> Thanks for the reply. Very helpful. In the past I did try the > statement: > > if 'price' in request and request['price'] <> NOT_PICKED: > > > > However when that line was accessed I would get the following error: > > KeyError at /rugs/searchresult/ > '0 not found in either PO

Re: Using Filter on a list of objects?

2007-08-08 Thread Greg
Tim, Why do I need to do the following: if ('price' in request.POST) and (request.POST['price'] <> NOT_PICKED): instead of if request.POST['price'] <> NOT_PICKED: Everytime the form is submitted a value for price is sent to the view. If no price was selected then the value of re

Re: Using Filter on a list of objects?

2007-08-08 Thread Tim Chase
> Why do I need to do the following: > > if ('price' in request.POST) and (request.POST['price'] <> > NOT_PICKED): > > instead of > > if request.POST['price'] <> NOT_PICKED: In the event that for some reason that field hasn't been sent along. This could be some other site using you as a web

Re: Single-object serializers?

2007-08-08 Thread Shawn Allen
Sorry... after reading that back to myself, I realize that the first sentence might be a little confusing: Just to clarify: I'm *building* an API that will output XML and JSON using Django serializers. I realize that the Django serialization API is subject to change. On Aug 8, 2007, at 12:

Re: Using Filter on a list of objects?

2007-08-08 Thread Greg
Tim, I think you just got my color search to work (Thank You). Here is the code: NO_COLOR = "---" styles = Choice.objects.get(id=h.id).style_set.all() if ('color' in request.POST) and (request.POST['color'] <> NO_COLOR): styles = styles.filter(color_cat=request['color']) for u in

mysite.polls application error

2007-08-08 Thread [EMAIL PROTECTED]
hi, after hitting python manage.py sql polls an error appears and i don't know how to debug in python for find the error. could someone help me with this, THANKS This is what appears on screen: mysite.polls: __init__() got an unexpected keyword argument 'max_length' 1 error found.

Is this not allowed select_related()

2007-08-08 Thread james_027
hi, I have this model which doesn't work when using select_related(). What happen is django seems to be in a infinite loop. class Employee(models.Model): employee_contract = models.ForeignKey('EmployeeContract', related_name='contracted_employee') employee_assignment = models.ForeignKey

Re: mysite.polls application error

2007-08-08 Thread James Bennett
On 8/8/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > hi, after hitting > python manage.py sql polls > an error appears and i don't know how to debug in python for find the > error. There is a large warning at the top of the tutorial page: "This document is for Django's SVN rele

Re: database permissions

2007-08-08 Thread Kenneth Gonsalves
On 08-Aug-07, at 10:13 PM, James Bennett wrote: >> constructing the SQL. With Django, it is building the SQL for me. > > Your best bet is to thoroughly read the documentation on the ORM; once > your tables are created (it can create them for you, but you don't > have to let it do that -- instea

Re: DateField() , AttributeError: 'str' object has no attribute 'strftime'

2007-08-08 Thread Frank Singleton
Collin Grady wrote: >This is not a backend issue at all - the problem is you're assigning a >string to the DateField, which is not what it needs. > > Hi Keith and Collin, This is what happens when you try to code at 1:30am :-) Yes I have it working ok inputdata is a split line read from a fi

Re: direct_to_template and extra_content

2007-08-08 Thread SmileyChris
Your stepping out of what the simple view was there to provide. It's not difficult to make your own views, you know. :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, se

Re: DateField() , AttributeError: 'str' object has no attribute 'strftime'

2007-08-08 Thread Frank Singleton
Russell Keith-Magee wrote: >On 8/8/07, Collin Grady <[EMAIL PROTECTED]> wrote: > > >>This is not a backend issue at all - the problem is you're assigning a >>string to the DateField, which is not what it needs. >> >> Thank Russ for the help.. typo on my part ;-) yes this works !! mydate =

filter a list of objects?

2007-08-08 Thread Greg
I have a list of objects and I want to be able to do a filter on a list of objects. Here is my code: y = Choice.objects.all() assert False, y #output of this statement is below AssertionError at /rugs/searchresult/ [, )>, , )>, , )>, , )>, , )>, , )>, , )>, , )>, , )>, , )>] / We'll I wa

SlugField missing an index when unique=True?

2007-08-08 Thread Shev
Hi Djangoers - I'm using Postgres 8.2 and I'm noticing that for all models where I have a SlugField, the database index seems to be missing where I also set unique=True in the SlugField definition. By default, SlugField has db_index=True, according to the docs, and I do see an index for SlugField

context vs request context

2007-08-08 Thread james_027
Hi, While I was studying the list generic view. I ask myself why does the django generic view list uses request context to store the pagination related info instead of a regular context. If I understand it right, using the request context could provide additional info from the context processor

  1   2   >