Custom Feeds

2010-02-09 Thread Mark
There are a couple threads about creating custom syndication feeds, but none ever seem to arrive at an answer. Has anyone figured out how to add custom item elements to a feed? The example in the django docs shows very clearly how to add hard-coded attributes to the root, but avoids offering an ex

Re: how to redirect to another page in if else condition.

2010-02-09 Thread David
Generally, when you are redirecting, you usually aren't returning an HTTP status code of 200. Redirecting implies a status code in [300,400). You might want to take a look at the HttpResponse subclasses: http://docs.djangoproject.com/en/dev/ref/request-response/#httpresponse-subclasses However, if

Re: Is any thing for python like .jar files for java.

2010-02-09 Thread Kenneth Gonsalves
On Wednesday 10 Feb 2010 11:41:50 am chiranjeevi muttoju wrote: > Thanks for your reply. i didnt get what u said. sorry, would u please > explain me in detail. I want to work on that. so please reply. > this has nothing to do with django - it would be a good idea if you asked in some python foru

model validation fails if a field is excluded in the modelform

2010-02-09 Thread Kenneth Gonsalves
hi, I have a modelForm for a model where one field is excluded. One of the lines in my model validation needs that field - so model validation fails with a 'DoesNotExist' error. How does one get round this? The relevant parts of the model and the traceback are appended. The field excluded is 'p

Re: Is any thing for python like .jar files for java.

2010-02-09 Thread chiranjeevi muttoju
Hi dasleah, Thanks for your reply. i didnt get what u said. sorry, would u please explain me in detail. I want to work on that. so please reply. On Wed, Feb 10, 2010 at 2:59 AM, Dasleah wrote: > What exactly do you mean? Compiling a group of .py scripts into one > container? There are a number o

Re: 'ValidationError' object has no attribute 'message_dict'

2010-02-09 Thread Kenneth Gonsalves
On Tuesday 09 Feb 2010 8:42:59 pm Karen Tracey wrote: > > so it means sticking to form validation for the time being? > > There is a patch on the ticket you could try. If you want to help move the > process along that patch is missing tests -- so tests integrated into the > test suite would probab

Re: 'ValidationError' object has no attribute 'message_dict'

2010-02-09 Thread Kenneth Gonsalves
On Wednesday 10 Feb 2010 6:07:15 am Joseph Kocherhans wrote: > > I am using the latest revision 12398. I am trying model validation - but > > the simplest validation possible is giving me an error - if the data is > > valid, no error, but on invalid data I get the traceback appended below. > > Am

Re: What hosting companies do you use for django hosting?

2010-02-09 Thread Kenneth Gonsalves
On Wednesday 10 Feb 2010 1:42:32 am rebus_ wrote: > http://www.hetzner.de/en/hosting/produktmatrix/rootserver-produktmatrix/ > +1 -- regards Kenneth Gonsalves Senior Project Officer NRC-FOSS http://nrcfosshelpline.in/web/ -- You received this message because you are subscribed to the Google Gr

how to redirect to another page in if else condition.

2010-02-09 Thread Keyan
I am new to django!! working in windows. I have created a login page and validating in view.py file code wil go like this for x in log: if u_name ==x[1]: return render_to_response('index.html',{"log":log}) else: return render_to_response('wrong.html

Re: Feedback on Models setup

2010-02-09 Thread Sam Lai
I'd just have one many-to-many field connecting students with courses. Then in the admin interface, create views that allow adding entire groups to a course, which would just loop through every student in a group and add them to the course. Splitting them up like you have (individual students, gro

I'm having an issue with clean() method in ModelForm

2010-02-09 Thread Roboto
Hey all, some quick background. I am attempting to have email as username within the confines of the contrib.auth.models User Everything seems okay, except that my modelForm despite what I believe is a custom clean Method is not being run (according to my debugger, it's just jumping past this meth

Stock trading app

2010-02-09 Thread mf
Someone knows about an open source stock trading application?. I'm not talking about a professional app, I mean a simple app where the different stock holders of a company can sell/buy stocks between them. -- You received this message because you are subscribed to the Google Groups "Django users

Re: Questions about Django suitability

2010-02-09 Thread Dasleah
Thanks for all your suggestions - looking over JSON it seems a much more straightforward and lightweight thing to deal with than XML, especially since it's so much closer to straight Python dictionaries (which I'm more than used to). To be honest, I had no real love of XML, but it seemed to be the

Can't get Uploaded File into DictReader

2010-02-09 Thread jeff
I'm trying to upload a CSV file specified by the user in a form and then parse it using DictReader. Everything seems to be working until I initialize DictReader with the uploaded file. As soon as I try to access any value in the row, it throws an odd exception. Am I doing something wrong or is

Re: Django Generator

2010-02-09 Thread Richard Shebora
OK. I have been trying it out. I have to say I like how structured everything comes out. It makes it easy to cross reference what I entered into the "Generator" site and the code it gave me. I now have a working project with some features that I can learn from. It's like having a seasoned Djan

Re: Questions about Django suitability

2010-02-09 Thread Shawn Milochik
You could do this in Django. Creating and editing the XML in JavaScript sounds like masochism. Why not just use Python? I agree with Brice's comment -- can you make things easier on yourself and use JSON instead of XML? Also, if you can use JSON, you might have a natural fit using MongoDB, which

Re: 'ValidationError' object has no attribute 'message_dict'

2010-02-09 Thread Joseph Kocherhans
On Feb 9, 2010, at 12:47 AM, Kenneth Gonsalves wrote: > hi, > > I am using the latest revision 12398. I am trying model validation - but the > simplest validation possible is giving me an error - if the data is valid, no > error, but on invalid data I get the traceback appended below. Am I doi

Re: Django Generator

2010-02-09 Thread Mike Ramirez
On Tuesday 09 February 2010 15:51:03 Brice Leroy wrote: > 2010/2/9 Mike Ramirez : > > On Tuesday 09 February 2010 15:12:21 Brice Leroy wrote: > >> Would you eat some food not cook by a professional ? > > > > I would be very wary of a person who hasn't cooked before... The > > difference is in exper

Additional fields not registered when subclassing Forms imported from other applications?

2010-02-09 Thread Simon Meers
This may be a python quirk I'm unaware of, or perhaps a Django bug, I'm not sure: # # forms.py: # from django import forms class TestForm(forms.Form): test_field

Re: Django Generator

2010-02-09 Thread Brice Leroy
2010/2/9 Mike Ramirez : > On Tuesday 09 February 2010 15:12:21 Brice Leroy wrote: >> Would you eat some food not cook by a professional ? >> > > I would be very wary of a person who hasn't cooked before... The difference is > in experience. it's just that I don't like those ridiculous images that

Re: Django Generator

2010-02-09 Thread Mike Ramirez
On Tuesday 09 February 2010 15:12:21 Brice Leroy wrote: > Would you eat some food not cook by a professional ? > I would be very wary of a person who hasn't cooked before... The difference is in experience. > > Because you can, doesn't mean that you should... > > > > It's this type of mentali

Re: Django Generator

2010-02-09 Thread Brice Leroy
2010/2/9 Mike Ramirez : > On Tuesday 09 February 2010 14:52:00 Frank W. Samuelson wrote: >> You are something of a killjoy, Mike. >> >> This could grow into a really great project, where people >> don't even have to learn programming to generate a usable >> django web database app. > > Isn't this w

Re: Django Generator

2010-02-09 Thread Mike Ramirez
On Tuesday 09 February 2010 14:57:26 Richard Shebora wrote: > Actually my first thought was... What a great learning tool! > > How many times did I want to do something but could not find a working > example to pick apart? I would think it would make a great way to > show proper layout and conven

Re: Django Generator

2010-02-09 Thread Mike Ramirez
On Tuesday 09 February 2010 14:52:00 Frank W. Samuelson wrote: > You are something of a killjoy, Mike. > > This could grow into a really great project, where people > don't even have to learn programming to generate a usable > django web database app. Isn't this what existing django-apps are for

Re: Django Generator

2010-02-09 Thread Brice Leroy
Thank you Richard. I put most of my coding convention inside and try to respect the pep8. A lot of work still need to be done. But I expect to reach my goal by the next 15 days Brice 2010/2/9 Richard Shebora : > Actually my first thought was... What a great learning tool! > > How many times did

Re: Django Generator

2010-02-09 Thread Brice Leroy
Wow... Thank you Frank. I really appreciate. That could be new direction that I didn't really think of. I will finish the permission, form and view integration and keep in mind to stay minimalistic. For now, if you have django source installed you just need to - download the targz file - run ./ma

Re: Django Generator

2010-02-09 Thread Richard Shebora
Actually my first thought was... What a great learning tool! How many times did I want to do something but could not find a working example to pick apart? I would think it would make a great way to show proper layout and conventions for newbies (like me). I have been programming in python for ye

Re: Django Generator

2010-02-09 Thread Frank W. Samuelson
You are something of a killjoy, Mike. This could grow into a really great project, where people don't even have to learn programming to generate a usable django web database app. They just design their app with the user friendly web interface, and it runs. It could even be integrated with h

Re: Questions about Django suitability

2010-02-09 Thread Brice Leroy
First you should consider JSON instead of xml: - Django can serialize every object in json - JSon is an object in javascript. so it should be easier to deal with data this way. 2010/2/9 Dasleah : > Hey all, > > Long-ago webhead here who hasn't touched much of anything since > Javascript was a

Re: Custom commands called outside project path

2010-02-09 Thread Bill Freeman
Or: * * * * * (cd /path/to/you/project ; ./manage.py yourcommand) The parentheses probably aren't necessary since the entire command portion of the crontab entry is almost certainly run in one shell. (I'm not sure about that "root" in creecode's version. Editing crontab with crontab -e on a lin

Re: satchmo customization experiences? customizing existing e-com vs. roll-your-own

2010-02-09 Thread snfctech
Thanks for your honesty, Chris. I'll keep the community posted if we go the Django and/or Satchmo route. On Feb 9, 8:55 am, Chris Moffitt wrote: > Based on the additional details describing what you're trying to do, you may > be reaching the threshold where Satchmo (or any current package) is go

Re: Django Generator

2010-02-09 Thread Mike Ramirez
On Tuesday 09 February 2010 14:26:16 Brice Leroy wrote: > > The big thing for me in terms of tools like this, is the ability to save > > time, which I don't think there is a difference between what django-admin > > has and your project. Because either way I need to still fill in the > > fields, th

Re: Tutorial 1: AttributeError at /time/ 'module' object has no attribute 'now'

2010-02-09 Thread Bill Freeman
Your code snippet works for me (though I'm just returning html rather than the HttpResponse object, for testing purposes). Be very sure that the spelling of everything in the file in question is correct and that you aren't, for example, using the name "datetime" for something else between the impo

Questions about Django suitability

2010-02-09 Thread Dasleah
Hey all, Long-ago webhead here who hasn't touched much of anything since Javascript was a dirty word and PHP was the be-all and end-all (but I've managed a bit of Python experience) I just have a few questions about whether or not Django was right for a project I'm thinking of and hopefully gettin

Re: Tutorial 1: AttributeError at /time/ 'module' object has no attribute 'now'

2010-02-09 Thread Karen Tracey
On Tue, Feb 9, 2010 at 5:19 PM, Nick Mellor wrote: > Thanks Shaun, > > I renamed the "now" variable as "dt" but it didn't help. I've also > tried your 1-tuple idea-- no change. > > Note that the offending line isn't the html assignment but: > > now = datetime.datetime.now() > > It seems that whate

Re: Tutorial 1: AttributeError at /time/ 'module' object has no attribute 'now'

2010-02-09 Thread Shawn Milochik
On Feb 9, 2010, at 5:24 PM, Mike Ramirez wrote: > On Tuesday 09 February 2010 14:19:17 Nick Mellor wrote: >> Thanks Shaun, >> >> I renamed the "now" variable as "dt" but it didn't help. I've also >> tried your 1-tuple idea-- no change. >> >> Note that the offending line isn't the html assignmen

Re: Custom commands called outside project path

2010-02-09 Thread creecode
Hello Tim, On Feb 9, 10:34 am, Tim Daniel wrote: > I'm trying to launch custom admin commands with a cron(outside the > project path). I'm running Django 1.1.1. I've tried to add the -- > pythonpath='path_to_my_project' option, but it doesn't work either. Have you tried something like... * * *

Re: Django Generator

2010-02-09 Thread Brice Leroy
2010/2/9 Mike Ramirez : > On Tuesday 09 February 2010 13:09:08 Brice Leroy wrote: >> django-admin startproject creates an empty folder... >> >> startproject almost = mkdir >> >> This will generate your models, modelForm, views, templates, urls, and >> soon customized forms and permissions >> > > Th

Re: Tutorial 1: AttributeError at /time/ 'module' object has no attribute 'now'

2010-02-09 Thread Mike Ramirez
On Tuesday 09 February 2010 14:19:17 Nick Mellor wrote: > Thanks Shaun, > > I renamed the "now" variable as "dt" but it didn't help. I've also > tried your 1-tuple idea-- no change. > > Note that the offending line isn't the html assignment but: > > now = datetime.datetime.now() > Make sure you

Re: "django-admin.py startproject xyz" opens text editor

2010-02-09 Thread gvkalra
Thanks a lot! It worked .. On Feb 9, 1:56 pm, chiranjeevi muttoju wrote: > Hi, please change the *.py properties to python type.. > i.e. > right click  on python filr-->properties-->change-->browse the > python.exe(which is in python home directory). > > > > On Tue, Feb 9, 2010 at 12:07

Re: Tutorial 1: AttributeError at /time/ 'module' object has no attribute 'now'

2010-02-09 Thread Nick Mellor
Thanks Shaun, I renamed the "now" variable as "dt" but it didn't help. I've also tried your 1-tuple idea-- no change. Note that the offending line isn't the html assignment but: now = datetime.datetime.now() On Feb 10, 6:22 am, Shawn Milochik wrote: > Perhaps replace the bare 'now' with a tupl

How to serialize objects that contain a foreign key object

2010-02-09 Thread Ariel
I need to serialize a an object that has a foreign key object for example: I have this model: class Town(models.Model): name = models.CharField(max_length=50) extension = models.IntegerPositiveField() class Restaurant(models.Model): hot_dogs = models.BooleanField() town = models.F

Re: Is any thing for python like .jar files for java.

2010-02-09 Thread Bill Freeman
You'll need to tell me what it is that jar files do for you beyond being yet another archive format. For that use, there are tar file (compressed or not), etc. If you are looking for something from which the python interpreter can load code and certain other things without unpacking first, then e

Re: Django Generator

2010-02-09 Thread Mike Ramirez
On Tuesday 09 February 2010 13:09:08 Brice Leroy wrote: > django-admin startproject creates an empty folder... > > startproject almost = mkdir > > This will generate your models, modelForm, views, templates, urls, and > soon customized forms and permissions > That's what the web interface does?

Re: Is any thing for python like .jar files for java.

2010-02-09 Thread Dasleah
What exactly do you mean? Compiling a group of .py scripts into one container? There are a number of options, but none that would work for Django off the top of my head. Of course, you could always use Jython and actually /have/ a .jar, but still. On Feb 10, 7:05 am, chiranjeevi muttoju wrote: >

Re: Django Generator

2010-02-09 Thread Brice Leroy
django-admin startproject creates an empty folder... startproject almost = mkdir This will generate your models, modelForm, views, templates, urls, and soon customized forms and permissions I'll add a copy project so you can extend an existing model if you have a big production pace of common pr

Re: Django Generator

2010-02-09 Thread Mike Ramirez
On Tuesday 09 February 2010 12:58:32 Brice Leroy wrote: > Hello everybody, > > I've been working for a week on this idea of a generator for django > project. The goal is to provide a simple architecture that can be > after adapted to your project. The system is in alpha stage but allows > you to c

ModelAdmin - related foreign keys

2010-02-09 Thread Ogi Vranesic
Hi I'm new in Django and want to explain my issue: For instance I have model A with foreign key to B and model B with foreign key to C. I would like to have add form of C with one B (extra = 1) and within B four A (extra = 4) With the following example in admin.py I can only achieve this partly:

Re: What hosting companies do you use for django hosting?

2010-02-09 Thread Brice Leroy
I have my servers running on slicehost. To register you can go directly on https://manage.slicehost.com/customers/new?referrer=d70aef6892d34650548f7b7b623b3e87 I put my referrer link on purpose, this would provide me some discount if you register otherwise you can go directly on https://www.slic

Feedback on Models setup

2010-02-09 Thread Chris McComas
I have a Course Management System I've developed here at work. Faculty can login and upload lectures, course resources, etc to classes they teach, along with general course information. Students can login to view their courses, download lectures, resources, get announcements from their faculty memb

Django Generator

2010-02-09 Thread Brice Leroy
Hello everybody, I've been working for a week on this idea of a generator for django project. The goal is to provide a simple architecture that can be after adapted to your project. The system is in alpha stage but allows you to create project, model (+1 view and 1 form) and application. Once your

Problem with long running processes and db records

2010-02-09 Thread Brandon Taylor
Hi everyone, Our basic content model pseudo-code is: class Content(models.Model) class Image(Content) class Story(Content) lead_art = ForeignKey(Content) Content has an ID of course, and Image, Story, etc have a content_ptr_id What we're experiencing from time to time in Django admin is

Re: What hosting companies do you use for django hosting?

2010-02-09 Thread rebus_
On 9 February 2010 21:10, Brandon Taylor wrote: > WebFaction. They are simply awesome. > > On Feb 9, 9:52 am, adamjamesdrew wrote: >> Thanks > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us

Re: What hosting companies do you use for django hosting?

2010-02-09 Thread Brandon Taylor
WebFaction. They are simply awesome. On Feb 9, 9:52 am, adamjamesdrew wrote: > Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send emai

Is any thing for python like .jar files for java.

2010-02-09 Thread chiranjeevi muttoju
Hi all, Is there any concept in python like .jar files in java. If anybody of you know please reply me. -- Thanks and regards, chiranjeevi.muttoju -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us..

Re: Custom commands called outside project path

2010-02-09 Thread Bill Freeman
If you're running on *nix (including Os/X, probably) you have a few options. Someone else will have to help if it's Windows without cygwin. The easy way, if it does all that you need, is to deploy, instead of a python file a shell script. It can cd to the appropriate directory, then run the the a

Re: Tutorial 1: AttributeError at /time/ 'module' object has no attribute 'now'

2010-02-09 Thread Shawn Milochik
Perhaps replace the bare 'now' with a tuple: Before: > html = "It is now %s." % now After: > html = "It is now %s." % (now,) Shawn -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.

Tutorial 1: AttributeError at /time/ 'module' object has no attribute 'now'

2010-02-09 Thread Nick Mellor
Hi all, This must be very simple, but I'm stumped. Here's the code for views.py from django.http import HttpResponse import datetime def current_datetime(request): now = datetime.datetime.now() html = "It is now %s." % now return HttpResponse(html) The offending line is: now = date

Re: Custom commands called outside project path

2010-02-09 Thread Tim Daniel
Well I think I've made the trick: the option pythonpath accepts one parameter: PATH_TO_MY_PROJECT but without the project name itself. So if your projects name is my_project, my_project should not appear inside PATH_TO_MY_PROJECT . Sorry for the unnecessary posting, hope it'll be useful for somebod

Custom commands called outside project path

2010-02-09 Thread Tim Daniel
I'm trying to launch custom admin commands with a cron(outside the project path). I'm running Django 1.1.1. I've tried to add the -- pythonpath='path_to_my_project' option, but it doesn't work either. When I call path_to_my_project/manage.py my_command -- pythonpath='path_to_my_project' from insid

Re: satchmo customization experiences? customizing existing e-com vs. roll-your-own

2010-02-09 Thread Chris Moffitt
Based on the additional details describing what you're trying to do, you may be reaching the threshold where Satchmo (or any current package) is going to have to be so heavily modified that it might make sense to roll your own. It sounds like you're trying to develop almost an ERP type of applicati

Re: trac password

2010-02-09 Thread Karen Tracey
On Tue, Feb 9, 2010 at 11:10 AM, coto wrote: > Hey guys, anyone know how to change the Trac Password at Django > Project? (http://code.djangoproject.com/settings) > http://www.djangoproject.com/accounts/password/reset/ Karen -- You received this message because you are subscribed to the Googl

trac password

2010-02-09 Thread coto
Hey guys, anyone know how to change the Trac Password at Django Project? (http://code.djangoproject.com/settings) Thanks beforehand -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.c

Re: how to redirect to 'next'

2010-02-09 Thread rebus_
On 9 February 2010 16:47, harryos wrote: > hi > In my login_view I am redirecting to an archive page as below > > def login_view(request): >        if request.method=='POST': >                username=request.POST['username'] >                password=request.POST['password'] >                user

Re: how to redirect to 'next'

2010-02-09 Thread Tom Evans
On Tue, Feb 9, 2010 at 3:47 PM, harryos wrote: > hi > In my login_view I am redirecting to an archive page as below > > def login_view(request): >        if request.method=='POST': >                username=request.POST['username'] >                password=request.POST['password'] >              

Re: What hosting companies do you use for django hosting?

2010-02-09 Thread Shawn Milochik
This is about the oldest FAQ. Here you go: http://djangofriendly.com/hosts/ Having said that, I use Slicehost and Webfaction for my personal projects, and at work we use Softlayer, but will probably move. Shawn -- You received this message because you are subscribed to the Google Groups "Dj

Re: 'ValidationError' object has no attribute 'message_dict'

2010-02-09 Thread Joseph Kocherhans
On Feb 9, 2010, at 9:12 AM, Karen Tracey wrote: > On Tue, Feb 9, 2010 at 2:11 AM, Kenneth Gonsalves wrote: > On Tuesday 09 Feb 2010 12:29:48 pm Karen Tracey wrote: > > > simplest validation possible is giving me an error - if the data is > > > valid, no > > > error, but on invalid data I get the

What hosting companies do you use for django hosting?

2010-02-09 Thread adamjamesdrew
Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this gro

how to redirect to 'next'

2010-02-09 Thread harryos
hi In my login_view I am redirecting to an archive page as below def login_view(request): if request.method=='POST': username=request.POST['username'] password=request.POST['password'] user = authenticate(username=username, password=password)

Re: How to setup multiple django domains under Apache and Ubuntu server???

2010-02-09 Thread WeissBlitz
Got it working now! Thanks to all for your help! -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegr

Re: 'ValidationError' object has no attribute 'message_dict'

2010-02-09 Thread Karen Tracey
On Tue, Feb 9, 2010 at 2:11 AM, Kenneth Gonsalves wrote: > On Tuesday 09 Feb 2010 12:29:48 pm Karen Tracey wrote: > > > simplest validation possible is giving me an error - if the data is > > > valid, no > > > error, but on invalid data I get the traceback appended below. Am I > doing > > > somet

Re: How to get Json array values in the django views.py.

2010-02-09 Thread bruno desthuilliers
On Feb 9, 2:19 pm, rokson wrote: > This is rokson a new django programmer struggling with the problem of > how to get the json array values in my django views.py file. ??? > actually i am writing an opensocial which is going to deploy in the > appengine using django framework. > > i am making aj

Re: how to define DJANGO_SETTINGS_MODULE for multiple sites.

2010-02-09 Thread rebus_
On 9 February 2010 03:25, neridaj wrote: > I'm trying to setup my first cron job and I think the reason my script > is not running is because I don't have DJANGO_SETTINGS_MODULE defined > for my environment i.e., .profile script. I'm using mod_wsgi so my > DJANGO_SETTINGS_MODULE is defined in the

Re: Single Login for two different applications?

2010-02-09 Thread Preston Holmes
On Feb 9, 3:43 am, djangonoob wrote: > Hello, > > I have the following problem which I hope someone could shed some > light on. > > In my project I have the main site with login. I now implemented a > questionnaire app  that also requires a login. It would be great if > someone could help me to t

How to get Json array values in the django views.py.

2010-02-09 Thread rokson
This is rokson a new django programmer struggling with the problem of how to get the json array values in my django views.py file. actually i am writing an opensocial which is going to deploy in the appengine using django framework. i am making ajax request in my app gadgets.io.makeRequest(url,fu

Single Login for two different applications?

2010-02-09 Thread djangonoob
Hello, I have the following problem which I hope someone could shed some light on. In my project I have the main site with login. I now implemented a questionnaire app that also requires a login. It would be great if someone could help me to take the first login from the main site and also enter

Re: Possible bug with django 1.2, postgresql and aggregates?

2010-02-09 Thread Mathieu Pillard
I searched for an existing ticket, couldn't find any. I created http://code.djangoproject.com/ticket/12822 -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from th

Re: images in admin/change_list.html

2010-02-09 Thread bruno desthuilliers
On Feb 9, 5:37 am, django_jedi wrote: > I feel like I'm missing something obvious.  Another set of eyes would > be greatly appreciated. > > I'm trying to add an image to the change_list form in the admin. > Doesn't seem to work. I guess Adnan pointed you to the right direction. Now as a general

Re: images in admin/change_list.html

2010-02-09 Thread Adnan Sadzak
Shoul'd be here two variables to pass as You defined two %s and pass only one ? I'm newbie, maybe I'm wrong :) def image_img(self): if self.image: return u'' % self.image.url_125x125 else: On Tue, Feb 9, 2010 at 5:37 AM, django_jedi wrote: >

Re: moderation of djangosearch.com

2010-02-09 Thread Atamert Ölçgen
Hi Alex, On Monday 08 February 2010 23:33:20 Alrond wrote: > Now I don’t have time to support the project because of the main > project WIPmania.com. Therefore, I would like to ask, if there are > people who can take over moderation of djangosearch (e.g.distributed > in different languages ??), ot

Re: want to convert object to json data.

2010-02-09 Thread bruno desthuilliers
On Feb 9, 10:40 am, chiranjeevi muttoju wrote: > hi waine, > Thanks for ur reply. i got that. is there is any way to parse regular class > objects(not model objects) to json data.. As documented, Django's json serialization is done using a bundled version of simplejson, which is documented here:

Re: customize form in template according to field attribute

2010-02-09 Thread bruno desthuilliers
On Jan 29, 12:56 pm, jul wrote: > hi, > > I've got the Category model and SearchForm form shown below. In my > template I'd like to get all Category instances having a given type to > be able to separate those having different style in my CSS. > How can I do this? You'll have to provide your own

Re: implementing login in application,gets ValueError

2010-02-09 Thread bruno desthuilliers
On Feb 9, 10:46 am, harryos wrote: > I was trying to create login in my application. And there's a flaw in your view's flow (ok lame pun, sorry). Your function's flow is: if request.method=='POST': try to authenticate the user if it succeeds: return a "redirect" response # XXX

implementing login in application,gets ValueError

2010-02-09 Thread harryos
I was trying to create login in my application .As per what is given in djangobook I created the login view as follows def login_view(request): if request.method=='POST': print 'login_view()::POST' username=request.POST['username'] password=r

Re: want to convert object to json data.

2010-02-09 Thread chiranjeevi muttoju
hi waine, Thanks for ur reply. i got that. is there is any way to parse regular class objects(not model objects) to json data.. if u know please reply. On Tue, Feb 9, 2010 at 12:17 PM, Wayne Koorts wrote: > > I want to convert a given regular object to json object. i.e. I want > > to create a fu

Re: customize form in template according to field attribute

2010-02-09 Thread Julien
Oh I have exactly this problem and cant find a good way to display my "categories" field ordered/grouped by parent type On 31 jan, 12:30, jul wrote: > I reposted this question with more details. > > On Jan 29, 12:56 pm, jul wrote: > > > > > hi, > > > I've got the Category model and SearchForm

Re: "django-admin.py startproject xyz" opens text editor

2010-02-09 Thread chiranjeevi muttoju
Hi, please change the *.py properties to python type.. i.e. right click on python filr-->properties-->change-->browse the python.exe(which is in python home directory). On Tue, Feb 9, 2010 at 12:07 PM, Karen Tracey wrote: > On Tue, Feb 9, 2010 at 1:32 AM, gvkalra wrote: > >> "django-admin.py