Uploading pictures problem

2007-05-12 Thread Martin Tomov
I am making a photo gallery as a project from school and I got stuck on the uploading picture part of it. Initially I started with the oldforms and I successfully uploaded pictures. But I have 2 questions. So I have this code: if request.method == 'POST': # If data was POSTed, we're tryin

Re: Looking For A Django Developer

2007-05-12 Thread Kenneth Gonsalves
On 12-May-07, at 12:00 PM, [EMAIL PROTECTED] wrote: > United States. I've had troubles in the past with foreign developers, please avoid comments like this - it is sufficient to specify the geographical area -- regards kg http://lawgon.livejournal.com http://nrcfosshelpline.in/web/ --~-

tutorial help

2007-05-12 Thread h2o
Hi, I'm new to django and programing. I was following the tutorial and get to the following: Wait a minute. is, utterly, an unhelpful representation of this object. Let's fix that by editing the polls model (in the polls/models.py file) and adding a __str__() method to both Poll and Choice: cl

Re: tutorial help

2007-05-12 Thread Isbaran Akcayir
You'll add it inside your Poll class, maybe you should first read a python tutorial, it'll be helpful, good luck class Choice(models.Model): question = models.CharField(maxlength=200) pub_date = models.DateTimeField('date published') def __str__(self): return self.choice --~--~-

Re: Translation of class names

2007-05-12 Thread Vinay Sajip
On May 11, 4:20 pm, Maxim Bodyansky <[EMAIL PROTECTED]> wrote: > Hmmm. It just works. And i18n for module names works too :) > Many-many thanks, Ivan :) Это не Иван, это - Vinay --~--~-~--~~~---~--~~ You received this message because you are subscribed to the G

Can't block me

2007-05-12 Thread cybiao
http://www.cantblockme.info is a free anonymous proxy which allows you to unblock myspace, bebo, facebook, youtube and other websites from your school, workplace or home! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Grou

Re: Translation of class names

2007-05-12 Thread Maxim Bodyansky
В сообщении от Суббота 12 мая 2007 12:36 Vinay Sajip написал(a): > On May 11, 4:20 pm, Maxim Bodyansky <[EMAIL PROTECTED]> wrote: > > Hmmm. It just works. And i18n for module names works > > too :) Many-many thanks, Ivan :) > > Это не Иван, это - Vinay Извиняюсь, померещилось :) Всё равно спасиб

Problems with i18n support

2007-05-12 Thread Psamathos
Hi, I'm trying to get some basic i18n support going but I'm get some weird errors. 1) I had to include the project in INSTALLED_APPS before anything would happend at all, but I've since removed that and I'm trying to translate a single app. 2) I've been digging around the django code to figure o

Re: Problems with i18n support

2007-05-12 Thread Psamathos
On 12 Maj, 11:25, Psamathos <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to get some basic i18n support going but I'm get some weird > errors. > > 1) I had to include the project in INSTALLED_APPS before anything > would happend at all, but I've since removed that and I'm trying to > translat

Using Django AMF with Flash CS3

2007-05-12 Thread Tomohiro Otsuka
Hi all, I released Strippers Remoting Classes which enables you to invoke remoting service from Flash CS3 application. The example code was added to the user manual. http://djangoamf.sourceforge.jp/index.php?UserManual_en#RemoteServiceInvocationFromFlashCS3 http://djangoamf.sourceforge.jp/inde

Re: Problems with i18n support

2007-05-12 Thread Malcolm Tredinnick
On Sat, 2007-05-12 at 02:25 -0700, Psamathos wrote: > Hi, > > I'm trying to get some basic i18n support going but I'm get some weird > errors. > > 1) I had to include the project in INSTALLED_APPS before anything > would happend at all, but I've since removed that and I'm trying to > translate a

Re: Problems with i18n support

2007-05-12 Thread Psamathos
On 12 Maj, 11:39, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Sat, 2007-05-12 at 02:25 -0700, Psamathos wrote: > > Hi, > > > I'm trying to get some basic i18n support going but I'm get some weird > > errors. > > > 1) I had to include the project in INSTALLED_APPS before anything > > would

Re: Fixtures for Dummies?

2007-05-12 Thread Christian M Hoeppner
> If you don't want to go down that path, we do have built in support > for JSON, XML, and YAML; so you will need to get your CSV data into > one of these formats. I've been using YAML for this purpose before, when using Symfony, and it's a quite natural way to describe data, only tied by indent

Re: adding XSLT templating to Django

2007-05-12 Thread Eugene Morozov
Hello Nic, On 11 май, 13:23, Nic James Ferrier <[EMAIL PROTECTED]> wrote: > def user_alerts(request, user_name): > me = get_object_or_404(User, username=user_name) > alerts = Alert.objects.filter(user=me, seen=False) > return tfxslt.send_json(HttpResponse(), >

File layout.

2007-05-12 Thread Christian M Hoeppner
Hi there, folks! I've been "playing" (actually shooting out projects like a printer) with Django for some time now, although I've joined the list far after. To the point. My hosting is a mess. I have a superb dedicated virtual server. This, of course, means that I've set up everything myself,

Environments, or how to have multiple settings files.

2007-05-12 Thread Christian M Hoeppner
Hi there, In a previous mail, I said something about missing something from Symfony. It's the environment. You where able to set up a front controller (basically, the file you're calling in the url, and that calls the rest of the app), for say a staging environment, let your client access the

Re: adding XSLT templating to Django

2007-05-12 Thread Nic James Ferrier
Eugene Morozov <[EMAIL PROTECTED]> writes: > On 11 май, 13:23, Nic James Ferrier <[EMAIL PROTECTED]> > wrote: >> def user_alerts(request, user_name): >> me = get_object_or_404(User, username=user_name) >> alerts = Alert.objects.filter(user=me, seen=False) >> return tfxslt.send_json(Ht

Re: Fixtures for Dummies?

2007-05-12 Thread Russell Keith-Magee
On 5/12/07, Christian M Hoeppner <[EMAIL PROTECTED]> wrote: > > The environment is a neat thing I've been missing in Django so far. Depending > on the way you call your app, you get a different set of settings loaded. > Neat for development/production/staging/else. I don't know much about Symfony

Re: Fixtures for Dummies?

2007-05-12 Thread Tim Chase
> You are correct - initial_data fixtures is the preferred mechanism for > loading data. Okay...things are starting to make a bit more sense. I'll post a few more questions and hopefully this thread can become the foundation for the documentation you describe. One of the questions coming to min

Re: tutorial help

2007-05-12 Thread Tim Chase
> You'll add it inside your Poll class, maybe you should first read a > python tutorial, it'll be helpful, > good luck > > class Choice(models.Model): >question = models.CharField(maxlength=200) >pub_date = models.DateTimeField('date published') >def __str__(self): >return sel

Re: assertRedirects

2007-05-12 Thread Jiri Barton
I could live with doing multiple checks. In fact, I may want to check every URL in the redirecting chain to make sure the flow is just what I wanted. Then, I can just hard code the URLs in the chain: response = self.client.get('/page') self.assertRedirects(response, '/first/') # no need to retu

Malformed header from script.

2007-05-12 Thread Anthony Batchelor
Hi, I've developed a site that worked locally, but when I put it onto Dreamhost I started having problems with some areas. If you go to http://haircrazy.info/Tags/ and select a tag. You should go to a list of articles/posts etc. for that tag. Instead you are re-directed to the front page, the erro

Re: Fixtures for Dummies?

2007-05-12 Thread Christian M Hoeppner
> I don't know much about Symfony, but as I understand what you are > saying, the Django approach to achieving this would be to have > multiple fixtures, one for each 'environment'. This one was more of an off-topic comment. Environments in Symfony are about settings, not about fixtures. You're a

Re: Extending generic views and pagination

2007-05-12 Thread ilDave
Anybody has any suggestion? --~--~-~--~~~---~--~~ 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 [EMA

Re: Fixtures for Dummies?

2007-05-12 Thread Russell Keith-Magee
On 5/12/07, Christian M Hoeppner <[EMAIL PROTECTED]> wrote: > > > I don't know much about Symfony, but as I understand what you are > > saying, the Django approach to achieving this would be to have > > multiple fixtures, one for each 'environment'. > This one was more of an off-topic comment. Env

Re: Fixtures for Dummies?

2007-05-12 Thread Russell Keith-Magee
On 5/12/07, Tim Chase <[EMAIL PROTECTED]> wrote: > > > You are correct - initial_data fixtures is the preferred mechanism for > > loading data. > > Okay...things are starting to make a bit more sense. > > I'll post a few more questions and hopefully this thread can > become the foundation for the

Re: assertRedirects

2007-05-12 Thread Russell Keith-Magee
On 5/12/07, Jiri Barton <[EMAIL PROTECTED]> wrote: > > I could live with doing multiple checks. In fact, I may want to check > every URL in the redirecting chain to make sure the flow is just what > I wanted. That was my point - the fact that /second redirects to /third is just as important as th

Re: loaddata and foreignKey: manage.py silently failing

2007-05-12 Thread Russell Keith-Magee
On 5/10/07, sandro dentella <[EMAIL PROTECTED]> wrote: > > hi, > > I'm trying to play with initial_data fixture. I dumpdata (json > format) > and reload it cleanly if there are no foreign key contraints on the > table. > If the tables i'm dumping have foreign keys (in my case holydays/ > nat

Re: loaddata issue

2007-05-12 Thread Russell Keith-Magee
On 5/7/07, Mark Jarecki <[EMAIL PROTECTED]> wrote: > > Hi Russ, > > Thank you for all your help, I renamed my app name and it works fine > at the moment. > > I posted a ticket (I hope its ok, my fist one) #4231. Ticket description was fantastic. FYI, I've fixed the problem in [5204]. The problem

problem uploading, foreign key tabular

2007-05-12 Thread Enquest
I use python 2.5 I get the following error in the admin "string index out of range" Why do I get this error? The model classes are in question are: 12 class Work(models.Model): 13 datum = models.DateTimeField() 14 omschrijving = models.CharField(maxlength=255) 15 def __str__(sel

Re: problem uploading, foreign key tabular

2007-05-12 Thread Malcolm Tredinnick
On Sat, 2007-05-12 at 17:55 +0200, Enquest wrote: > I use python 2.5 Are you really using a Python 2.5 final release, or a pre-release of, say, Python 2.5.1 that came with the recent Ubuntu release? The reason I'm asking is because there was a regression in 2.5.1 pre-releases that was fixed just

Re: string index out of range

2007-05-12 Thread Mark Phillips
On May 11, 2007, at 9:40 PM, Malcolm Tredinnick wrote: > More information is definitely needed here. You've just done the > equivalent of "I've had a car accident." "Where should we send the > auto > service?" "There's a traffic light here." Thanks for the reply, Malcolm. --~--~-~--~

Re: Empty QuerySet while using dates() method. Is it a bug?

2007-05-12 Thread Russell Keith-Magee
On 5/4/07, Patrick Anderson <[EMAIL PROTECTED]> wrote: > > Below is my view function to retrieve month values from a QuerySet: > > def year_get_months(request, year, template_name): > > months = Letter.objects.filter( > date_published__year = year > ).dates('date_published', 'm

ORDER BY in SQL statement

2007-05-12 Thread checco
I have a table containing the fields "original_price" and "discounted_price". I want to order the results of an SQL statement according to the relative discount which is: (original_price- discounted_price)/original_price. So I wrote the following SQL statement: SELECT id, name FROM offers_offer O

Re: ORDER BY in SQL statement

2007-05-12 Thread Malcolm Tredinnick
On Sat, 2007-05-12 at 16:12 +, checco wrote: > I have a table containing the fields "original_price" and > "discounted_price". I want to order the results of an SQL statement > according to the relative discount which is: (original_price- > discounted_price)/original_price. > > So I wrote the

Grabbing a list of years, months, etc.

2007-05-12 Thread Peter Sanchez
I am working on my first "real" django project which includes a weblog. I would like to create an Archives page that lists each year and month of that year, dynamically. ie, May, 2007 April, 2007 November, 2006 etc.. Is this possible to generate quickly from a model containing a DateT

Re: Extending generic views and pagination

2007-05-12 Thread book4e
I think a dict contain queryset and extra info should be passed in url patterns as third parameter. maybe this will work in your urls.py myObj_dict = { 'queryset': myObj.objects.all(), 'paginate_by': 10, } (r'^list/$', 'django.views.generic.list_detail.object_list', entry_dict), --~--~-

Re: Extending generic views and pagination

2007-05-12 Thread book4e
I am sorry for the typo. (r'^list/$', 'django.views.generic.list_detail.object_list', entry_dict), should be: (r'^list/$', 'django.views.generic.list_detail.object_list', myObj_dict), --~--~-~--~~~---~--~~ You received this message because you are subscribed to th

trouble using fastcgi

2007-05-12 Thread Mark Phillips
I hope I can provide enough information to allow someone to point me in the right direction. When I start apache 1.3, the error log contains these message: [error] (22)Invalid argument: FastCGI: access for server (uid 70, gid 70) failed: write not allowed [notice] FastCGI: pro

Re: loaddata and foreignKey: manage.py silently failing

2007-05-12 Thread Sandro Dentella
> Interesting. The "installed n fixtures" message is printed before the > transaction is commited, which might be causing the confusion, but if > the commit isn't succeeding, you should be seeing other errors (i.e., > db failures). Is it possible that stderr is getting redirected > somewhere other

Re: Malformed header from script.

2007-05-12 Thread Mark Phillips
On May 12, 2007, at 6:02 AM, Anthony Batchelor wrote: > > Hi, > I've developed a site that worked locally, but when I put it onto > Dreamhost I started having problems with some areas. If you go to > http://haircrazy.info/Tags/ and select a tag. You should go to a list > of articles/posts etc. f

Editing seveal object in one page

2007-05-12 Thread Henrik Lied
Hello! Ok, this is the scenario: An album contains several images. The user can click on "manage album", and get a list of all the images contained inside the specific album. The user should then be able to edit information on each individual image on one page, and click a "Submit"-button at the

Re: string index out of range

2007-05-12 Thread Don Arbow
You stated you got a python traceback and yet you only show us the error message. What Malcolm was trying to say was that it would be helpful to print out that traceback, rather than your Apache configuration, at least to start with. When debugging a problem it's always best to start with t

Re: self referential many to many relationships

2007-05-12 Thread C
Ok, I've run upon another stumbling block. I did as you recommended and created a Relation model. I'd like to be able to edit/create a Relation inline with a Part in the django admin. The example provided in the tutorial for editing inline doesn't work in this situation. Is it doable at all?

ERD

2007-05-12 Thread Lars Stavholm
Hi all, I'm going bananas looking for a ERD tool that was available on the www.djangoproject.com site a year ago. I think it was mentioned together with a link in one of the comments on one of the pages soewhere (yeah, that's vague:). I remember trying it out and it worked just fine, taking the d

Re: adding XSLT templating to Django

2007-05-12 Thread Eugene Morozov
On 12 май, 17:08, Nic James Ferrier <[EMAIL PROTECTED]> wrote: > Eugene Morozov <[EMAIL PROTECTED]> writes: > > Sorry, I don't get the point. I think that XSLT is a way to separate > > presentation from data. But your json looks like some kind of HTML. I > > don't understand how this is better tha

unsubscribe

2007-05-12 Thread Mohamed Hussein
-- Mohamed Hussein http://www.unixgarage.com --~--~-~--~~~---~--~~ 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

Re: string index out of range

2007-05-12 Thread Mark Phillips
Thank you, Don. I understand what Malcolm wrote. I didn't include the trace back and that was indeed a mistake. After walking through the set up and making some adjustments to .htaccess, I stopped getting a trace back in the browser. Thus, I didn't have much to share with Malcolm. This mor

Re: adding XSLT templating to Django

2007-05-12 Thread Nic James Ferrier
Eugene Morozov <[EMAIL PROTECTED]> writes: >> - there is proper separation between data and style, my JSON doesn't >> include any stylistic information, only stuff that describes the data > > I still think that your example is not the best. "div" and "span" has > no semantic meaning, they're ju

Django's "Free Comments" posted.html referring to itself

2007-05-12 Thread [EMAIL PROTECTED]
I'm new to Django and I'm using Django's Free Comments described here: http://code.djangoproject.com/wiki/UsingFreeComment The comments are posted correctly, except on this page ("posted.html"): Thanks for contributing. View your comment. The link generated by "object.get_absolute_u

Re: adding XSLT templating to Django

2007-05-12 Thread anders conbere
On 5/12/07, Nic James Ferrier <[EMAIL PROTECTED]> wrote: > > Eugene Morozov <[EMAIL PROTECTED]> writes: > > >> - there is proper separation between data and style, my JSON doesn't > >> include any stylistic information, only stuff that describes the data > > > > I still think that your example i

Archives

2007-05-12 Thread Levi McCallum
I am trying to build an archives page for my already existing Django powered blog. Now it's really nothing fancy. I want it to list the months under a year heading that things are posted on, and the user should be able to click on the month, the month goes to a url something like /2007/jan

Django.June: a Django get-together in western Massachusetts USA

2007-05-12 Thread pbx
Hi all, For those who don't follow the Django community aggregator I thought I'd send this out to the lists. I'm arranging an informal get-together of Django folks next month here in Northampton, MA. http://open.e-scribe.com/wiki/DjangoDotJune Here's a condensed version of the info from that p

Re: ERD

2007-05-12 Thread Nowell
I believe you are referring to http://code.djangoproject.com/wiki/DjangoGraphviz On May 12, 3:08 pm, Lars Stavholm <[EMAIL PROTECTED]> wrote: > Hi all, > > I'm going bananas looking for a ERD tool that was available on > thewww.djangoproject.comsite a year ago. I think it was mentioned together

Re: ERD

2007-05-12 Thread Lars Stavholm
Nowell wrote: > I believe you are referring to > http://code.djangoproject.com/wiki/DjangoGraphviz That's the one! Thanks /Lars > On May 12, 3:08 pm, Lars Stavholm <[EMAIL PROTECTED]> wrote: >> Hi all, >> >> I'm going bananas looking for a ERD tool that was available on >> thewww.djangoprojec

"'BoundField' object is unsubscriptable " error when trying to upload file

2007-05-12 Thread jonathan_ou
I am trying to upload a file using the newforms library. So far from reading other posts and googling around it appears I have to copy the request.POST dictionary and update it with request.FILES. Then I would do a "model.save__file(, )" to actually save the file. Here's the code where I try to

Re: "'BoundField' object is unsubscriptable " error when trying to upload file

2007-05-12 Thread Russell Keith-Magee
On 5/13/07, jonathan_ou <[EMAIL PROTECTED]> wrote: > > I am trying to upload a file using the newforms library. So far from > reading other posts and googling around it appears I have to copy the > request.POST dictionary and update it with request.FILES. Then I > would do a "model.save__file(,

Re: self referential many to many relationships

2007-05-12 Thread Russell Keith-Magee
On 5/13/07, C <[EMAIL PROTECTED]> wrote: > > Ok, I've run upon another stumbling block. I did as you recommended > and created a Relation model. I'd like to be able to edit/create a > Relation inline with a Part in the django admin. > > The example provided in the tutorial for editing inline doe

QuerySet from list of objects

2007-05-12 Thread checco
I want to make a generic object_list view and for some reasons I can't directly generate the QuerySet (which is a necessary parameter of the object_list) but I can retrieve the list of objects I want to display using a raw SQL statement. As I still want to use the object_list view, which needs a Q

Re: Grabbing a list of years, months, etc.

2007-05-12 Thread orestis
You ca use: Entry.objects.all().dates('pub_date','month','DESC') lookup the dates function of the QuerySet. On May 12, 7:18 pm, Peter Sanchez <[EMAIL PROTECTED]> wrote: > I am working on my first "real" django project which includes a weblog. > > I would like to create an Archives page that lis

Re: QuerySet from list of objects

2007-05-12 Thread James Bennett
On 5/12/07, checco <[EMAIL PROTECTED]> wrote: > into a QuerySet? Or maybe there is a way to pass to the object_list > view directly the list of objects as returned by the SQL statement > (with cursor.fetchall())? If you've got the list of ids, you can use an 'id__in' lookup to get a QuerySet out

Re: First impression of django

2007-05-12 Thread Kent Johnson
James Bennett wrote: > On 5/11/07, Nic James Ferrier <[EMAIL PROTECTED]> wrote: >> Something needs to be done though... or ongoing maintenance of Django >> apps is going to be really hard. > > I haven't found it terribly hard with a little coding discipline; the > way we've handled it is to write

My django-related blog

2007-05-12 Thread orestis
I've sent this to Jacob to be included in the blog roll, but since he hasn't responded still, maybe the email somehow went missing. So, drop by my blog: http://orestis.gr/ and leave a comment. I plan to have a lot of write-ups about the making of it, and as I discover more features of Django I'

Re: string index out of range

2007-05-12 Thread Malcolm Tredinnick
On Sat, 2007-05-12 at 13:29 -0700, Mark Phillips wrote: > Thank you, Don. I understand what Malcolm wrote. I didn't include the > trace back and that was indeed a mistake. > > After walking through the set up and making some adjustments > to .htaccess, I stopped getting a trace back in the br