Google App Engine - Could not import settings

2009-08-06 Thread Geoff
Hello All, I have used Django a little before but am new to Google App Engine and am trying to use it's development web server with Django for the first time. I don't know if this is relevent but I previously had Django 1.1 and Python 2.6 on my Windows XP and even though I have uninstalled Pytho

Re: Use of the ORM in long running (non web) daemon

2009-08-06 Thread Russell Keith-Magee
On Wed, Aug 5, 2009 at 10:12 PM, wam wrote: > > I am using the Django ORM to build and manipulate models from outside > of a web context and within a long running daemonized application. I'm > using the django ORM talking to a postgresql db for this processing > since the results of this external

Emailing a Application report automatically

2009-08-06 Thread Harish
Hi Friends, I am working on a application which is using django. I have some reports in the application. Currently all the reports are displayed in the tabular formats in HTML. I just got a new idea of mailing a particular report. The report should be mailed to a person everyday at certain time

test upload xls file

2009-08-06 Thread maplye
this is my test code: def test_import_data(self): f = open('commend/fixtures/Book2.xls') postdata = {'datatype':'intonetwork','datafile':f} response = self.client.post('/commend/saledata/import_data/',postdata) self.failUnlessEqual(response.status_code, 200) but in the

Re: Get current user outside a view / without an request object

2009-08-06 Thread krylatij
You can also use threadlocals middleware (ask google about it =)) to get current user without request object --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to d

Re: multiple projects shared database

2009-08-06 Thread Robin Becker
Malcolm Tredinnick wrote: > On Wed, 2009-08-05 at 17:59 +0100, Robin Becker wrote: >> My boss wants to have two different django controlled websites with a common >> database. Is there a way to do this? >> >> We are already running multiple websites into a single django project and >> because th

Re: Aggregates over reverse relationships?

2009-08-06 Thread Shai
On Aug 4, 2:09 am, Malcolm Tredinnick wrote: > On Mon, 2009-08-03 at 17:45 +0300, Shai Berger wrote: > > Hi all, > > > With the new aggregates in django 1.1, I wonder if there's an easy way to > > aggregate over reverse relationships. As an example, assume a simplistic > > representation of a s

Re: Get current user outside a view / without an request object

2009-08-06 Thread Daniel Roseman
On Aug 6, 9:14 am, krylatij wrote: > You can also use threadlocals middleware (ask google about it =)) > to get current user without request object No, really, don't. Just don't. -- DR. --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: Emailing a Application report automatically

2009-08-06 Thread Tom Evans
On Thu, 2009-08-06 at 00:38 -0700, Harish wrote: > Hi Friends, > > I am working on a application which is using django. I have some > reports in the application. Currently all the reports are displayed > in the tabular formats in HTML. I just got a new idea of mailing a > particular report. > T

Re: Get current user outside a view / without an request object

2009-08-06 Thread krylatij
Why do you think so? --~--~-~--~~~---~--~~ 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 django-users

Re: Get current user outside a view / without an request object

2009-08-06 Thread Malcolm Tredinnick
On Thu, 2009-08-06 at 03:33 -0700, krylatij wrote: > Why do you think so? It's bad encapsulation practice, for a start. It breaks Python's namespacing habits. In this particular case, however, go back and read the original poster's message. Having the user in threadlocals doesn't solve any probl

Re: multiple projects shared database

2009-08-06 Thread derek
> > On the other hand, if the two websites are entirely independent, putting > > them into a single database is simply poor design. It's trivial to > > create a separate database and why not use the tools that are available > > instead of adding extra complexity?! > > I think the idea is to allow

Re: multiple projects shared database

2009-08-06 Thread Robin Becker
derek wrote: > >>> On the other hand, if the two websites are entirely independent, putting >>> them into a single database is simply poor design. It's trivial to >>> create a separate database and why not use the tools that are available >>> instead of adding extra complexity?! >> I think the id

Re: Get current user outside a view / without an request object

2009-08-06 Thread krylatij
> ..go back and read the original poster's > message. Having the user in threadlocals doesn't solve any problem, > since he's trying to create a form class based on information in the > request and that only happens at import time, not every time something > in the file is looked at. Yes, my mista

Re: django queryset based on when data created

2009-08-06 Thread krylatij
You can use ordering by primary key (id by default) because it increments by every insert. So newly created rows in db will have greater id than others. In most cases it can be enough. --~--~-~--~~~---~--~~ You received this message because you are subscribed to th

Re: Select Table or Database based on User

2009-08-06 Thread Wojciech Gryc
Hi everyone, All right, you have convinced me. I'll implement this way. Thank you all for the advice and help! - Wojciech On Aug 6, 7:30 am, Daniel Roseman wrote: > On Aug 5, 11:38 pm,WojciechGryc wrote: > > > Thanks for your replies! > > > The problem with storing the user ID for each table

Re: Memory error

2009-08-06 Thread Tom Evans
On Wed, 2009-08-05 at 13:09 -0700, drakkan wrote: > The code is something like this > > obj=DBModels.objects.filter(somefilter) > results=[] > for o in obj: > results.append({'field1':o.field1,'field2':o.field2}) > > return JsonResponse(results) > > where JsonResponse is a class derived from

HttpResponseRedirect with POST

2009-08-06 Thread Sławek Tuleja
HI everyone! Can I redirect to view with form passing few variables in POST method (request.POST) and showing them in the form? (i need this in admin action) for example this works: def add_mailing(self, request, queryset): return HttpResponseRedirect('%s?subject=halo' % \

Re: HttpResponseRedirect with POST

2009-08-06 Thread Spajderix
Hi, wouldn't it be easier to put this data to session? Sławek Tuleja pisze: > HI everyone! > > Can I redirect to view with form passing few variables in POST method > (request.POST) and showing them in the form? (i need this in admin > action) > > for example this works: > def add_mailing(self,

Re: HttpResponseRedirect with POST

2009-08-06 Thread Daniel Roseman
On Aug 6, 1:09 pm, Sławek Tuleja wrote: > HI everyone! > > Can I redirect to view with form passing few variables in POST method > (request.POST) and showing them in the form? (i need this in admin > action) > > for example this works: > def add_mailing(self, request, queryset): >         return

ValueError

2009-08-06 Thread rekha
Hi, im getting ValueError when try to redirect to an html page.. also the validation code in forms.py doesnt work when i test it with wrong inputs. it accepts the wrong input also.. what would be the bug? ===views.py code== def register(request): if request.method == 'POST':

How-to use SelectMultiple widget with CommaSeparatedIntegerField ?

2009-08-06 Thread nono
Hi, my model uses CommaSeparatedIntegerField to store a list of integer. I want my users to use SelectMultiple widget to create/update this field so I put a ChoiceField with widget=SelectMultiple in my form. My problem is that all I can get from this is a list of values where I expect comma separ

Re: HttpResponseRedirect with POST

2009-08-06 Thread Sławek Tuleja
Thank you! On 6 Sie, 14:21, Daniel Roseman wrote: > On Aug 6, 1:09 pm, Sławek Tuleja wrote: > > > > > HI everyone! > > > Can I redirect to view with form passing few variables in POST method > > (request.POST) and showing them in the form? (i need this in admin > > action) > > > for example thi

Re: syncdb does not find app on the PYTHONPATH

2009-08-06 Thread Matthew
== models.py import datetime from django.db import models from django.contrib.auth import User from markdown import markdown from tagging.fields import TagField class Category(models.Model): title = models.CharField(max_length=250, help_t

Re: ValueError

2009-08-06 Thread Luke Seelenbinder
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Could we have the full traceback? That really isn't enough information to determine your problem. Regards, Luke luke.seelenbin...@gmail.com rekha wrote: > Hi, im getting ValueError when try to redirect to an html page.. also > the validation code

problems with generic object_detail view

2009-08-06 Thread andreas schmid
hi, im trying to build an app which basically is based on the practical django projects weblog. my problem now is that i have a "Project" model and i can get the archive_index view but i cant solve the object_detail url and i dont understand where im doing wrong. my model: class Project(models

Re: checking if db schema and model match

2009-08-06 Thread Sam Lai
Thanks for that, I'll take a look at it. I just thought given manage.py has the ability to inspectdb, it shouldn't be that much of a stretch to just check if the model and DB schema match. Cheers 2009/8/6 kmike : > > That's a question about database migration. Django doesn't have built- > in sol

Re: syncdb does not find app on the PYTHONPATH

2009-08-06 Thread Daniel Roseman
On Aug 6, 1:32 pm, Matthew wrote: > $ ~/dev/source/cms: pwd > /home/matthew/dev/source/cms > $ ~/dev/source/cms: python > Python 2.6.2 (release26-maint, Apr 19 2009, 01:58:18) > [GCC 4.3.3] on linux2 > Type "help", "copyright", "credits" or "license" for more information.>>> > import coltrane >

Re: Runtime error when uploading image files

2009-08-06 Thread Karen Tracey
On Aug 6, 1:56 am, Mac wrote: > Hi, > > I'm new to django. When I try to upload image files, I get runtime > errors. Here's my model: > models.py > > class Images(models.Model): >     pk = models.IntegerField(primary_key=True, db_column='PK') # Field > name made lowercase. Unless you are going t

ANNOUNCE:- ibm_db_django-0.1.2 IBM Dataservers backend support for Django 1.1 Released

2009-08-06 Thread Tarun Pasrija
IBM_DB_DJANGO-0.1.2 --- IBM_DB_DJANGO adaptor enables access to IBM databases from Django applications http://www.djangoproject.com/. The adaptor is developed and maintained by IBM. What's New? We are pleased to announce the release of ibm_db_

formsets with internet explorer

2009-08-06 Thread Jeff Green
I am using formsets with my application but I have noticed some behavior with internet explorer. It seems when I submit the form on internet explorer I will get a mixture of page has expired, page not found or blank page. But, when I use a firefox I have no problems. Does anyone have any suggestio

django-pagination with search form

2009-08-06 Thread Streamweaver
Simple Pagination in Django is great but I'm having some trouble with the best way to design pagination with querysets derived from Search Forms. I'm currently using the Django-Pagination middleware and it works great but there's really pretty bad documentation on it (as with many projects) and I

multi-table inheritance and modification of OneToOneField options

2009-08-06 Thread Jan Ostrochovsky
Hello, http://docs.djangoproject.com/en/dev/topics/db/models/#multi-table-inheritance says: The inheritance relationship introduces links between the child model and each of its parents (via an automatically-created OneToOneField). http://docs.djangoproject.com/en/dev/ref/models/fields/#onetoone

Re: Get current user outside a view / without an request object

2009-08-06 Thread Julián C . Pérez
Hi I tried doing that... But it does not work For example, if I do something like... --- class SendMessageForm(forms.Form): recipientUser = ShowValidContactList(label=u'Send to') messageSubject= forms.CharField(label=u'Subject') messageContent = forms.CharField (label=u'Con

Re: How-to use SelectMultiple widget with CommaSeparatedIntegerField ?

2009-08-06 Thread nono
I was reading my post and though it was not very clear My model uses CommaSeparatedIntegerField to store some integer values. I want my users to use SelectMultiple widget to create/update those integer so I put a ChoiceField with widget=SelectMultiple in my form. My problem is that all I can get

Re: Get current user outside a view / without an request object

2009-08-06 Thread Daniel Roseman
On Aug 6, 3:34 pm, Julián C. Pérez wrote: > Hi > I tried doing that... > But it does not work > For example, if I do something like... > --- > class SendMessageForm(forms.Form): >         recipientUser = ShowValidContactList(label=u'Send to') >         messageSubject= forms.CharField(label=u'Subj

Re: Runtime error when uploading image files

2009-08-06 Thread Malcolm MacKinnon
Thanks, Karen. I really appreciate all the time you put in looking at this and your comments are very informative. You were right about naming the primary key PK (I thought Django would like that, but it doesn't). I changed it to PRIM and the model form renders the way it should in photos.html. I d

DateInput widget, format attr & ugettext

2009-08-06 Thread cArkraus
Hey all, I cant seem to get my (non-model-)forms datefield localized. Here's my first attempt: some_date = fields.DateField(widget=widgets.DateInput(format=ugettext ('%d.%m.%Y'))) That's working fine, until the user switches his sessions language. Then, the date is still shown in the format(ie.

Re: looking for a clean, easy way to force user to change password on first login

2009-08-06 Thread ZhangZheng
you can use process_response(self,request,response) in the process_response, you can do : if requst.user is in the first-login table, you can redirect URL to change-passwd page a little suggestion, pjv 写道: > i thought of something along those lines. that's exactly the kind of > thing that i w

Application decoupling - project architecture question

2009-08-06 Thread Andrin Riiet
Hi, I'd like to shed some light on the "the right way" to make applications in django by an example and a few questions. Let's say that I have a 'users' application (acting as "user profiles" on the built-in user authentication system) and I want to add an avatar image feature to it. I'd like to

Re: Get current user outside a view / without an request object

2009-08-06 Thread Julián C . Pérez
My real problem it that the field should looks like: --- recipientUser = ShowValidContactList(currentUser=_something_, label=u'Send to') --- and if I have a form's init method like... --- def __init__(self, *args, **kwargs): self.currentUser = kwargs.pop('currentUser', None) super(SendMess

Admin Image upload control disabled?

2009-08-06 Thread Daniel Brown
Good morning list, I've been working on a simple Django blog as a learning exercise and today I've been following this blog post about a simple way to add images to blog posts. My changes run fine on Django's test server without errors, however the image related part of the BlogPost's admin page

Re: Use of the ORM in long running (non web) daemon

2009-08-06 Thread wam
On Aug 6, 3:20 am, Russell Keith-Magee wrote: > What you have described shouldn't require any particularly special > handling. I have code in production that does exactly the same thing - > a daemonized process that responds to requests on a port, does some > processing, and saves the result to t

Re: Django/ Python 3 - nervous about starting large project

2009-08-06 Thread snfctech
Thanks for the tips, Berco, Wayne. @Wayne: Thanks for the welcome. Why are you using 2.5 for your new/ large project instead of 2.6? Tony On Aug 5, 2:22 pm, Wayne Koorts wrote: > Hi Tony, > > > However, I'm nervous about the Python 3 situation.  What if I start > > building a large project ba

Re: Application decoupling - project architecture question

2009-08-06 Thread Paulo Almeida
I'm far from being an expert, but maybe you can look at the django-tagging code for inspiration: http://code.google.com/p/django-tagging/ What they do is to provide a TagField in the tagging application, and then you can use that field in the form of the application using tags. You can probably d

How much DB queries is too much?

2009-08-06 Thread koranthala
Hi, I am designing a website with Django and Apache. This is my first foray to web designing, even though I have quite a bit of experience in another area. The logic for the site is somewhat involved - It is better to think of it as more of an application rather than a site. The problem i

Re: Get current user outside a view / without an request object

2009-08-06 Thread Paulo Almeida
It doesn't have to be a callable, you can just do something like: recipientUser = ShowValidContactList(currentUser=self.currentUser) I never used that kwargs.pop function (I didn't know you could do that), but I have code like this: class ExperimentForm(ModelForm): """ Generate form to hand

Re: Get current user outside a view / without an request object

2009-08-06 Thread Julián C . Pérez
Thanks for reply, Paulo But if I... --- class SendMessageForm(forms.Form): recipientUser = ShowValidContactList(currentUser=self.user, label=u'Send to') messageSubject= forms.CharField(label=u'Subject') messageContent = forms.CharField(label=u'Content', widget=forms.Textar

Different types of users, requiring different models

2009-08-06 Thread Ludwik Trammer
Hello, I'm a developer for a Polish NGO, owning 5 schools in Warsaw. My organization decided to throw out our antiquated custom PHP intranet system (everything school needs: timetables, grades, reports, announcements, forums, etc. ) and design a brand new one using Django. And to Open Source it.

Re: Get current user outside a view / without an request object

2009-08-06 Thread Paulo Almeida
But why don't you put: recipientUser = ShowValidContactList(currentUser=self.user) inside the __init__? - Paulo 2009/8/6 Julián C. Pérez > > Thanks for reply, Paulo > But if I... > --- > class SendMessageForm(forms.Form): > >recipientUser = ShowValidContactList(currentUser=self.user,

Re: Get current user outside a view / without an request object

2009-08-06 Thread Julián C . Pérez
Bingo!!! :D I follow this: http://oebfare.com/blog/2008/feb/23/changing-modelchoicefield-queryset/ and now I'm happy with mi desired current user based queryset Thank you all! BTW, my form class finally looks like... --- class SendMessageForm(forms.Form): recipientUser = ShowValidContact

comparing date and datetime

2009-08-06 Thread Gustavo Henrique
Hi! I'm trying to compare 2 dates and appears the error message: can't compare datetime.datetime to datetime.date But in the shell is ok. why? date1 = models.DateField() date2 = datetime.date.today() --~--~-~--~~~---~--~~ You received this message because you are

ValueError when uploading image

2009-08-06 Thread Mac
Hi, I'm new to Django and programming in general. I've been trying to create a form that simply uploads images and saves them to a app folder. I'm using MySql with Django svn. Here's my model: class Images(models.Model): prim = models.AutoField(primary_key=True, db_column='PRIM') # Field nam

Re: comparing date and datetime

2009-08-06 Thread Gustavo Henrique
Sorry, it were an human error! Solved! -- Gustavo Henrique http://www.gustavohenrique.net http://blog.gustavohenrique.net --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this grou

Django TimeField Model without seconds

2009-08-06 Thread Hellnar
Greetings, I am trying to implement a TimeField model which only consists of HH:MM (ie 16:46) format, I know it is possible to format a regular Python time object but I am lost about how to manage this with Django. Cheers --~--~-~--~~~---~--~~ You received this me

Re: Django TimeField Model without seconds

2009-08-06 Thread Streamweaver
I'm not really sure you can but I'm also not clear why this is a problem. It would seem easy to just not use seconds and filter them out in the template and views as needed. Is this practical for your needs or is there a specific benefit you're seeking by filtering out seconds from the field? O

Im lost with Save function in model and saving data from Form

2009-08-06 Thread Asinox
Hi guys, i need a litter help, i know that if i want a Form from Model i need to use ModelForm, but im lost with something... i have a view that render a Form (ModelFrom) and save this, but now i need to use the funcion SAVE in the Model (for use in the admin)... but im lost... bcz in the view f

Re: Django/ Python 3 - nervous about starting large project

2009-08-06 Thread Streamweaver
I came from the PHP world myself and am even doing some of it still but I don't think what you're saying is of particular concern. Even in PHP you have to worry about differences in PHP 4 and 5 and so on so the concern itself isn't just a Python one. I can say that support for Python 2.6 will be

Re: Django TimeField Model without seconds

2009-08-06 Thread Hellnar
Hello, I need this because it is a task specific requirement for my project (a television broadcast flow management which only consists of HH:MM format).I will let the user login via the admin panel and add these broadcast flows includint those times thus each addition with assigning HH:MM:00 wou

python md5

2009-08-06 Thread Asinox
Hi guys, please i need to know why md5 return this: the way that im using: def encriptar(): toEncode = pickle.dumps(datetime.now) encoded = md5.new(toEncode) return encoded Thanks --~--~-~--~~~---~--~~ You received this message because you are su

Re: python md5

2009-08-06 Thread Alex Gaynor
On Thu, Aug 6, 2009 at 12:55 PM, Asinox wrote: > > Hi guys, please i need to know why md5 return this: > > > > > the way that im using: > > def encriptar(): >    toEncode = pickle.dumps(datetime.now) >    encoded = md5.new(toEncode) > >    return encoded > > > Thanks > > > You can call the hexdi

Re: Django TimeField Model without seconds

2009-08-06 Thread Paulo Almeida
Hi, Streamweaver wasn't suggesting assigning 00 to every time, just hiding what you don't want to show using views or templates. For instance: http://docs.djangoproject.com/en/dev/ref/templates/builtins/#time - Paulo On Thu, Aug 6, 2009 at 6:47 PM, Hellnar wrote: > > Hello, > I need this beca

Re: Im lost with Save function in model and saving data from Form

2009-08-06 Thread Daniel Roseman
On Aug 6, 6:38 pm, Asinox wrote: > Hi guys, i need a litter help, i know that if i want a Form from Model > i need to use ModelForm, but im lost with something... i have a view > that render a Form (ModelFrom) and save this, but now i need to use > the  funcion SAVE in the  Model (for use in the

Re: Im lost with Save function in model and saving data from Form

2009-08-06 Thread Asinox
Thanks Daniel for reply ill tell u my problem, this form work fine in the User Panel , but in the Admin dont work. exactly my problem: i have a form... when the form is saved, im saving "pub_date" data in another database table, that is fine in the User Panel, but in the Admin panel don't work.

Re: python md5

2009-08-06 Thread Peter Herndon
On 08/06/2009 01:55 PM, Asinox wrote: > Hi guys, please i need to know why md5 return this: > > > > > the way that im using: > > def encriptar(): > toEncode = pickle.dumps(datetime.now) > encoded = md5.new(toEncode) > > return encoded > Because encoded is an md5 hash *object*.

Re: python md5

2009-08-06 Thread Asinox
Thanks Alex Gaynor :) is working :) On Aug 6, 1:57 pm, Alex Gaynor wrote: > On Thu, Aug 6, 2009 at 12:55 PM, Asinox wrote: > > > Hi guys, please i need to know why md5 return this: > > > > > > the way that im using: > > > def encriptar(): > >    toEncode = pickle.dumps(datetime.now) > >    enco

Re: How much DB queries is too much?

2009-08-06 Thread Daniel Roseman
On Aug 6, 5:07 pm, koranthala wrote: > Hi, >    I am designing a website with Django and Apache. This is my first > foray to web designing, even though I have quite a bit of experience > in another area. >    The logic for the site is somewhat involved - It is better to think > of it as more of a

Re: python md5

2009-08-06 Thread James Bennett
On Thu, Aug 6, 2009 at 1:16 PM, Asinox wrote: > Thanks Alex Gaynor :) is working :) It's very important to note that the documentation for this module would have given you the same information. In general, you should be doing your best to read and familiarize yourself with documentation so that y

Re: creating a list of sql that is executed

2009-08-06 Thread Shawn Milochik
Look for the post_save signal. Once you can attach your own function to that signal (make it listen for the signal and kick something off), you can probably have Django dump the raw SQL query that is created to a text file. I don't know the syntax for that, but check the django.db docs. Ha

Re: cache and multple languages

2009-08-06 Thread cwurld
Hi, Thanks for the response and for sharing your code. It looks like it is exactly what I need. I am somewhat surprised that functionality is not a standard part of django. I will give it a try sometime next week! Thanks again, Chuck On Aug 5, 5:17 pm, kmike wrote: > Hi, > I've recently creat

checking/using model data in form save

2009-08-06 Thread zayatzz
Hello I am not entirely sure if i am asking the right question, but here is what am trying to do. I am saving user mugshot with form and it works just fine. I rename the uploaded file to mugshot.[insert imagefile extension here], but i want to do more in form save method than just that. 1) i wa

Re: checking/using model data in form save

2009-08-06 Thread Daniel Roseman
On Aug 6, 8:36 pm, zayatzz wrote: > Hello > > I am not entirely sure if i am asking the right question, but here is > what am trying to do. > > I am saving user mugshot with form and it works just fine. I rename > the uploaded file to mugshot.[insert imagefile extension here], but i > want to do

getting current page URL in a Django Template

2009-08-06 Thread NealWalters
Is there a keyword that will automatically put the URL of the current page in the Django form? Or do I have to do that in code and pass it to the form as a normal user variable? Here's what I'm trying to accomplish. I have a feedback form on a base template. When the user clicks the feedback but

Re: Customzing form fields in Admin in list_editable mode?

2009-08-06 Thread Adam V.
Bug entered w/ patch: http://code.djangoproject.com/ticket/11651 On Jun 18, 1:24 pm, Alex Gaynor wrote: > On Thu, Jun 18, 2009 at 3:21 PM, Adam V. wrote: > > > Alex, thanks; that's what I was afraid of. > > If no one else has, I'd be willing to take a stab at a patch for 1.2. > > > On Jun 18, 1

Re: getting current page URL in a Django Template

2009-08-06 Thread Daniel Roseman
On Aug 6, 9:33 pm, NealWalters wrote: > Is there a keyword that will automatically put the URL of the current > page in the Django form? > Or do I have to do that in code and pass it to the form as a normal > user variable? > > Here's what I'm trying to accomplish. I have a feedback form on a bas

Re: python md5

2009-08-06 Thread Asinox
Thanks guys :) On Aug 6, 2:32 pm, James Bennett wrote: > On Thu, Aug 6, 2009 at 1:16 PM, Asinox wrote: > > Thanks Alex Gaynor :) is working :) > > It's very important to note that the documentation for this module > would have given you the same information. In general, you should be > doing you

Re: Django/ Python 3 - nervous about starting large project

2009-08-06 Thread Wayne Koorts
Hi Tony, > @Wayne: Thanks for the welcome.  Why are you using 2.5 for your new/ > large project instead of 2.6? It just seems to be the "sweet spot" release at the moment. I just found that a few of the libraries I had been using, even in the last couple of months, had some kind of problem with

linking to an image in an HttpResponse on development web server

2009-08-06 Thread cabenson
Hello, Using the builtin/development web server, I am trying to embed an tag in an html response within HttpResponse, but am having no luck with the link to the image. Specifically: Here's my return statement: return HttpResponse('') Here are the relevant strings in settings.py: MEDIA_ROOT

access to REQUEST_URI ?

2009-08-06 Thread Rebecca K
I'm working on an ARK (Archival Resource Key) resolver in django, and as part of the ARK spec I need to recognize and distinguish urls ending with '?' and '??' (no query string or anything else following). When I run my django app through mod_wsgi, I have access to request.META['REQUEST_URI'], w

Why two identical entries in django.test.utils.ContextList while testing?

2009-08-06 Thread ristretto.rb
Hello, I'm working on some unit tests using the Client that comes with subclassing django.test.TestCase. When run code like this response = self.client.get("/project/usecase") The object response.context is a list type object containing two identical Dictionaries. So, this errors ... sel

Mod_wsgi and Apache Problems - Unhandled request return Internal Server Error / Premature end of script headers

2009-08-06 Thread pcrutch
So I run the dev server for my project and everything comes up fine, map shows properly and loads the data correctly. However, using wsgi the map loads and gives " Unhandled request return Internal Server Error" and I checked the log file and I have the " premature end of script headers" error. I

Re: access to REQUEST_URI ?

2009-08-06 Thread Alex Koshelev
Hi, Rebecca! Try to use request's `get_full_path` [1] method. It's environment independent and produces full path string with query. [1]: http://docs.djangoproject.com/en/dev/ref/request-response/#django.http.HttpRequest.get_full_path --- Alex Koshelev On Fri, Aug 7, 2009 at 1:37 AM, Rebecca K

Re: ValueError when uploading image

2009-08-06 Thread Malcolm MacKinnon
I think I've fixed the problem. It had to so with PIL not being installed correctly. Check out this link: http://www.answermysearches.com/fixing-pil-ioerror-decoder-jpeg-not-available/320/for a possible solution. Now, jpeg images are uploaded and saved. On Thu, Aug 6, 2009 at 6:42 PM, Mac wrote

Re: Why two identical entries in django.test.utils.ContextList while testing?

2009-08-06 Thread Karen Tracey
On Thu, Aug 6, 2009 at 5:41 PM, ristretto.rb wrote: > > Hello, > > I'm working on some unit tests using the Client that comes with > subclassing django.test.TestCase. > > When run code like this > > response = self.client.get("/project/usecase") > > The object response.context is a list type obj

Re: Why two identical entries in django.test.utils.ContextList while testing?

2009-08-06 Thread ristretto.rb
Ah, that's it. Thanks Karen. What an awesome quick response. My mistake. Thanks gene On Aug 7, 10:28 am, Karen Tracey wrote: > On Thu, Aug 6, 2009 at 5:41 PM, ristretto.rb wrote: > > > Hello, > > > I'm working on some unit tests using the Client that comes with > > subclassing django.test

Getting Started, tutorial newbie

2009-08-06 Thread zignorp
Hello, I'm going through the tutorial when I have time. A few weeks back, I created the polls app, was able to retrieve data and use the admin interface and everything was beautiful. Now I'm trying to catch up where I left off and am having problems. When I do the runserver command, it tells me

django-threadedcomments app

2009-08-06 Thread Margie
Anyone know any status on the django-threadedcomments app? The google group on it seems to be inactive. The last update I see about it is: March 31, 2009: Released version 0.5 of the application and moved. This is the last of this line--the next release will be a large rewrite to use the commen

Re: syncdb does not find app on the PYTHONPATH

2009-08-06 Thread Matthew
I tried your suggestion and got this: >>> from coltrane.models import Category Traceback (most recent call last): File "", line 1, in File "/home/matthew/dev/source/coltrane/models.py", line 3, in from django.db import models File "/usr/local/lib/python2.6/dist-packages/django/db/__in

Re: syncdb does not find app on the PYTHONPATH

2009-08-06 Thread Matthew
I tried your suggestion and got this: >>> from coltrane.models import Category Traceback (most recent call last): File "", line 1, in File "/home/matthew/dev/source/coltrane/models.py", line 3, in from django.db import models File "/usr/local/lib/python2.6/dist-packages/django/db/__in

Re: access to REQUEST_URI ?

2009-08-06 Thread Graham Dumpleton
On Aug 7, 7:37 am, Rebecca K wrote: > I'm working on an ARK (Archival Resource Key) resolver in django, and > as part of the ARK spec I need to recognize and distinguish urls > ending with '?' and '??'  (no query string or anything else > following). > > When I run my django app throughmod_wsgi

Re: Mod_wsgi and Apache Problems - Unhandled request return Internal Server Error / Premature end of script headers

2009-08-06 Thread Graham Dumpleton
On Aug 7, 7:43 am, pcrutch wrote: > So I run the dev server for my project and everything comes up fine, > map shows properly and loads the data correctly. However, using wsgi > the map loads and gives " Unhandled request return Internal Server > Error" and I checked the log file and I have the

Re: django-threadedcomments app

2009-08-06 Thread Eric Florenzano
I moved development over to GitHub [1] and have actually gone ahead with that big rewrite (thanks also to Honza and team Ella, as well as Thejaswi Puthraya). It's a total rewrite with very little common code, so none of the documentation is up to date. The old 0.5.X version is stable enough, and

Re: django-threadedcomments app

2009-08-06 Thread Margie
Hi Eric, Thanks for the info. A couple questions: * Does the .5 version work with django 1.1? * Do you have any sort of ETA on when you think the GitHub version will be ready for public use? Is it in a form now that it could actually be used? IE, if I am willing to dive in and look at the

Re: python md5

2009-08-06 Thread Kenneth Gonsalves
On Friday 07 Aug 2009 12:02:19 am James Bennett wrote: > On Thu, Aug 6, 2009 at 1:16 PM, Asinox wrote: > > Thanks Alex Gaynor :) is working :) > > It's very important to note that the documentation for this module > would have given you the same information. In general, you should be > doing your

Re: syncdb does not find app on the PYTHONPATH

2009-08-06 Thread Matthew
It looks like the issue is resolved. Many thanks to Kenneth and Daniel. Here's the summary to help others: It looked at first like the PYTHONPATH was not picking any of my apps or the third-party apps up when running syncdb. This was not the case. Instead, coltrane's classes weren't loading b

Re: Getting Started, tutorial newbie

2009-08-06 Thread zignorp
figured it out, but I'm not sure I can articulate what I did. I had to start the shell first, then import my model. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send e

Re: multi-table inheritance and modification of OneToOneField options

2009-08-06 Thread Malcolm Tredinnick
On Thu, 2009-08-06 at 07:15 -0700, Jan Ostrochovsky wrote: > Hello, > > http://docs.djangoproject.com/en/dev/topics/db/models/#multi-table-inheritance > says: > The inheritance relationship introduces links between the child model > and each of its parents (via an automatically-created OneToOneFi

Re: How-to use SelectMultiple widget with CommaSeparatedIntegerField ?

2009-08-06 Thread Malcolm Tredinnick
On Thu, 2009-08-06 at 07:35 -0700, nono wrote: > I was reading my post and though it was not very clear > > My model uses CommaSeparatedIntegerField to store some integer values. > I want my users to use SelectMultiple widget to create/update those > integer so I put a ChoiceField with widget=Sel

Re: DateInput widget, format attr & ugettext

2009-08-06 Thread Malcolm Tredinnick
On Thu, 2009-08-06 at 08:06 -0700, cArkraus wrote: > Hey all, > > I cant seem to get my (non-model-)forms datefield localized. > > Here's my first attempt: > some_date = fields.DateField(widget=widgets.DateInput(format=ugettext > ('%d.%m.%Y'))) This would do the translation when the file is imp

Re: creating a list of sql that is executed

2009-08-06 Thread Stephen Moore
On Fri, Aug 7, 2009 at 2:56 AM, Shawn Milochik wrote: > > Look for the post_save signal. > > Once you can attach your own function to that signal (make it listen > for the signal and kick something off), you can probably have Django > dump the raw SQL query that is created to a text file. I don't

  1   2   >