Re: Database Setup

2010-10-12 Thread Jonathan Barratt
On 13 ?.?. 2010, at 10:19, Everett wrote: > I'm running Django on Windows. When I edited the settings.py file for > the MySql database I'm running in an XAMPP package, the Django > development server throws a bunch of unhandled exceptions. It starts > out like this: The most useful error message

Re: Delete the FileField record but keep the file?

2010-10-12 Thread Jonathan Barratt
On 12 ?.?. 2010, at 22:42, Stodge wrote: > Short of creating my own custom FileField class, is there anyway to > pass an optional "delete" flag to a custom file system storage? Not AFAIK. > I have a case where I want to delete the FileField record, but not the file. If it were me, I would just

Questions about Django's authentication system

2010-10-12 Thread Andy
A few questions about Django's authentication system: - Once a user is logged in, how long does he remain logged in? Is there any way to configure this - e.g. "users will remain logged in for 24 hours"? - Once a user provided a matching username & password and is authenticated, then what? In subs

Database Setup

2010-10-12 Thread Everett
I'm running Django on Windows. When I edited the settings.py file for the MySql database I'm running in an XAMPP package, the Django development server throws a bunch of unhandled exceptions. It starts out like this: Unhandled exception in thread started by Traceback (most recent call last): File

Re: distinct doesn't work on admin actions¿?

2010-10-12 Thread Karen Tracey
On Tue, Oct 12, 2010 at 6:31 AM, Marc Aymerich wrote: > I'm writing an action for the django admin site. My model looks like: > > class order(models.Model): > entity = models.ForeignKey(entity) > [...] > > > I select an arbitrary number of orders and I need to know the different > entitie

Re: Django setup

2010-10-12 Thread Everett
On Oct 12, 8:44 pm, Kenneth Gonsalves wrote: > well, you only need to do this once - after that you can use manage.py > from within your project. So I would not bother about this. > -- > regards > Kenneth Gonsalves Oh ok, thanks for the prompt reply. -- You received this message because you a

Re: Django setup

2010-10-12 Thread Kenneth Gonsalves
On Tue, 2010-10-12 at 17:13 -0700, Everett wrote: > I recently installed Django on Windows, but I can't get the django- > admin.py startproject to work unless I type the full path for django- > admin.py. Do I need to add this to my System Variables? If so what do > I put in for it? I've already tri

Re: Help with http basic authentication

2010-10-12 Thread Sam Lai
On 12 October 2010 22:29, Morten Pedersen wrote: > Hi everyone > I would be very very gratefull for any help getting access to the basic http > user and password through Django. As far as I know, HTTP Basic Authentication occurs at the HTTP connection level, i.e. it is between the web server and

Django setup

2010-10-12 Thread Everett
I recently installed Django on Windows, but I can't get the django- admin.py startproject to work unless I type the full path for django- admin.py. Do I need to add this to my System Variables? If so what do I put in for it? I've already tried the path. -- You received this message because you ar

External IPB authentication via Django

2010-10-12 Thread Grigoriy Petukhov
I am trying to implement external authentication in Invision Power Board Forum. They have converge which as I understand could do such things but I don't understand it yet. Maybe somebody could share his experience of using IPB/converge with Django? -- You received this message because you are su

Re: how to add login info while opening url

2010-10-12 Thread Bill Freeman
IIRC, you will need to use urllib2 and provide a "urlopener" that handles the 403 and responds with the credentials. The more recent python (e.g.2.6) documentation is pretty clear about it. Again, from memory. Bill On Tue, Oct 12, 2010 at 1:52 PM, harryos wrote: > mm..I tried that..it gives 40

TEMPLATE_CONTEXT_PROCESSORS and testserver

2010-10-12 Thread diogobaeder
Hi there, I've being noticing something strange: I added a context processor to my project, but it's not being used when I run the project by "manage.py testserver". Why that? Did I do something wrong? When I run it in "runserver", it's working alright. Thanks! -- You received this message bec

Re: Admin Many-to-Many on a regular Form?

2010-10-12 Thread AK
I have not yet found a solution for this, the closest I've come requires a bit of work based on James Bennett's response here: http://markmail.org/message/irsln5d6m6wpxdiu An alternative that looks slicker than the Django built-in is the django-ajax-selects project: http://code.google.com/p/django

How long is a model validation heavy testsuite supposed to run?

2010-10-12 Thread Jorge Vargas
Hello, I recently inherited a project that uses a lot of model validations and is mainly just a model (we have two django apps that use it as their backend). The test suite currently returns Ran 460 tests in 980.347s That is running on a SQLite db. Is this normal/expected behavior ? is there a

Re: Escaping text for raw SQL?

2010-10-12 Thread Nick Arnett
On Tue, Oct 12, 2010 at 9:53 AM, Steve Holden wrote: > ... > but I can't off-hand remember which ones. If the back-end doesn't allow > that then you have little option but to generate your own SQL. The > required escape function is extremely simple: > > def sqlesc(s): > return replace("'",

Re: reverse url of admin list

2010-10-12 Thread Marc Aymerich
On Tue, Oct 12, 2010 at 7:46 PM, Sævar Öfjörð wrote: > It's called 'changelist' > > So you should call reverse('admin:invoice_invoice_changelist') > Wow Sævar, thank you very much! -- Marc -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: how to add login info while opening url

2010-10-12 Thread harryos
mm..I tried that..it gives 403 error.. I don't think putting login info in request will help..that will work only for 401 I believe.. not sure how to handle 403 from server..Any comments guys? harry On Oct 12, 6:19 pm, jimgardener wrote: > hi > I was trying to get data from different web pages u

Re: Reponse code for a require_XHR decorator?

2010-10-12 Thread Sævar Öfjörð
400 Bad request indicates that the server did not understand the request and that the client should not repeat it without modification. I'd say it doesn't really matter what status code you use internally, but 403 Forbidden is probably more expressive for this situation. 403 indicates that the serv

Re: reverse url of admin list

2010-10-12 Thread Sævar Öfjörð
It's called 'changelist' So you should call reverse('admin:invoice_invoice_changelist') -Sævar On Oct 12, 1:39 pm, Marc Aymerich wrote: > I'm trying to find out what is the reverse url sentence for the "admin list" > of a specific model of an app. Suppose that we have an app called 'invoice' >

Reponse code for a require_XHR decorator?

2010-10-12 Thread Oliver Andrich
Hi, I want to add an require_XHR decorator to my project. The implementation is pretty straightforward. def require_XHR(f): @wraps(f) def wrapper(request, *args, **kwargs): if not request.is_ajax(): return HttpResponseBadRequest() return f(request, *args, **kwa

Re: Language problem with date based generic views

2010-10-12 Thread mf
Thanks Tom!, it worked perfectly fine. On 12 oct, 12:00, Tom Evans wrote: > On Tue, Oct 12, 2010 at 3:32 PM, smallfish wrote: > > \w not include *, try use (.*) > > -- > > blog:http://chenxiaoyu.org twitter: @nnfish > > I'm pretty sure he was just highlighting the differences between the > two U

Re: trouble creating first project

2010-10-12 Thread Robbington
Ok Steve, No need to get huffy. We are trying to help out Phil and if you had read some of the previous posts you might notice I wasnt taking about you. Not that I wanted to name names Shawn Milochik "It seems that the command you're running is not on your PYTHONPATH. You may have to ente

Re: trouble creating first project

2010-10-12 Thread kashi
Hi Phil, I too had similar trouble, as others have replied the problem will be solved by creating a link. I hope you'll find these 2 blog posts handy - http://www.saltycrane.com/blog/2007/11/django-project-1-install/ http://jeffbaier.com/articles/installing-django-on-an-ubuntu-linux-server/ regar

Re: Escaping text for raw SQL?

2010-10-12 Thread Steve Holden
On 10/12/2010 4:34 PM, Nick Arnett wrote: > > > On Tue, Oct 12, 2010 at 9:00 AM, Javier Guerra Giraldez > mailto:jav...@guerrag.com>> wrote: > > On Tue, Oct 12, 2010 at 10:46 AM, Nick Arnett > wrote: > > Anybody know a good way to do this? > > Word

Re: trouble creating first project

2010-10-12 Thread Steve Holden
On 10/12/2010 4:02 PM, Robbington wrote: > I mention this because some one has said that it is to do with your > Python path, and this isnt true, its to do with the way you installed > django in the first place. It's nothing to do with the Python path (which is held in sys.path, and is essentially

Re: Escaping text for raw SQL?

2010-10-12 Thread Nick Arnett
On Tue, Oct 12, 2010 at 9:00 AM, Javier Guerra Giraldez wrote: > On Tue, Oct 12, 2010 at 10:46 AM, Nick Arnett > wrote: > > Anybody know a good way to do this? > > Words.objects.filter(foo__in=mylist) Didn't even occur to me to not use raw SQL for this, but I could... trouble is, I wanted this

Re: trouble creating first project

2010-10-12 Thread Robbington
Phil, If it helps, /usr/local/bin is where linux looks for command line commands. If you have a quick look in there you will see things like ls, nano, and other program names that you can type into the command prompt. Hense the reason a link to djanog-admin.py has to exist in there for Ubuntu to k

Re: Escaping text for raw SQL?

2010-10-12 Thread Javier Guerra Giraldez
On Tue, Oct 12, 2010 at 10:46 AM, Nick Arnett wrote: > Anybody know a good way to do this? Words.objects.filter(foo__in=mylist) -- Javier -- 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...@googl

Escaping text for raw SQL?

2010-10-12 Thread Nick Arnett
I can't figure out if there is a way to escape text for raw SQL queries. I can't use substitution (I think) because I'm building a query like this: SELECT foo, bar FROM proj_words WHERE foo IN ("bat", "bug", "snip", "snap") The list of terms for the IN operator can be quite long... I suppose I c

Delete the FileField record but keep the file?

2010-10-12 Thread Stodge
Short of creating my own custom FileField class, is there anyway to pass an optional "delete" flag to a custom file system storage? I have a case where I want to delete the FileField record, but not the file. -- You received this message because you are subscribed to the Google Groups "Django us

Re: trouble creating first project

2010-10-12 Thread Jonathan Barratt
On 12 ต.ค. 2010, at 22:20, Phil wrote: > Thanks for reply Steve. > > Yes I seen the section about symbolic linking on the django website. > It says on the website to type this command > > "ln -s WORKING-DIR/django-trunk/django/bin/django-admin.py /usr/local/ > bin" > > which I did(replacin

Re: POST the form several times

2010-10-12 Thread LA_
ok, there is no need to do it with django - everything can be done directly in the html with usage of javascript. just django variables should be passed to the script (in the same way as they are used in html) On 11 окт, 19:51, LA_ wrote: > hi all, > need your help to understand whether the follow

Re: trouble creating first project

2010-10-12 Thread Phil
Thanks for reply Steve. Yes I seen the section about symbolic linking on the django website. It says on the website to type this command "ln -s WORKING-DIR/django-trunk/django/bin/django-admin.py /usr/local/ bin" which I did(replacing WORKING_DIR obviously with the right path), but I'm not s

Re: Language problem with date based generic views

2010-10-12 Thread Tom Evans
On Tue, Oct 12, 2010 at 3:32 PM, smallfish wrote: > \w not include *, try use (.*) > -- > blog: http://chenxiaoyu.org  twitter: @nnfish > > I'm pretty sure he was just highlighting the differences between the two URLs; I don't think either actually have '*' in them. To the OP: Patient: 'It hurt

Re: Language problem with date based generic views

2010-10-12 Thread smallfish
\w not include *, try use (.*) -- blog: http://chenxiaoyu.org twitter: @nnfish On Tue, Oct 12, 2010 at 10:29 PM, mf wrote: > I've changed the language-code from en-us to es-ar and the url's began > to fail. > Example: When I click in "Agosto 2010" the URL is "http:

Language problem with date based generic views

2010-10-12 Thread mf
I've changed the language-code from en-us to es-ar and the url's began to fail. Example: When I click in "Agosto 2010" the URL is "http://mysite.com/ weblog/2010/**ago**/" and the server couldn't finde the page. But if I browse "http://mysite.com/weblog/2010/**aug**/ the server finds and shows the

Re: output shapefiles

2010-10-12 Thread Paul Winkler
If you're using PostGIS, one option might be to call its dumper as a separate process. http://postgis.refractions.net/docs/ch04.html#id2638528 Don't know what tools exist for other spatial databases... On Oct 12, 1:50 am, Evan Bowling wrote: > Hello all! > >     I was wondering if anyone knew i

How to avoid update "COMPUTED BY" field ?

2010-10-12 Thread maxi
Hi, I'm working with a legacy database. It has a calculate field (COMPUTED BY) which is the result of concatenation of two varchars fields. In my model I created a common CharField() field object with editable = False Now, the problem is what I do an update from this model, django include the ca

Re: Django Weaknesses

2010-10-12 Thread Masklinn
On 2010-10-12, at 15:33 , tee wrote: > Hello users, > > What would you say are the weaknesses of django framework?? I would suggest that you check out the videos from the latest DjangoCon, there were a number of presentations on issues with Django. As good a starting point as any is probably Er

Re: Django Weaknesses

2010-10-12 Thread Alessandro Pasotti
2010/10/12 tee > Hello users, > > What would you say are the weaknesses of django framework?? > Recently, we have seen a very interesting discussion on this list: search on Google for "Why Django Apps Suck" very interesting is also: http://blip.tv/file/4112452/ -- Alessandro Pasotti w3:

Django Weaknesses

2010-10-12 Thread tee
Hello users, What would you say are the weaknesses of django framework?? -- 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, send email to django-u

how to add login info while opening url

2010-10-12 Thread jimgardener
hi I was trying to get data from different web pages using urlopen and read. from urllib import urlopen def get_page_data(url): f=urlopen(url) return f.read() when I gave this url ,it produces a 'forbidden' response print get_page_data('http://groups.google.com/group/django-users/ topics

Re: WANT TO SEND REQ TO URL GET RESPONSE FROM THE SAME URL

2010-10-12 Thread Sam Lai
On 12 October 2010 22:56, sami nathan wrote: > Hello sir, > I need to display the reult of >           "http://m.broov.com/wap/di/sub?word=dog&type=00&submit=Submit"; > in my url which is > http://localhost/flip/wap/di/sub?word=dog&type=00&submit=Submit > My view looks like this > from django.http

Re: WANT TO SEND REQ TO URL GET RESPONSE FROM THE SAME URL

2010-10-12 Thread sami nathan
Hello sir, I need to display the reult of "http://m.broov.com/wap/di/sub?word=dog&type=00&submit=Submit"; in my url which is http://localhost/flip/wap/di/sub?word=dog&type=00&submit=Submit My view looks like this from django.http import * from django.template import loader, Context from d

Re: WANT TO SEND REQ TO URL GET RESPONSE FROM THE SAME URL

2010-10-12 Thread sami nathan
Hello sir, I need to display the reult of "http://m.broov.com/wap/di/sub?word=dog&type=00&submit=Submit"; in my url which is http://localhost/flip/wap/di/sub?word=dog&type=00&submit=Submit My view looks like this from django.http import * from django.template import loader, Context from

reverse url of admin list

2010-10-12 Thread Marc Aymerich
I'm trying to find out what is the reverse url sentence for the "admin list" of a specific model of an app. Suppose that we have an app called 'invoice' and this has a model also called 'invoice'. I want to get this url: "/admin/invoice/invoice" via reverse function. Something like : >>> reverse('

Help with http basic authentication

2010-10-12 Thread Morten Pedersen
Hi everyone I would be very very gratefull for any help getting access to the basic http user and password through Django. A simple app that print out the password an user to the browser would really help me very very much. Cheers Morten Pedersen Denmark -- You received this message because y

Re: MySQLdb on Ubuntu 10.10

2010-10-12 Thread Jonathan Barratt
Hi Will, On 12 ?.?. 2010, at 16:52, Will McGugan wrote: > Hi, > > I've just upgraded my development machine from Ubuntu 10.04 to 10.10. > Unfortunately, now my Django apps wont start, I get the following > traceback on runserver: > File "/usr/local/lib/python2.6/dist-packages/django/db/backe

Re: MySQLdb on Ubuntu 10.10

2010-10-12 Thread smallfish
perhaps missing mysql-client libary. try use aptitude to install it, don't use easy_install good luck -- blog: http://chenxiaoyu.org twitter: @nnfish On Tue, Oct 12, 2010 at 5:52 PM, Will McGugan wrote: > Hi, > > I've just upgraded my development machine from Ubunt

MySQLdb on Ubuntu 10.10

2010-10-12 Thread Will McGugan
Hi, I've just upgraded my development machine from Ubuntu 10.04 to 10.10. Unfortunately, now my Django apps wont start, I get the following traceback on runserver: File "/usr/local/lib/python2.6/dist-packages/django/core/management/ commands/runserver.py", line 48, in inner_run self.validate

output shapefiles

2010-10-12 Thread Evan Bowling
Hello all! I was wondering if anyone knew if there was a way to output a shapefile from a django database. I didn't find anything in previous posts, and couldn't figure anything out just yet looking at django/ contrib/gis/gdal/datasource.py I was hoping I could do something like the following

Fwd: WANT TO SEND REQ TO URL GET RESPONSE FROM THE SAME URL

2010-10-12 Thread sami nathan
-- Forwarded message -- From: sami nathan Date: Tue, Oct 12, 2010 at 3:37 PM Subject: WANT TO SEND REQ TO URL GET RESPONSE FROM THE SAME URL To: django-users@googlegroups.com  i want to send my req from my url that is"http://localhost/flip/wap/di/sub?word=formula&type=00&submit=S

Re: WANT TO SEND REQ TO URL GET RESPONSE FROM THE SAME URL

2010-10-12 Thread bruno desthuilliers
Please DONT SHOUT. Thanks. On 12 oct, 12:07, sami nathan wrote: >  i want to send my req from my url that > is"http://localhost/flip/wap/di/sub?word=formula&type=00&submit=Submit"; Your proper url is "http://localhost/flip/wap/di/sub";. The remaining part ("?word=formula&type=00&submit=Submit")

distinct doesn't work on admin actions¿?

2010-10-12 Thread Marc Aymerich
Hi! I'm writing an action for the django admin site. My model looks like: class order(models.Model): entity = models.ForeignKey(entity) [...] I select an arbitrary number of orders and I need to know the different entities that they have. It works on shell: >>> queryset = order.objects.

Re: Django admin with IE8

2010-10-12 Thread Tsolmon Narantsogt
Good I'm using Django 1.2.1 MySql 5.1 python2.6 and works beautifully on Firefox, but using IE8 I intermittently get a puzzling 'Internet Explorer cannot display this webpage' when I save a record. help me . Thanks Tsolmon On Tue, Oct 12, 2010 at 6:08 PM, Xavier Ordoquy wrote: > Hello, >

Re: Django admin with IE8

2010-10-12 Thread Xavier Ordoquy
Hello, If you need help, please provide accurate information on your issue. Starting with "I get a page not found" will most probably get your mail immediately discarded. What page is not found ? what is your setting (dev server, apache, nginx, proxy+webserver) ? and so on. Regards, Xavier. Le

WANT TO SEND REQ TO URL GET RESPONSE FROM THE SAME URL

2010-10-12 Thread sami nathan
i want to send my req from my url that is"http://localhost/flip/wap/di/sub?word=formula&type=00&submit=Submit"; that i want to send only the word "formula" to the url "http://m.broov.com/wap/di/sub?word=fomula&type=00&submit=Submit"and i want to get response from the same url and display in my pag

Django admin with IE8

2010-10-12 Thread Tsolmon Narantsogt
Hello List I get a page not found error. But if I hit refresh I get the admin home page while the title of the Internet Explorer window remains "HTTP 404...". The admin seems to work. It just would be nice to not have to hit refresh every time. Thanks Tsolmon -- You received this message becaus

ANN: PyLucid CMS v0.9

2010-10-12 Thread jens
After a long time, we released PyLucid CMS in Version v0.9! The main goals are: * internationalization and localization support (Multilingual content) * Multi site support (Allows a single installation to serve multiple websites.) * Revision controlled content Please follow the install instructio

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

2010-10-12 Thread Jirka Vejrazka
> Yes, it's definitely possible. DBs support very large text fields nowadays, I > wouldn't worry about it. Postgres's text field type is only limited by the > 1GB value-size limit general to all Postgres DB fields. Plus, you can easily compresss web pages very effectively using built-in Python

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

2010-10-12 Thread jimgardener
thank Jonathan..it was very helpful.. jim > Good luck, > Jonathan > -- 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, send email to django-users+