Re: serializes a object error with serializers.serialize("xml",query,ensure_ascii=False)

2008-05-20 Thread ERic ZoU
I figure it out what's going on. I define ForeignKey in the models. data = serializers.serialize('xml', query, ensure_ascii=False,fields=('content')) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

serializes a object error with serializers.serialize("xml",query,ensure_ascii=False)

2008-05-20 Thread ERic ZoU
Hi, When I try to serializes a object with the function below: def left(request): query = Talk.objects.all() data = serializers.serialize("xml",query,ensure_ascii=False) return HttpResponse(data) Always give me this kind of error message.But if I just simply return

Re: Really, realy strange MySQLdb problem, cycling through error messages.

2008-05-20 Thread Rishabh Manocha
There was a permission denied error 'cause if your webserver was running under some user other than root (as it should be), it won't be able to write to the root's home directory (as it shouldn't). Assuming you are using Apache with mod_python, here is something you could put in your httpd.conf:

Re: Testing login required views

2008-05-20 Thread Julien
In another thread [1] James Bennett suggested to use a middleware to require login for all views. That is indeed a very simple and elegant way. Here's the code I ended up with: from django.contrib.auth.decorators import login_required from django.conf import settings public_paths =

Re: Authentication for whole app

2008-05-20 Thread Adam Gomaa
On Tue, May 20, 2008 at 10:11 PM, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > > But is it true SSO? We have 'true' SSO working with multiple Django applications at my workplace, using CAS and an authentication backend based on django-cas; IIRC we're planning to release an updated version to

Re: Authentication for whole app

2008-05-20 Thread Graham Dumpleton
On May 21, 12:04 pm, "James Bennett" <[EMAIL PROTECTED]> wrote: > On Tue, May 20, 2008 at 8:57 PM, Graham Dumpleton > > <[EMAIL PROTECTED]> wrote: > > Let me ask my own question then. If one is running multiple Django > > instances, does Django provide anything that would help with single > >

Re: IOError: Client read error (Timeout?)

2008-05-20 Thread Graham Dumpleton
On May 21, 10:16 am, Aljosa Mohorovic <[EMAIL PROTECTED]> wrote: > On May 20, 12:26 pm, Graham Dumpleton <[EMAIL PROTECTED]> > wrote: > > > Generally you can ignore it, it usually indicates that the user > > pressed reload on a page or navigated off it before the browser could > > send through

Re: Authentication for whole app

2008-05-20 Thread James Bennett
On Tue, May 20, 2008 at 8:57 PM, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > Let me ask my own question then. If one is running multiple Django > instances, does Django provide anything that would help with single > sign on (SSO) across all the distinct Django application instances? Well, they

Re: Authentication for whole app

2008-05-20 Thread Graham Dumpleton
On May 21, 11:57 am, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > On May 21, 11:47 am, "James Bennett" <[EMAIL PROTECTED]> wrote: > > > > > On Tue, May 20, 2008 at 7:14 PM, Graham Dumpleton > > > <[EMAIL PROTECTED]> wrote: > > > If you want to use HTTP Basic authentication, then put everything

Re: Authentication for whole app

2008-05-20 Thread Graham Dumpleton
On May 21, 11:47 am, "James Bennett" <[EMAIL PROTECTED]> wrote: > On Tue, May 20, 2008 at 7:14 PM, Graham Dumpleton > > <[EMAIL PROTECTED]> wrote: > > If you want to use HTTP Basic authentication, then put everything > > under/behind Apache and use Apache to do it. If you want to use form > >

Re: Authentication for whole app

2008-05-20 Thread James Bennett
On Tue, May 20, 2008 at 7:14 PM, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > If you want to use HTTP Basic authentication, then put everything > under/behind Apache and use Apache to do it. If you want to use form > based authentication with same user database across all applications > gets a

Re: Django Json server testing, new to Django

2008-05-20 Thread Diego Ucha
Puff, I recommend reading "The Development Server" section from Chapter 2 of Django Book (http://www.djangobook.com/en/1.0/chapter02/). "The development server can handle only a single request at a time reliably...". Looks like that is your case. []s Diego Ucha On 20 maio, 18:40, puff <[EMAIL

Re: Admin : Select category -> show subcategory

2008-05-20 Thread Diego Ucha
Ok Martyn, understood. Mainly that piece of code represents many functions, one inside the other, since you need to reuse one, than you could declare this inner function that you are aiming at, outside the event and call it on the event(s) (in your case onchange and document ready). That way you

Testing login required views

2008-05-20 Thread Julien
Hi, I have a site where pretty much all views (except for register, login and logout) require the user to log in. Now that the number of views has grown I'd like to test that I didn't forget to protect them with the login_required decorator. I'm looking for an automated way to do that. Is that

Re: load external xml and css with varibles?

2008-05-20 Thread Simon Tite
I'm afraid I don't quite understand all of your question, but I can possibly answer part of it, although please bear in mind I'm quite new at Django, so there may be better ways of doing it. On May 19, 11:50 am, sebey <[EMAIL PROTECTED]> wrote: > > I am thinking about making a template that has

Creating a form class based on fields stored in the database

2008-05-20 Thread MrJogo
I want to create a web interface where users can create a form (ie, define the number of fields and what types of fields they are and the name to display), which will be stored in the Django database, and then displayed elsewhere on the site as an actual form. Any ideas how best to do this,

Re: IOError: Client read error (Timeout?)

2008-05-20 Thread Aljosa Mohorovic
On May 20, 12:26 pm, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > Generally you can ignore it, it usually indicates that the user > pressed reload on a page or navigated off it before the browser could > send through the whole request. > > BTW, it is good idea to mention what hosting mechanism

Re: Authentication for whole app

2008-05-20 Thread Graham Dumpleton
On May 21, 12:49 am, Dougal <[EMAIL PROTECTED]> wrote: > Say you have a hierarchy of apps, how can i easily require > authentication to a whole app? or basically a whole folder. Depends on what sort of authentication you want to use. If you want to use HTTP Basic authentication, then put

Re: Apache (and dev server) throws "connection reset" when accessing pages via IE 6

2008-05-20 Thread Graham Dumpleton
On May 20, 10:53 pm, "Rishabh Manocha" <[EMAIL PROTECTED]> wrote: > Hey Guys, > > I have just deployed my code to my test server (from my laptop) and > setup apache/mod_python to serve the pages. Everything works just fine > when I work with Firefox, but whenever I access my pages using IE 6, I

Re: Canberra developers

2008-05-20 Thread Russell Keith-Magee
On Mon, May 19, 2008 at 6:32 PM, Ryan <[EMAIL PROTECTED]> wrote: > > I live in Canberra, Australia and I'm putting together a web start-up, > hopefully using the Django framework. Does anyone know of any > competent Django developers, or at least Python coders, in my neck of > the woods? Your

Re: Problem about Url

2008-05-20 Thread Simon Tite
Correction to last message: def intropage: query="some default value" page="1" #(default to page 1) if "query" in request.GET: query=request.GET("query") if "page" in request.GET: page=request.GET("page") #go get the

Re: Problem about Url

2008-05-20 Thread Simon Tite
On May 19, 7:32 pm, "free won" <[EMAIL PROTECTED]> wrote: > i found this Problem  when i decide to use Paginator. > > the str    *(?P\w+/)$*     can express    * ?query=xxx* > > so if i wanna express *?query=xxx=1*,  how can I write the str for > urls.py? The part of the url following (and

What do you use for project management?

2008-05-20 Thread Gene Campbell
I have used Jira, and I'm looking at Trac today. Is there something more Djangonic? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Django Json server testing, new to Django

2008-05-20 Thread puff
I'm rather new to Django and working on a site that will need to do the usual Django things by way of serving DB backed dynamic pages. It addition it needs to serve JSON and make JSON requests. For the moment, I'm just experimenting with some very simple tests using Django's development web

Re: Really, realy strange MySQLdb problem, cycling through error messages.

2008-05-20 Thread Rodrigo Culagovski
For future reference: fixed, it stabilized to the 3rd error message. I added this to __init.py__ in the application's directory: import os os.environ['PYTHON_EGG_CACHE'] = '/tmp' Apparently there was some permission error on '/root/.python-eggs'

Creating search forms

2008-05-20 Thread Matt
I'm trying to figure out the best way to create basic search forms in Django. Currently I'm using newforms and have a simple view that takes the parameters, calls the appropriate filters and returns the results. #

Re: Incrementing by 4 instead of 1?

2008-05-20 Thread ringemup
Ah -- I bet that was it. Thanks! On May 20, 4:20 pm, Sean <[EMAIL PROTECTED]> wrote: > Something which may cause this is if your template includes any empty > image, javascript, or css references (i.e. ). > > If you have anything like this in your template, your web browser will > fetch the

Re: problems with python setup.py build

2008-05-20 Thread Wim
Thank you, Karen. Your advice solved my problem. I keep track of what I'm doing, just in case I have to do it a second time. Here's an excerpt: // Install precompiled version python-psycopg2_2.0.6-3_i386.deb // from http://packages.ubuntu.com/hardy/python/python-psycopg2 $ sudo dpkg -i

Re: Try Except Statement not working properly.

2008-05-20 Thread Norman Harman
Greg wrote: > Since we know what the exception is. The email address already exist > in the db (I have unique=True for the email field). I thought that > having 'except: pass' would solve that problem. However, do I need to > catch a certain exception in order for my loop to continue. Because

Re: Incrementing by 4 instead of 1?

2008-05-20 Thread ringemup
Yeah, I actually did start with a model method, but added the temp variable because I was worried I was missing some magic. Anyhow, I just got it sorted out -- my browser's broken. It's submitting every POST as a POST followed by three GETs, and ever GET as four GETs. I'll be filing a bug

Re: Incrementing by 4 instead of 1?

2008-05-20 Thread Sean
Something which may cause this is if your template includes any empty image, javascript, or css references (i.e. ). If you have anything like this in your template, your web browser will fetch the page multiple times (it will think that current page is the file you are trying to reference)

Re: Incrementing by 4 instead of 1?

2008-05-20 Thread Norman Harman
ringemup wrote: > Hi folks, > > I feel like I must be doing something stupid. I've got the following > view: > > def adopt_bunny(request, id): > try: > bunny = Bunny.objects.get(pk=int(id)) > except: > raise Http404 > adoptions =

Get the 'named links' from the request path

2008-05-20 Thread deepc
Does anyone know how to get the 'named links' from the request path from with a view? For example, I'd like to get 'blah' from the following URL: test.com/somepage/?someget=xyz#blah I know about the methods request.path or request.get_full_path()... but neither these return the 'named' part of

Really, realy strange MySQLdb problem, cycling through error messages.

2008-05-20 Thread Rodrigo Culagovski
I'm setting up a django site on the production server and ran into a MySQLdb problem. The server is cycling through a series of error messages: 1) ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb 2) ImproperlyConfigured: Error loading MySQLdb module: bad local file

Re: downloadable django site example anywhere?

2008-05-20 Thread Adam Fast
Kenneth, http://code.djangoproject.com/svn/djangoproject.com/ Is the URL you want for subversion. The "browser" url uses the web-based browser to look at it file by file. Unfortunately though you won't find a lot of newforms / modelforms stuff there I'm afraid (or lost-theories unless it's

Re: Try Except Statement not working properly.

2008-05-20 Thread Greg
Since we know what the exception is. The email address already exist in the db (I have unique=True for the email field). I thought that having 'except: pass' would solve that problem. However, do I need to catch a certain exception in order for my loop to continue. Because as of now when the

I need some help on this questions for helping me build my site

2008-05-20 Thread sebey
OK so as you may see I have a lot of questions in helping build my django project so here they are 1. with models do just create the fields that you need? 2. how can I import rss feeds(i am running a podcast network) from other sites/soures?(models,views,admin etc) 3. I want to make an

Re: downloadable django site example anywhere?

2008-05-20 Thread Kenneth McDonald
Thanks for the info. I got the jeffcroft.com dl, but an attempt to svn the django site code gives me an error: MBP:django-site Ken$ svn co http://code.djangoproject.com/browser/djangoproject.com subversion/libsvn_ra_dav/util.c:826: (apr_err=175002) svn: PROPFIND request failed on

Re: Using ModelForm...not populating my choices

2008-05-20 Thread AdamG
Thinko in my post - it's forms.ModelChoiceField, not models.ModelChoiceField. On May 20, 2:54 pm, "Adam Gomaa" <[EMAIL PROTECTED]> wrote: > So your model is like: > >     class Folder(models.Model): >         user = models.ForeignKey(User) >         # yadda yadda > > And you want to give the

Incrementing by 4 instead of 1?

2008-05-20 Thread ringemup
Hi folks, I feel like I must be doing something stupid. I've got the following view: def adopt_bunny(request, id): try: bunny = Bunny.objects.get(pk=int(id)) except: raise Http404 adoptions = bunny.adoption_count adoptions =

Re: Using ModelForm...not populating my choices

2008-05-20 Thread Adam Gomaa
So your model is like: class Folder(models.Model): user = models.ForeignKey(User) # yadda yadda And you want to give the user a form to sort an object into one of their own folders. So what you do is make a form like this: class ObjectSortForm(forms.Form):

Re: downloadable django site example anywhere?

2008-05-20 Thread kamil
You can get www.djangoproject.com web itself by: svn co http://code.djangoproject.com/browser/djangoproject.com or get http://jeffcroft.com/blog/2006/jun/06/lost-theories-with-source-code/ sure there are many others good luck On May 20, 2:39 pm, Kenneth McDonald <[EMAIL PROTECTED]> wrote: > Is

Re: ModelForm and MultiValueField

2008-05-20 Thread omat
Thanks for the reply. Here are the HistoricDateField and the HistoricDateWidget classes: http://dpaste.com/hold/51690/ -- omat On May 20, 8:08 pm, fivaldi <[EMAIL PROTECTED]> wrote: > Hi Omat, > > Does your HistoricDateField implement the compress(self, data_list) > method and _not_ the

get_decoded in django shell results in SuspiciousOperation exception

2008-05-20 Thread msoulier
I'm trying to inspect the session data in the db. >>> from django.contrib.sessions.models import Session >>> q = Session.objects.all() >>> for s in q: ...print s.get_decoded() ... Traceback (most recent call last): File "", line 2, in ? File

Re: ModelForm and MultiValueField

2008-05-20 Thread fivaldi
Hi Omat, Does your HistoricDateField implement the compress(self, data_list) method and _not_ the clean(self, value) method? See the implementation comments in django.newforms.fields.MultiValueField. The compress method should also return the compressed value of the historic date (i.e. one value

business online

2008-05-20 Thread nizam
Asslamualaikummaaf kerana menganggu masa anda. Buat Kawan-kawan yang di hormati. Apa Khabar? Saya telah menjumpai sesuatu yang sungguh luar biasa dan andalah orang pertama yang saya ingat apabila pertama kali melihatnya. Sahabat saya, Mohd Nizam akan mendedahkan beberapa teknik dan

ModelForm and MultiValueField

2008-05-20 Thread omat
Hi all, I wish to have an extra date field in my ModelForm. When I do it as follows, it works fine: class NoteForm(forms.ModelForm): date = DateField(required=False) def clean_date(self): # do the validation ... return self.cleaned_data class Meta: model =

Re: Memcached problem

2008-05-20 Thread [EMAIL PROTECTED]
Nevermind. I missed the part where webfaction requires you to set up memcached as an app and start it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: business logic and good practices

2008-05-20 Thread Norman Harman
bcurtu wrote: > Hi, > > The reason you must place your templates out from your app code is > because if you don't do that, anyone could access to the code via > browser. Just writing the path of your files, and they have the code. > It could be a security issue. That is not the reason, and if

Re: user.is_authenticated is always false using default login

2008-05-20 Thread James Bennett
On Tue, May 20, 2008 at 10:32 AM, Andrew English <[EMAIL PROTECTED]> wrote: > Do I need to explicitly call authenticate and login in my own view to > populate the user data? From what I read, it seems that the > django.contrib.auth.views.login does that automatically. There's a difference

Memcached problem

2008-05-20 Thread [EMAIL PROTECTED]
I'm trying to use memcache for caching, but when I turn it on, the site proxy errors out. Looking in my error log, I'm seeing tons of errors like: Invalid URI in request get views.decorators.cache.cache_header.grm./ some/url/ suggestions? --~--~-~--~~~---~--~~ You

user.is_authenticated is always false using default login

2008-05-20 Thread Andrew English
My view function uses the login required decorator: @login_required(redirect_field_name='next') def index(request): lists = List.objects.filter(user=request.user) return render_to_response('base.html', {'lists': lists}) This directs them to the login page: LOGIN_URL = '/todone/list/login/'

perlbal and django

2008-05-20 Thread [EMAIL PROTECTED]
here is my configuration dyndns for round robin mode to two perlbal instances two web server (lighttpd+fastcgi) mysql-proxy master-slave db configuration the two perlbal are running on port 80, if I access my webapp through the perlbal instance I got an "An unhandled exception was thrown by the

Values from a ForeignKey object?

2008-05-20 Thread mbdtsmh
Hi all, I assume there a way of accessing associated values from a ForeignKey object in the fieldset.html template that comes with the newforms- admin branch? I cannot for the life of me figure it out - HELP! example: {% if fieldset.name %}{{ fieldset.name }}{% endif %} {% if

Authentication for whole app

2008-05-20 Thread Dougal
Say you have a hierarchy of apps, how can i easily require authentication to a whole app? or basically a whole folder. Cheers --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: django newbie with an install problem - bad interpreter

2008-05-20 Thread lorax
FYI - (sorry about all the posts) I edited the django-admin.py file and changed the first line where it calls for env. Original: /usr/bin/env Edited: /bin/env Now it works just fine. Thank you both! On May 20, 9:41 am, lorax <[EMAIL PROTECTED]> wrote: > Re: non-std host setup > > Ah.. got it.

Re: django newbie with an install problem - bad interpreter

2008-05-20 Thread lorax
Re: non-std host setup Ah.. got it. Thank you. So I can edit django-admin.py with PICO to point to where they've located "env" and that should take care of the issue too. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

downloadable django site example anywhere?

2008-05-20 Thread Kenneth McDonald
Is there a downloadable example of a Django site that illustrates the various things one needs to do to get the various aspects of a Django site working? In my case, I still don't have ModelForms working, and a complete, simple example would be better than all the descriptive prose that

Re: django newbie with an install problem - bad interpreter

2008-05-20 Thread lorax
That worked! So adding "python" to the front of the command seems to be the trick. Perhaps I should add a symlink to point to where Python lives? On May 20, 9:30 am, Marco Buttu <[EMAIL PROTECTED]> wrote: > On Tue, 2008-05-20 at 05:23 -0700, lorax wrote: > > I tried to execute the command

Re: django newbie with an install problem - bad interpreter

2008-05-20 Thread Karen Tracey
On Tue, May 20, 2008 at 9:29 AM, lorax <[EMAIL PROTECTED]> wrote: > > Re: break python scripts. > > This is my first foray into Python so other than Django, I'm not sure > what I'd break. And I'm not sure what you mean by patch django- > admin.py to point to where env is. > > Thanks for you help.

Re: moving from MySQL to PostgreSQL on a "live" site ..

2008-05-20 Thread oliver
Thanks for all the advice! I think django could probably do with a little tool like this when dumping or importing data. Is the boolean field the only odd one out? or is there any thing else that needs chanaging? Date fields? datetime? Thanks again! On May 20, 12:54 pm, George Vilches <[EMAIL

Re: postgresql 8.3 and ILIKE

2008-05-20 Thread Gacha
Thanks, this helped. I already wrote another workaround, but this is smoother. On May 20, 3:43 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Tue, May 20, 2008 at 7:03 AM, Gacha <[EMAIL PROTECTED]> wrote: > > > I changed the line, but I got the same error :( > > Also see this ticket: > >

Re: django newbie with an install problem - bad interpreter

2008-05-20 Thread Marco Buttu
On Tue, 2008-05-20 at 05:23 -0700, lorax wrote: > I tried to execute the command django-admin.py startproject mysite. > That gave me an error: > > -sh: /usr/local/Django-0.96.2/django/bin/django-admin.py: /usr/bin/ > env: bad interpreter: No such file or directory > > I thought my symlink

Re: django newbie with an install problem - bad interpreter

2008-05-20 Thread lorax
Re: break python scripts. This is my first foray into Python so other than Django, I'm not sure what I'd break. And I'm not sure what you mean by patch django- admin.py to point to where env is. Thanks for you help. On May 20, 9:27 am, lorax <[EMAIL PROTECTED]> wrote: > Seems it's in

Re: django newbie with an install problem - bad interpreter

2008-05-20 Thread lorax
Seems it's in /bin/env On May 20, 9:22 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Tue, May 20, 2008 at 9:17 AM, lorax <[EMAIL PROTECTED]> wrote: > > > BUT! > > > env --help DID work > > Hmm. So env is in some non-standard place? What does "which env" show? > > You could patch your

Re: django newbie with an install problem - bad interpreter

2008-05-20 Thread Karen Tracey
On Tue, May 20, 2008 at 9:17 AM, lorax <[EMAIL PROTECTED]> wrote: > > BUT! > > env --help DID work > Hmm. So env is in some non-standard place? What does "which env" show? You could patch your django-admin.py to point to where your host has put env. It's a bit odd for it not to be in

Re: django newbie with an install problem - bad interpreter

2008-05-20 Thread lorax
BUT! env --help DID work On May 20, 9:01 am, "Gregg Banse" <[EMAIL PROTECTED]> wrote: > Hi Karen, > Thanks for the response. > > The system didn't like that command. - No such file or directory. --~--~-~--~~~---~--~~ You received this message because you are

RE: django newbie with an install problem - bad interpreter

2008-05-20 Thread Gregg Banse
Hi Karen, Thanks for the response. The system didn't like that command. - No such file or directory. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Using ModelForm...not populating my choices

2008-05-20 Thread chylld
I have exactly the same problem; I just want to fill the ChoiceField with a certain subset of choices based on the current user. Have you found a way to do this?? Jonathan On Apr 10, 7:21 am, ydjango <[EMAIL PROTECTED]> wrote: > Yes, They are defined in model as > > owner =

Re: django newbie with an install problem - bad interpreter

2008-05-20 Thread Karen Tracey
On Tue, May 20, 2008 at 8:23 AM, lorax <[EMAIL PROTECTED]> wrote: > > I've just got the keys to Django 0.96.2 on a semi-dedicated server at > WestHost. Largely spurred on by the receipt of the first of 4 Django > books. I fetched a copy of the download using wget and untarred the > file right

Apache (and dev server) throws "connection reset" when accessing pages via IE 6

2008-05-20 Thread Rishabh Manocha
Hey Guys, I have just deployed my code to my test server (from my laptop) and setup apache/mod_python to serve the pages. Everything works just fine when I work with Firefox, but whenever I access my pages using IE 6, I keep getting the following errors in the apache error logs: [Tue May 20

Re: postgresql 8.3 and ILIKE

2008-05-20 Thread Karen Tracey
On Tue, May 20, 2008 at 7:03 AM, Gacha <[EMAIL PROTECTED]> wrote: > > I changed the line, but I got the same error :( > Also see this ticket: http://code.djangoproject.com/ticket/6523 which has an alternative patch and more discussion of what is going on. I don't think it's been decided what

Help me build my site with answers to my questions from models to newsletters everybody view this at least once

2008-05-20 Thread sebey
OK so as you may see I have a lot of questions in helping build my django project so here they are 1. with models do just create the fields that you need? 2. how can I import rss feeds(i am running a podcast network) from other sites/soures?(models,views,admin etc) 3. I want to make an

Re: Django Admin Site - How to view data in table, when insert/update/delete are removed for a user/group on a specified table

2008-05-20 Thread Karen Tracey
On Tue, May 20, 2008 at 6:30 AM, Lalit Kapoor <[EMAIL PROTECTED]> wrote: > > In the Django Admin Site is there anyway to enable a user/group to > view the data in a table, when insert/update/delete have been disabled > for the user/group? If so, how would I go about doing this? Thanks. > Admin's

django newbie with an install problem - bad interpreter

2008-05-20 Thread lorax
I've just got the keys to Django 0.96.2 on a semi-dedicated server at WestHost. Largely spurred on by the receipt of the first of 4 Django books. I fetched a copy of the download using wget and untarred the file right from the command line on the server. I then attempted to add django-admin.py to

Re: problems with python setup.py build

2008-05-20 Thread Karen Tracey
On Tue, May 20, 2008 at 5:58 AM, Wim <[EMAIL PROTECTED]> wrote: > > Hello, > > This is my first attempt to install Django on Ubuntu 8.04 with > PostgreSQL. It's all quite new for me. I'm pretty new to Ubuntu, I > have some programming experiences with Python and I'm totally new to > Django. I

Re: moving from MySQL to PostgreSQL on a "live" site ..

2008-05-20 Thread George Vilches
Hanne Moa wrote: > I have a filter that makes django's json-dumps more human-readable, by > adding a newline after every occurence of "}},". Running such a filter > first would make for short and snappy lines for the rewriting filter: > > python manage.py dumpdata | prettifyjson | fixbooleans >

Re: can't compare datetime.datetime to datetime.date

2008-05-20 Thread Ben Firshman
The date() method of the datetime object is what you probably want. See the documentation: http://docs.python.org/lib/datetime-datetime.html Ben On 20 May 2008, at 09:56, vance ma wrote: > In django ;How to compare datetime.datetime and datetime.date > >

Re: Problem with Querydict

2008-05-20 Thread Matthias Kestenholz
On Tue, 2008-05-20 at 03:31 -0700, mwebs wrote: > Sorry, but this does not work. Maybe I am doing some mistakes. > Could you please post me a snippet? > http://www.djangoproject.com/documentation/request_response/#querydict-objects request.POST.getlist('elems')

Re: postgresql 8.3 and ILIKE

2008-05-20 Thread Gacha
I changed the line, but I got the same error :( Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/django/core/handlers/ base.py", line 82, in get_response response = callback(request, *callback_args, **callback_kwargs) File

Re: postgresql 8.3 and ILIKE

2008-05-20 Thread Gacha
Thanks, I hope this bug will be fixed. On May 20, 1:23 pm, "Scott Moonen" <[EMAIL PROTECTED]> wrote: > Gacha, see my bug report and a possible fix (it is currently working for me) > at: > > http://code.djangoproject.com/ticket/7197 > > -- Scott > > > > On Tue, May 20, 2008 at 4:14 AM, Gacha

Re: Problem with Querydict

2008-05-20 Thread mwebs
Sorry, but this does not work. Maybe I am doing some mistakes. Could you please post me a snippet? On 20 Mai, 12:18, Tomás Garzón Hervás <[EMAIL PROTECTED]> wrote: > Hi, you must use get_list function on QueryDict > > mwebs escribió: > > > > > Hello, > > > I am sending JSON to the serverbackend.

Django Admin Site - How to view data in table, when insert/update/delete are removed for a user/group on a specified table

2008-05-20 Thread Lalit Kapoor
In the Django Admin Site is there anyway to enable a user/group to view the data in a table, when insert/update/delete have been disabled for the user/group? If so, how would I go about doing this? Thanks. Sincerely, Lalit Kapoor --~--~-~--~~~---~--~~ You

Re: IOError: Client read error (Timeout?)

2008-05-20 Thread Graham Dumpleton
Aljosa Mohorovic wrote: > IOError: Client read error (Timeout?) > > sometimes i get this error, any tips on how to handle this kind of > errors? > any comment related to this is welcomed. Generally you can ignore it, it usually indicates that the user pressed reload on a page or navigated off it

Re: postgresql 8.3 and ILIKE

2008-05-20 Thread Scott Moonen
Gacha, see my bug report and a possible fix (it is currently working for me) at: http://code.djangoproject.com/ticket/7197 -- Scott On Tue, May 20, 2008 at 4:14 AM, Gacha <[EMAIL PROTECTED]> wrote: > > I upgraded Postgresql to 8.3 version and got an error in admin: > >ProgrammingError:

Re: Problem with Querydict

2008-05-20 Thread Tomás Garzón Hervás
Hi, you must use get_list function on QueryDict mwebs escribió: > Hello, > > I am sending JSON to the serverbackend. > When I print reuqest.POST I get . > Thats exactly what I was expecting. > > But now I want to access the 'elems'. When I do request.POST['elems'] > I get'1'. > But I was

Problem with Querydict

2008-05-20 Thread mwebs
Hello, I am sending JSON to the serverbackend. When I print reuqest.POST I get . Thats exactly what I was expecting. But now I want to access the 'elems'. When I do request.POST['elems'] I get'1'. But I was expecting getting 2, 1. Thanks for your help. Toni

problems with python setup.py build

2008-05-20 Thread Wim
Hello, This is my first attempt to install Django on Ubuntu 8.04 with PostgreSQL. It's all quite new for me. I'm pretty new to Ubuntu, I have some programming experiences with Python and I'm totally new to Django. I have used databases (Informix, DB2) for a long time, but not PostgreSQL. I have

IOError: Client read error (Timeout?)

2008-05-20 Thread Aljosa Mohorovic
IOError: Client read error (Timeout?) sometimes i get this error, any tips on how to handle this kind of errors? any comment related to this is welcomed. Aljosa --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

TreeMenus / Extension - selected item

2008-05-20 Thread martyn
Hi, I'm trying TreeMenus : http://code.google.com/p/django-treemenus/ It's a realy good job. Thanks to its author. There is just a little bemol, I don't find the documentation really excplicit, especially concerning the "Class Extension". In the doc :

Re: Admin : Select category -> show subcategory

2008-05-20 Thread martyn
In fact, at the creation, you select a category, the the subcategories are shown. It's OK /*-/*-/*-/*-/*-/*-/*-/*-/*-/*-/*-/*-/*-/*-/*- ===Create_Object=== Category [--select_category--] SubCategory [--select_subcategory--] /*-/*-/*-/*-/*-/*-/*-/*-/*-/*-/*-/*-/*-/*-/*- But, at the

can't compare datetime.datetime to datetime.date

2008-05-20 Thread vance ma
In django ;How to compare datetime.datetime and datetime.date --~--~-~--~~~---~--~~ 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

Re: Admin : Select category -> show subcategory

2008-05-20 Thread martyn
In fact, at the creation, you select a category, the the subcategories are shown. It's OK But, a On 18 mai, 01:22, Diego Ucha <[EMAIL PROTECTED]> wrote: > You need to set a Subcategory as default when this field is loaded by > the field Category? > Sorry Martyn, i didn't get your doubt, could

Re: moving from MySQL to PostgreSQL on a "live" site ..

2008-05-20 Thread Hanne Moa
On Tue, May 20, 2008 at 10:32 AM, oliver <[EMAIL PROTECTED]> wrote: > I take it doing via JSON you still need to convert the Boolean fields? > > would you know of any kind of scrip that would do it? as my editor > doenst cope to well with 7mb of xml files :(. > I guess its not to hard to write if

Re: moving from MySQL to PostgreSQL on a "live" site ..

2008-05-20 Thread oliver
Hi, I take it doing via JSON you still need to convert the Boolean fields? would you know of any kind of scrip that would do it? as my editor doenst cope to well with 7mb of xml files :(. I guess its not to hard to write if needed. I do a syncdb than run loaddata, I didnt empty the tables,

postgresql 8.3 and ILIKE

2008-05-20 Thread Gacha
I upgraded Postgresql to 8.3 version and got an error in admin: ProgrammingError: operator does not exist: smallint ~~* unknown LINE 1: ...js_id" = '6538' AND "assort_apstlaiks"."a_diena" ILIKE '2' ^ HINT: No operator

Re: business logic and good practices

2008-05-20 Thread Gene Campbell
Hi, Thanks the for the reply. > The reason you must place your templates out from your app code is > because if you don't do that, anyone could access to the code via > browser. Just writing the path of your files, and they have the code. > It could be a security issue. Umm, if it doesn't

Re: business logic and good practices

2008-05-20 Thread bcurtu
Hi, The reason you must place your templates out from your app code is because if you don't do that, anyone could access to the code via browser. Just writing the path of your files, and they have the code. It could be a security issue. About your managers.py file, it's OK to decouple logic

Re: Trouble installing PIL

2008-05-20 Thread Graham Dumpleton
On May 20, 3:42 pm, Austin Govella <[EMAIL PROTECTED]> wrote: > It was a PYTHONPATH problem. I fixed it using this tutorial: > *http://emmby.blogspot.com/2008/05/installing-python-pil-on-mac-os-x-1... > > (I'm using python 2.4, so I adjusted the path accordingly.) > > Everything validates. Server