Re:

2010-10-11 Thread Jirka Vejrazka
> My Url look like this > > di/sub?word=check&type=00&submit=Submit >                         --- >  but it shows the error for symbols "?" > --- >  i want to print only the word check in this url and it can be anyword > given by user Hi Sami, whi

Re:

2010-10-11 Thread sami nathan
HI THIS IS MY REQUIRED URL http://localhost/flip/wap/di/sub?word=check&type=00&submit=Submit here check should be displayed in my page we are using this for dictionary but my task is to just display that word check in my page , moreover its user defined my urls.py is looking like this urlpat

Re: trouble creating first project

2010-10-11 Thread harryos
do you have django_settings_module set?if so you will get this error http://code.djangoproject.com/ticket/11980 otherwise it is a path problem HTH harry On Oct 11, 6:47 am, Phil wrote: > Hi, > > I am having trouble creating my first project. I am running the latest > version of Ubuntu and I inst

[no subject]

2010-10-11 Thread sami nathan
my re reuested url is http://localhost/wap/di/sub?word=check&type=00&submit=Submit I want to print the word "CHECK" which will be given by user my urls.py looks like this from django.conf.urls.defau

Re:

2010-10-11 Thread Jirka Vejrazka
> def current_datetime(request): > >   word = request.GET['word'] >  return HttpResponse(word) > > but it still showing  Error > Exception Value: > > unindent does not match any outer indentation level (view.py, line 7) The error is exactly what is says - indentation is important in Python and t

Re:

2010-10-11 Thread Jirka Vejrazka
> my re reuested url is > http://localhost/wap/di/sub?word=check&type=00&submit=Submit Sami, please don't spam the list with the same requests. Your other question has been answered and if you have follow up questions, it's better to keep them in the same email thread. (also, please use a prope

re-use the sitemap.xml

2010-10-11 Thread het.oosten
I want to put a sitemap on my page with all the links for better navigation. I could write a new view to fetch all links, but is there a way to include my sitemap.xml (i use the sitemap framework) in a template? I could convert the xml to html by using xslt. -- You received this message because

Re: How to specify NULL as the default of a model field.

2010-10-11 Thread David De La Harpe Golden
On 09/10/10 08:06, Tim Diggins wrote: > It may seem odd but I want to explicitly specify NULL as the default > for a particular field / column. (This is so that South picks up that > the default value is null, rather than there being no default > specified, which is what happens if you specify "nul

design problem..how to store web page's data for later comparison

2010-10-11 Thread jimgardener
hi I am trying to write an application that checks a web page today and again checks it after somedays and compares them.For this purpose I need to store the page data on these 2 occassions in my program . How can I do this?I can get the page data of current moment as a string using urllib.urlop

Re:

2010-10-11 Thread sami nathan
HI Jirka Vejrazka sorry ya i am very new to this group and i am going through the python But it would be helpful to me if u convey me which part of python should i go throgh for time beingthank u -- You received this message because you are subscribed to the Google Groups "Django users" gro

Re: design problem..how to store web page's data for later comparison

2010-10-11 Thread Jonathan Barratt
Hi Jim, > How can I do this?I can get the page data of current moment as a > string using urllib.urlopen and store it in a variable, say > current_page_data.But ,how do I store yesterday's data so that I can > compare the two?Do I need to store it as a field in database?(I am not > very familiar w

Re: Re:

2010-10-11 Thread Kenneth Gonsalves
On Mon, 2010-10-11 at 17:37 +0700, Jonathan Barratt wrote: > Here's a couple of suggestions for Python learning resources: > http://www.diveintopython.org/toc/index.html (best online Python intro > I > know of) but this is not for newbies - the OP could try 'python for you and me' which i written

Re:

2010-10-11 Thread sami nathan
Sir, i got two way of suggestion s now i am bitter confused waht should i use now,now i will clearly tell my requirement http://m.broov.com/wap/di/sub?word=check&type=00&submit=Submit pls visit this site and replace the word check with any word u like it will display some rsults below now i don't

Re:

2010-10-11 Thread sami nathan
THANK U GUYS AT LAST I GOT WHAT I NEED AND ITS WORKING THANK U FOR U R RESPONSE GREAT YA 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-us...@

Re: Best way to change pk field type

2010-10-11 Thread Scott Gould
With a huge whopping disclaimer that I've never done this before: Wouldn't you simply be abe to add an explicit "id = BigIntegerField(primary_key=True)" to the model and change the column type accordingly in mysql? On Oct 7, 4:16 pm, indymike wrote: > Here's my issue - I'm going to run out of in

Re: Best way to change pk field type

2010-10-11 Thread derek
On Oct 7, 10:16 pm, indymike wrote: > Here's my issue - I'm going to run out of integers for my primary key > in one of my tables.  I'm using MySQL, which has been absolutely > fantastic, and will for at least a few more decades if I can make a > change from INT to BIGINT. > > What's the right way

Re: django, celery and mysql: Lost connection to MySQL server during query

2010-10-11 Thread Massimiliano della Rovere
I raised the log level to debug: ./manage.py celeryd -l debug That's the new piece of information: Out of memory (Needed 24492 bytes) Out of memory (Needed 24492 bytes) Out of memory (Needed 24492 bytes) Out of memory (Needed 24492 bytes) Out of memory (Needed 24492 bytes) Out of memory (Needed 24

moving from Postgres to MySQL

2010-10-11 Thread Chris Withers
Hi All, I have an existing Django app with lots of data in it. For reasons beyond my control, this app needs to move from Postgres to MySQL. What's the best way of going doing this? cheers, Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://w

Re: moving from Postgres to MySQL

2010-10-11 Thread Shawn Milochik
One way would be to use the dumpdata command to export everything, change your settings to point to the new database, then loaddata to restore. There may be a better way, but this way allows you to dump to a database-agnostic backup so it seems like it would suit your needs. Shawn -- You rece

Re:

2010-10-11 Thread sami nathan
ISORRY YA AGAIN i got problem of SyntaxError: 'return' outside function now my view code from django.http import HttpResponse def current_datetime(request): word = request.GET['word'] return HttpResponse(word) now my url code from django.conf.urls.defaults import * from flip.view impor

Re:

2010-10-11 Thread Jonathan Barratt
On 11 ต.ค. 2010, at 20:43, sami nathan wrote: > ISORRY YA AGAIN i got problem of > SyntaxError: 'return' outside function Rather than using curly braces to define code blocks, i.e. function { ... } Python uses indentation. Thus: > now my view code > from django.http import HttpResponse > >

Re:

2010-10-11 Thread sami nathan
just before getting u r message i tried that it worked!! whats the best editor for django -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, sen

Re:

2010-10-11 Thread Jonathan Barratt
On 11 ต.ค. 2010, at 20:52, sami nathan wrote: > just before getting u r message i tried that it worked!! whats the > best editor for django For me it's an easy call: eclipse + pydev. As of pydev v 1.5.6+ (?) pydev include Django support. Can't recommend it enough. Aside from that, two must-

Smaller Than in Django database API

2010-10-11 Thread Sithembewena Lloyd Dube
Hi all, How does one filer objects by "smaller than" criteria in the data access API? For example, in the following line: MySite.objects.filter(*rank < 11*, display_on_site = 1).order_by('rank') - how would one handle the highlighted criterion? Thanks. -- Regards, Sithembewena Lloyd Dube http:

Re: Smaller Than in Django database API

2010-10-11 Thread Jonathan Barratt
On 11 ?.?. 2010, at 21:05, Sithembewena Lloyd Dube wrote: > Hi all, > > How does one filer objects by "smaller than" criteria in the data access API? > For example, in the following line: I believe it's by appending the field name with _lte > MySite.objects.filter(rank < 11, display_on_site =

Unicode, utf8, mysql

2010-10-11 Thread Mathieu Leduc-Hamel
Hi all, I'm the main maintainer of a website called l'Agenda Du libre du Québec. On this website, people can submit events about free/open software in their local community. Yesterday, somebody tried to submit a new event, but the in description of the event, there was a strange character: "→". D

Re: Smaller Than in Django database API

2010-10-11 Thread Tom Evans
2010/10/11 Jonathan Barratt : > On 11 ?.?. 2010, at 21:05, Sithembewena Lloyd Dube wrote: > Note also that, AFAIK, multiple where criteria are accomplished by chaining > filters rather than providing them as a list to one filter call. > But I am new to Django myself, so if anyone corrects this advi

Re: Smaller Than in Django database API

2010-10-11 Thread Sithembewena Lloyd Dube
@Jonathan, thanks. That does the trick. @Tom, thanks for bringing the subtle, yet important, difference between the two forms of that expression to my attention. 2010/10/11 Tom Evans > 2010/10/11 Jonathan Barratt : > > On 11 ?.?. 2010, at 21:05, Sithembewena Lloyd Dube wrote: > > Note also that

POST the form several times

2010-10-11 Thread LA_
hi all, need your help to understand whether the following can be done with django (and if can - then how). I have items array, which contains details of files. I need to upload them to the server (with POST request), but it supports uploading of 5 files at once only, filenames to be passed in fiel

Legacy URLs redirect

2010-10-11 Thread bax...@gretschpages.com
I'm sure this is simple and I'm just not constructing the URL properly. Basically, it used to be a drupal site, with the cruddy old Drupal every url is a querystring setup. What I want is pretty simple... all of those old URLs resolve to the home page and send a 301 to the spider. I tried:

Re: Smaller Than in Django database API

2010-10-11 Thread Jonathan Barratt
Ah, most enlightening and makes perfect sense, thanks Tom! ? 11 ?.?. 2553 21:45 Tom Evans ?: > 2010/10/11 Jonathan Barratt : >> On 11 ?.?. 2010, at 21:05, Sithembewena Lloyd Dube wrote: >> Note also that, AFAIK, multiple where criteria are accomplished by chaining >> filters rather than

Custom validation in model formset

2010-10-11 Thread Duane Hilton
Hi all, I'm trying to do some custom validation on a model formset, but I'm not having good luck. Thank you in advance for your suggestions ... In my views, I have: class BaseCandFormSet(BaseModelFormSet): def clean(self): super(BaseCandFormSet, self).clean() for form in self

Re: Unicode, utf8, mysql

2010-10-11 Thread Jonathan Barratt
ณ 11 ต.ค. 2553 เวลา 21:34 Mathieu Leduc-Hamel เขียน: > Hi all, > > I'm the main maintainer of a website called l'Agenda Du libre du > Québec. On this website, people can submit events about free/open > software in their local community. > > Yesterday, somebody tried to submit a new event, but

Re: Custom validation in model formset

2010-10-11 Thread Jonathan Barratt
? 11 ?.?. 2553 23:44 Duane Hilton ?: > Hi all, > > I'm trying to do some custom validation on a model formset, but I'm > not having good luck. Thank you in advance for your suggestions ... > > In my views, I have: > > class BaseCandFormSet(BaseModelFormSet): >def clean(self): >

Re: Add message on specific error to 500 page

2010-10-11 Thread Streamweaver
I'm still looking into this if anyone has any insight. On Oct 7, 2:04 pm, Streamweaver wrote: > On our 500 error page I would like to display a message specifically > if the error is in the Database connection, and not display the > message on any other uncaught exception but I can't seem to figu

Re: Add message on specific error to 500 page

2010-10-11 Thread Łukasz Rekucki
On 11 October 2010 18:54, Streamweaver wrote: > I'm still looking into this if anyone has any insight. > > On Oct 7, 2:04 pm, Streamweaver wrote: >> On our 500 error page I would like to display a message specifically >> if the error is in the Database connection, and not display the >> message o

Re: trouble creating first project

2010-10-11 Thread Steve Holden
On 10/11/2010 1:47 AM, Phil wrote: > Hi, > > I am having trouble creating my first project. I am running the latest > version of Ubuntu and I installed Django from svn, when I run 'import > django' i get no errors back so I assume its installed OK. > > When I run 'django-admin.py startproject myp

Re: Custom validation in model formset

2010-10-11 Thread Duane Hilton
Changing forms to form brings a new error: *Exception Value: 'CandidateFeedForm' object has no attribute 'ValidationError'* Below is the view that is using the BaseCandFormSet code that I included in the original message. Maybe something is wrong in it? Thanks in advance for your suggestions. I'v

Re: Custom validation in model formset

2010-10-11 Thread ringemup
try this... from django.forms import ValidationError ... for form in self.forms: ... raise ValidationError('whatever') On Oct 11, 1:32 pm, Duane Hilton wrote: > Changing forms to form brings a new error: > > *Exception Value: 'CandidateFeedForm' object has no attribute > 'Validation

Re: moving from Postgres to MySQL

2010-10-11 Thread Jeff Green
I am in the process of migrating a postgresql database to oracle which has a lot of data. I tried to use the dumpdata command but because of the amount of data I had to scrap the plan. My alternative solution with Django 1.2 is to do a read and write from postgresql to oracle. On Mon, Oct 11,

Re: Legacy URLs redirect

2010-10-11 Thread Jirka Vejrazka
> And failed most spectacularly. Do I need to be escaping something, or > what am I missing? Yes. Even for the raw regular expressions, the question mark at the beginning must be escaped. Try a simple test case: import sys import re s = r'\?q=taxonomy/term/[0-9]+$' re_pattern = re.compile(s, re

Re: Legacy URLs redirect

2010-10-11 Thread Daniel Roseman
On Oct 11, 5:08 pm, "bax...@gretschpages.com" wrote: > I'm sure this is simple and I'm just not constructing the URL > properly. Basically, it used to be a drupal site, with the cruddy old > Drupal every url is a querystring setup. What I want is pretty > simple... all of those old URLs resolve to

Re: I can't select day with calendar widget

2010-10-11 Thread renevie...@gmail.com
On Sat, Oct 9, 2010 at 10:37 AM, Steve Holden wrote: > As others have observed, I see the correct dates for holidays I created, > including 2010-10-10. > > regards >  Steve > Hello I have a new antecedent to add. the 2010-10-10, our local clocks has changed from clt to clst can this to be the b