escape problem in django templates

2009-05-15 Thread ozgurisil
Hello all, Let's say that I have this string: s = 'Hello!' When I pass this variable to a template, I want it to be rendered as raw html. Looking at the docs I see that I can either use the safe filter: {{s|safe}} or disable autoescape: {%autoescape off} {{s}} {%endautoescape%} or inside

djangotiny and filebrowser question

2009-05-15 Thread Bobby Roberts
I've got an application i'm writing where I need to use django-tinymce and filebrowser on the public side (ie not admin) of the website. Can someone provide me with a rundown on how to make those non-admin dependent --~--~-~--~~~---~--~~ You received this message

Re: Trying to access admin but getting AttributeError: 'NoneType' object has no attribute 'cursor'

2009-05-15 Thread Sean Brant
I rechecked out trunk and it seems to work as expected. Thanks. On May 15, 2009, at 10:54 PM, Alex Gaynor wrote: > > > On Fri, May 15, 2009 at 8:40 PM, Sean Brant > wrote: > > On more thing I reverted back to rev: 9500 (choose it randomly) every >

Re: Trying to access admin but getting AttributeError: 'NoneType' object has no attribute 'cursor'

2009-05-15 Thread Alex Gaynor
On Fri, May 15, 2009 at 8:40 PM, Sean Brant wrote: > > On more thing I reverted back to rev: 9500 (choose it randomly) every > thing seems to work. > > On May 15, 8:24 pm, Sean Brant wrote: > > Im running trunk rev: 10790 with Postgres 8.3 and when I

Re: Ordering a query by comments connected to model

2009-05-15 Thread Alex Gaynor
On Fri, May 15, 2009 at 9:24 PM, Andy Mikhailenko wrote: > > > I am but what parameter do I give to Count? My entity model don't have > > a comments field it is just connected through the view where I do {% > > load comments %}? > > Immediately after posting my comment I

Re: Ordering a query by comments connected to model

2009-05-15 Thread Andy Mikhailenko
> I am but what parameter do I give to Count? My entity model don't have > a comments field it is just connected through the view where I do {% > load comments %}? Immediately after posting my comment I understood that you actually can do that easily:

Re: Parsing the arguments in HTTP GET

2009-05-15 Thread Mohan Parthasarathy
On Fri, May 15, 2009 at 3:58 PM, Antoni Aloy wrote: > > 2009/5/15 MohanParthasarathy : > > > > Hi, > > > > I am very new to django. I am following along the tutorial. But I want > > to be able to parse the URL which has the following form: > > > >

Re: Parsing the arguments in HTTP GET

2009-05-15 Thread Mohan Parthasarathy
On Fri, May 15, 2009 at 4:39 PM, Tom Evans wrote: > > On Fri, 2009-05-15 at 14:56 -0700, MohanParthasarathy wrote: > > Hi, > > > > I am very new to django. I am following along the tutorial. But I want > > to be able to parse the URL which has the following form: > > >

MySQL with pyodbc error

2009-05-15 Thread Phil
Hi, I'm trying Django with MySQL and the pyodbc connector. However, it appears that Django can only cope with the mysqldb connector. I get a load of traceback ending with the error: File "C:\python26\lib\site-packages\django\db\backends\mysql\base.py", line 13, in raise

What's your process for developing your Django app?

2009-05-15 Thread kfordham281
Hi everyone, I'm a beginner when it comes to web programming but have hacked around PHP, HTML, MYSQL, and CSS a handful of years and know enough to put together a few sites and help support another. I've decided to build a website in Django that would hopefully catch on and become popular. I

Re: Ordering a query by comments connected to model

2009-05-15 Thread Andy Mikhailenko
> I am but what parameter do I give to Count? My entity model don't have > a comments field it is just connected through the view where I do {% > load comments %}? Marlun, despite I can't reply to your question (no idea if sorting by generic relations is possible; would be great to hear a

Re: Trying to access admin but getting AttributeError: 'NoneType' object has no attribute 'cursor'

2009-05-15 Thread Sean Brant
On more thing I reverted back to rev: 9500 (choose it randomly) every thing seems to work. On May 15, 8:24 pm, Sean Brant wrote: > Im running trunk rev: 10790 with Postgres 8.3 and when I access the > admin area or when using login_required i get this error: > > Traceback

Re: Trying to access admin but getting AttributeError: 'NoneType' object has no attribute 'cursor'

2009-05-15 Thread Sean Brant
It might be due to threading, every once in a while I can pull up the admin page. It's pretty random thought. On May 15, 8:24 pm, Sean Brant wrote: > Im running trunk rev: 10790 with Postgres 8.3 and when I access the > admin area or when using login_required i get this

Trying to access admin but getting AttributeError: 'NoneType' object has no attribute 'cursor'

2009-05-15 Thread Sean Brant
Im running trunk rev: 10790 with Postgres 8.3 and when I access the admin area or when using login_required i get this error: Traceback (most recent call last): File "/Users/seanbrant/webapps/django/lib/python2.5/django/core/ servers/basehttp.py", line 278, in run self.result =

Re: Composite keys

2009-05-15 Thread Russell Keith-Magee
On Sat, May 16, 2009 at 5:27 AM, Mike Driscoll wrote: > > Hi, > > I posted about this over a year ago and Jacob Kaplan-Moss said that > Django would eventually get composite key support, but he didn't know > when. Has anything changed?  I dug around for SqlAlchemy+Django

Re: User profile get_profile() error

2009-05-15 Thread Sam Chuparkoff
On Fri, 2009-05-15 at 19:53 -0400, Joshua Williams wrote: > When trying to access a user defined profile, using get_profile, I > am > getting an error when accessing the profile for a user. Just so I > have my bases covered, here is my model class: > > class UserDetail(models.Model): >

User profile get_profile() error

2009-05-15 Thread Joshua Williams
Hello All, When trying to access a user defined profile, using get_profile, I am getting an error when accessing the profile for a user. Just so I have my bases covered, here is my model class: class UserDetail(models.Model): Position = models.ManyToManyField(Position, blank=True)

Re: login decorator losing POST data

2009-05-15 Thread Tom Evans
On Fri, 2009-05-15 at 16:10 -0500, Tim Chase wrote: > James Bennett wrote: > > On Fri, May 15, 2009 at 1:55 PM, Tim Chase > > wrote: > >> One more option that occurs to me is that you can stash all of > >> the POSTed variables into a session-store with a hash key,

Re: Parsing the arguments in HTTP GET

2009-05-15 Thread Tom Evans
On Fri, 2009-05-15 at 14:56 -0700, MohanParthasarathy wrote: > Hi, > > I am very new to django. I am following along the tutorial. But I want > to be able to parse the URL which has the following form: > > http://example.com/data/?ui=2=1#label=/fetch > > From what I can tell, i can't match

Re: Parsing the arguments in HTTP GET

2009-05-15 Thread Antoni Aloy
2009/5/15 MohanParthasarathy : > > Hi, > > I am very new to django. I am following along the tutorial. But I want > to be able to parse the URL which has the following form: > > http://example.com/data/?ui=2=1#label=/fetch > > From what I can tell, i can't match the whole

Re: Problem debugging with pdb

2009-05-15 Thread Sam Chuparkoff
On Fri, 2009-05-15 at 14:00 -0700, Joshua Russo wrote: > I can't seem to get pdb to stop at my break points for a page request. > I start it like so: > > (from the directory containing manage.py) python -m pdb manage.py > runserver Have you tried this? python -m pdb manage.py runserver

Formatting a Foreign key combo box in admin change form

2009-05-15 Thread nih
Hello, I've got a test class as follows: class Test(models.Model): name = models.ForeignKey(User) # more fields after this one in the admin change form the select box only shows name.username (eg nih) is it possible to show the full name in the select box via something like: return

Parsing the arguments in HTTP GET

2009-05-15 Thread MohanParthasarathy
Hi, I am very new to django. I am following along the tutorial. But I want to be able to parse the URL which has the following form: http://example.com/data/?ui=2=1#label=/fetch >From what I can tell, i can't match the whole thing using the url pattern. I can parse up till

Composite keys

2009-05-15 Thread Mike Driscoll
Hi, I posted about this over a year ago and Jacob Kaplan-Moss said that Django would eventually get composite key support, but he didn't know when. Has anything changed? I dug around for SqlAlchemy+Django links, but they seem to be the same as last year, except deader. While my boss likes

Re: login decorator losing POST data

2009-05-15 Thread Tim Chase
James Bennett wrote: > On Fri, May 15, 2009 at 1:55 PM, Tim Chase > wrote: >> One more option that occurs to me is that you can stash all of >> the POSTed variables into a session-store with a hash key, >> redirect with some sort of "load POST variables from this

Problem debugging with pdb

2009-05-15 Thread Joshua Russo
(strangely my previous post seems to have disappeared so here we go again) I can't seem to get pdb to stop at my break points for a page request. I start it like so: (from the directory containing manage.py) python -m pdb manage.py runserver The debugger starts up properly, paused on the first

Model IntegerField Error

2009-05-15 Thread ajohnsen
Hello, Can anybody tell me what I'm doing wrong here. I am trying to assign a min and max value for an integer field in my model below: from django.db import models from django.forms import ModelForm floor_plan_choices = ( ('A', 'Square'), ('B', 'Rectangular'), ('C',

About forms.ChoiceField()

2009-05-15 Thread Alex
Hello all! First of all sorry for my english. I have made a small form, just 10 fields. now I see that page loads much slower then without this form... I found problem in this part of form: age = forms.ChoiceField(required=True, choices=AGE_CHOICES, initial='18') without this field page loads

Re: Ordering a query by comments connected to model

2009-05-15 Thread Marlun
I am but what parameter do I give to Count? My entity model don't have a comments field it is just connected through the view where I do {% load comments %}? On May 15, 7:49 pm, Alex Gaynor wrote: > On Fri, May 15, 2009 at 12:48 PM, Marlun

Re: abstract classes in models

2009-05-15 Thread Alex Gaynor
On Fri, May 15, 2009 at 1:38 PM, Rusty Greer wrote: > > > On Fri, May 15, 2009 at 10:10 AM, Alex Gaynor wrote: > >> >> >> On Fri, May 15, 2009 at 12:08 PM, Rusty Greer wrote: >> >>> >>> >>> On Fri, May 15, 2009 at 9:57 AM, George Song

Re: login decorator losing POST data

2009-05-15 Thread James Bennett
On Fri, May 15, 2009 at 1:55 PM, Tim Chase wrote: > One more option that occurs to me is that you can stash all of > the POSTed variables into a session-store with a hash key, > redirect with some sort of "load POST variables from this > hash-key" GET page, and

Re: abstract classes in models

2009-05-15 Thread Rusty Greer
On Fri, May 15, 2009 at 10:10 AM, Alex Gaynor wrote: > > > On Fri, May 15, 2009 at 12:08 PM, Rusty Greer wrote: > >> >> >> On Fri, May 15, 2009 at 9:57 AM, George Song wrote: >> >>> >>> On 5/15/2009 8:18 AM, Rusty Greer wrote: >>> >

Re: login decorator losing POST data

2009-05-15 Thread Tim Chase
> Thanks for the fantastic insight into the browser issues with 307 > redirects. I'll explore this a bit further and see which route I want > to take. I believe contrib.auth uses a 302 redirection which doesn't pass along the POST data. > Given that the form in question is simply a button that

Re: Ordering a query by comments connected to model

2009-05-15 Thread Alex Gaynor
On Fri, May 15, 2009 at 12:48 PM, Marlun wrote: > > Hello everyone, > > I've got a model called Entry which users can comment on using the > django comment framework. Now I want to list the ten most popular > entries so I need to order them by comment count. > > How do

Re: login decorator losing POST data

2009-05-15 Thread Jeff FW
Sure--those are totally reasonable in most cases. However, the OP just said that all that's in the form is a single button, meaning most of those won't be an issue in this case. -Jeff On May 15, 10:03 am, Tim Chase wrote: > > If the form is just a single

Ordering a query by comments connected to model

2009-05-15 Thread Marlun
Hello everyone, I've got a model called Entry which users can comment on using the django comment framework. Now I want to list the ten most popular entries so I need to order them by comment count. How do I order a query by comments connected to a model? -Martin

Re: abstract classes in models

2009-05-15 Thread George Song
On 5/15/2009 10:08 AM, Rusty Greer wrote: > > > On Fri, May 15, 2009 at 9:57 AM, George Song > wrote: > > > On 5/15/2009 8:18 AM, Rusty Greer wrote: > > > > > > I have something like this: > > > > class

Re: ForeignKey with null=True

2009-05-15 Thread aa56280
Thanks for the quick turnaround Alex. The reason why I'm going the location_set route is because I want to make that the Location object has a relationship with the Company object. Simply because both of these parameters are being provided the user. (something that I left out in the code sample)

Re: Oracle 10g Release 2 ignored 'primary_key=True'

2009-05-15 Thread Ian Kelly
On May 15, 1:23 am, modelmike wrote: > How do I use 'primary_key=True' with Oracle 10g R2 to create a primary > key on a custom field instead of on the default ID field? > > 'python manage.py sqlall ' shows that Django's SQL > generation correctly assigns the PRIMARY KEY

Re: ForeignKey with null=True

2009-05-15 Thread Alex Gaynor
On Fri, May 15, 2009 at 12:11 PM, aa56280 wrote: > > So to be clear then, yes, I want to delete the object from the > database entirely. How to go about doing that using location_set? > > On May 15, 12:07 pm, Alex Gaynor wrote: > > On Fri, May 15, 2009

Re: ForeignKey with null=True

2009-05-15 Thread aa56280
So to be clear then, yes, I want to delete the object from the database entirely. How to go about doing that using location_set? On May 15, 12:07 pm, Alex Gaynor wrote: > On Fri, May 15, 2009 at 12:04 PM, aa56280 wrote: > > > I'm trying to wrap my head

Re: abstract classes in models

2009-05-15 Thread Alex Gaynor
On Fri, May 15, 2009 at 12:08 PM, Rusty Greer wrote: > > > On Fri, May 15, 2009 at 9:57 AM, George Song wrote: > >> >> On 5/15/2009 8:18 AM, Rusty Greer wrote: >> > >> > >> > I have something like this: >> > >> > class Class1(models.Model): >> > // lots

Re: abstract classes in models

2009-05-15 Thread Rusty Greer
On Fri, May 15, 2009 at 9:57 AM, George Song wrote: > > On 5/15/2009 8:18 AM, Rusty Greer wrote: > > > > > > I have something like this: > > > > class Class1(models.Model): > > // lots of fields here > > > > class AbstractThing(models.Model): > > // lots of fields here

Re: ForeignKey with null=True

2009-05-15 Thread Alex Gaynor
On Fri, May 15, 2009 at 12:04 PM, aa56280 wrote: > > I'm trying to wrap my head around why a ForeignKey needs to be set > with null=True in order for its related model to call remove() on one > of its instances. > > For example: > > # models > class Company(models.Model): >

ForeignKey with null=True

2009-05-15 Thread aa56280
I'm trying to wrap my head around why a ForeignKey needs to be set with null=True in order for its related model to call remove() on one of its instances. For example: # models class Company(models.Model): ... class Location(models.Model): ... company= models.ForeignKey(Company) #

Passing a dynamic ChoiceField response to a ForeignKey instance

2009-05-15 Thread simong
There's probably a very simple answer to this but I can't see it at the moment: This model: class Product(models.Model): user = models.ForeignKey(User, related_name="product_list", editable=False) productid = models.CharField(max_length=40, blank=True) prodname =

Re: abstract classes in models

2009-05-15 Thread George Song
On 5/15/2009 8:18 AM, Rusty Greer wrote: > > > I have something like this: > > class Class1(models.Model): > // lots of fields here > > class AbstractThing(models.Model): > // lots of fields here > class1field = model.ForeignKey(Class1) > class Meta: > abstract = True

override the cms_urls in django-cms

2009-05-15 Thread Jesse
Hello, I've successfully implemented django-cms with tinymce for all my webpages. My problem is that one of the webpages must retrieve data from the database into drop down boxes. The template is called search_globaldb. The cms forces the url to look for this template in the cms database

Re: get current logged user from manager

2009-05-15 Thread Alex Gaynor
On Fri, May 15, 2009 at 11:14 AM, Gabriel . wrote: > > Hi All, > > I have a manager which is used also as related manager: > > class ReleaseManager(models.Manager): >use_for_related_fields = True > >def all(self): >q = self.get_query_set() >

get current logged user from manager

2009-05-15 Thread Gabriel .
Hi All, I have a manager which is used also as related manager: class ReleaseManager(models.Manager): use_for_related_fields = True def all(self): q = self.get_query_set() q.query.add_q(Q(enabled=True) & Q(project__enabled=True)) return q I need to add another

Session ID generated each time web server is restarted

2009-05-15 Thread Spk
Hi, I am using manual transactions around the functions of views.py. This is because there are events called within a function that need to see the committed data before the event is signalled. However, when there is a GET request on this same function I get "Transaction managed block ended with

abstract classes in models

2009-05-15 Thread Rusty Greer
I have something like this: class Class1(models.Model): // lots of fields here class AbstractThing(models.Model): // lots of fields here class1field = model.ForeignKey(Class1) class Meta: abstract = True class ThingType1(AbstractThing): // lots of fields here class

Re: Django superusers

2009-05-15 Thread donarb
On May 15, 7:31 am, Mike Driscoll wrote: > The book does not mention anything about the autodiscover() call, > although it seems to have done everything else right. Once I added > that, the admin pages starting working as expected. I have the PDF version of the book and the

Re: Row level permission -- status?

2009-05-15 Thread James Bennett
On Fri, May 15, 2009 at 11:20 AM, gustavora...@gmail.com wrote: > Is there any other solution available that would allow row level > permission? The Django admin's ModelAdmin class, which you must subclass to provide an admin interface for your models, has methods

Row level permission -- status?

2009-05-15 Thread gustavora...@gmail.com
Hello I was investigating the current state of things in terms of row based permission but could not get an up to date information. I did check http://code.djangoproject.com/wiki/RowLevelPermissions, but last commit on this branch was done 2 years ago. Is there any other solution available that

Re: Multiple 404.html pages

2009-05-15 Thread Lee Hinde
On Thu, May 14, 2009 at 8:00 PM, James Bennett wrote: > > On Thu, May 14, 2009 at 10:56 PM, Lee Hinde wrote: >> Because I would be using different base.html files, I'm wondering if >> there is a work around to having a single 404.html file. For

Re: Django superusers

2009-05-15 Thread Mike Driscoll
Hi Karen, On May 14, 5:09 pm, Karen Tracey wrote: > On Thu, May 14, 2009 at 4:06 PM, Mike Driscoll wrote: > > > Hi, > > > I am working my way through the Django 1.0 book by Ayman Hourieh from > > Packt and I just reached the Admin Interface chapter

Trouble using pdb with manage.py runserver

2009-05-15 Thread Joshua Russo
I'm starting the debugger like so: (from the dir containing manage.py) python -m pdb manage.py runserver it starts just fine, showing it paused at the first line. I set my break points using "b filename: line#". This reports that the breakpoint is set, and it seems as though it's in the right

syncdb with long verbose model names

2009-05-15 Thread Joshua
manage.py syncdb errors out when the verbose model name is long. Is this a bug that the Permission.name should be set to a larger number? or should I just override the size after the initial load? Joshua --~--~-~--~~~---~--~~ You received this message because you

Re: writing a view for an ajax funtion in a template

2009-05-15 Thread newbie
yup. You are right. Thank you very much for the reply :) On May 15, 6:06 pm, Daniel Roseman wrote: > On 2009/5/15, newbie wrote: > > > hi, > > >         Thanks for the reply. > > > So suppose i call the ajax function like this. > > >        

Re: login decorator losing POST data

2009-05-15 Thread Tim Chase
> If the form is just a single button, why not use GET and not have to > deal with POST at all? Multiple reasons: * By spec, GET can be cached by intermediary proxies, POST results aren't. Caching may change application behavior. (Yes, there are workarounds that involve HTTP cache-control

apache/mod_python set up

2009-05-15 Thread wmstudio
Hi, I am new to this group and relatively new to django. I am having a problem with the admin page of a site, running on FreeBSD Apache/mod_python. It doesn't seem to find /media/css/ dashboard.css. With the same site running on the django development server on Mac OS X, the admin page shows

Re: writing a view for an ajax funtion in a template

2009-05-15 Thread Daniel Roseman
On 2009/5/15, newbie wrote: > hi, > > Thanks for the reply. > > So suppose i call the ajax function like this. > > var args = { type:"POST", url:"district", > data:data, complete:done }; >$.ajax(args); > > where data is

Re: login decorator losing POST data

2009-05-15 Thread Jeff FW
If the form is just a single button, why not use GET and not have to deal with POST at all? -Jeff On May 14, 11:28 am, aa56280 wrote: > Tim, > > Thanks for the fantastic insight into the browser issues with 307 > redirects. I'll explore this a bit further and see which route

Field Lookup

2009-05-15 Thread Narciso Oceguera
Hi, How can I limit the choices list of a ForeignKey field (with limit_choices_to attribute) that do not match certain condition? I don't find any Field Lookup to acomplish that. Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: setting.py and deployment

2009-05-15 Thread Masklinn
On 15 May 2009, at 14:08 , Konstantin S wrote: > Hello > > First of all sorry if this question was asked and answered many time > before. I want to know what are the best practices you use for > deployment django sites in production. I mean how do you separate > setting.py into development and

Re: using ajax in django

2009-05-15 Thread maxent
@newbie - @margie already gave you a great answer. follow this series of blog posts: http://lethain.com/entry/2008/sep/21/intro-to-unintrusive-javascript-with-django/ http://lethain.com/entry/2008/sep/24/custom-django-views-for-happier-ajax/

setting.py and deployment

2009-05-15 Thread Konstantin S
Hello First of all sorry if this question was asked and answered many time before. I want to know what are the best practices you use for deployment django sites in production. I mean how do you separate setting.py into development and production part and how do use choose which one to use

Django, Infobright: tables and keys

2009-05-15 Thread Ilya Musabirov
Hi! I'm developing some kind of Business Intelligence system, based on Infobright-Mysql Data Warehouse. One of our key needs --- simple and flexible reporting/dashboards engine. I'd looked up most open source reporting engines, but most of them Java-based, and I want to use something in Python,

Customize django.views.generic.create_update.create_object

2009-05-15 Thread AndreA
Hi all, I'm trying to follow these instructions there http://docs.djangoproject.com/en/dev/ref/generic-views/#django-views-generic-create-update-create-object to generate a generic view to add a new object to my application. This object is defined in models.py and has a slugField used in urls.py

Counting pageviews

2009-05-15 Thread Oleg Oltar
Hi! I am writing simple article manager application. Is there a way I can store pageviews number for my articles in database (want to display them in future, and use for rating on site) Thanks in advance, Oleg --~--~-~--~~~---~--~~ You received this message

Re: writing a view for an ajax funtion in a template

2009-05-15 Thread Daniel Roseman
On May 15, 12:14 pm, newbie wrote: > Hi, > >          i'm new to both ajax and django. Can some1 explain me how to > write a view function for an ajax functionality in a template. For > example, I've registered a ajax event in a template and wanted to send > some

Re: disable django cache

2009-05-15 Thread Daniel Roseman
On May 15, 4:14 am, online wrote: > Thanks, this kind of design is interesting, not what i expected > though. > > I thought the server is running whatever my script i want to use >     return render_to_response('home.html') > or >     return

Re: django-admin.py not working...HELP!

2009-05-15 Thread Blake M. Sisco
Karen, I updated to the latest trunk by right clicking on the C:\django_src dir then using tortisesvn to update to the latest code from http://code.djangoproject.com/svn. I then removed the old install from C:\Python25\Lib\site-packages as well as the django-admin.py from the C:\Python25\Scripts

writing a view for an ajax funtion in a template

2009-05-15 Thread newbie
Hi, i'm new to both ajax and django. Can some1 explain me how to write a view function for an ajax functionality in a template. For example, I've registered a ajax event in a template and wanted to send some information to a function in a view which inturn sends its response. How do i

Re: disable django cache

2009-05-15 Thread zayatzz
Restart your apache every once and a while, if you want to see latest changes. Alan. On May 15, 6:14 am, online wrote: > Thanks, this kind of design is interesting, not what i expected > though. > > I thought the server is running whatever my script i want to use

AutoField

2009-05-15 Thread Alessandro Ronchi
I want an autofield that shows the content in admin. If I put an autofield it's hidden, if I put an IntegerField it doesn't have a new automatic default value. Is there a solution? -- Alessandro Ronchi Skype: aronchi http://www.alessandroronchi.net SOASI Soc.Coop. - www.soasi.com Sviluppo

Re: using ajax in django

2009-05-15 Thread newbie
Thank you very much for the support. But any tutorial for jquery would b preferable On May 15, 2:52 pm, jai wrote: > I have document in my blog about Ajax based form submission in > django.  pls gone through this >

Re: using ajax in django

2009-05-15 Thread newbie
Thank you very much for the support. On May 15, 2:52 pm, jai wrote: > I have document in my blog about Ajax based form submission in > django.  pls gone through this > urlhttp://jayapal-d.blogspot.com/2009/05/django-ajax-submit-form.html > > Jayapal > > On May 15, 11:18 

Re: using ajax in django

2009-05-15 Thread jai
I have document in my blog about Ajax based form submission in django. pls gone through this url http://jayapal-d.blogspot.com/2009/05/django-ajax-submit-form.html Jayapal On May 15, 11:18 am, Margie wrote: > I found a very good tutorial >

Strange behaviour of FileField in FormWizard

2009-05-15 Thread Gianluca Pacchiella
I implemented a form wizard to import bookmarks from various website or from a file: the first form selects the type of the import and, in case I want to import from a BibTeX file, the second form is a FileField where I have to indicate the path of the file containing the reference to parse. In

looking for a developer

2009-05-15 Thread ivan.o...@googlemail.com
Hello, I'm looking for a django developer to work on a project for 1 month. Anyone interested please contact me at dja...@ogai.name telling a) what have you done in django, i.e. your experience b) what amount for the payment you would consider appropiate, e.g. in Euros per hour c) how many hours

Adding new permissions to django-admin

2009-05-15 Thread Oleg Oltar
Hi! I am writing small django based informational site. I have several publishers, who add articles to my database using the adding application. I have defined my main article model this way: class Article (models.Model): # Tiny url url = models.CharField(max_length = 30, unique=True,

need help for facebook app

2009-05-15 Thread laspal
hi, I am trying to write a facebook app where user can see the status history of his friends. Everything seems to work fine until I try to save the status information in my DB. here is code : class UserStatus(models.Model): facebookid = models.IntegerField() time = models.IntegerField()

Re: creating objects in views

2009-05-15 Thread Oleg Oltar
Thanks a lot! I don't know why I missed article variable! Thanks, again! On Thu, May 14, 2009 at 11:23 PM, Gene wrote: > > You may still be able to use the built-in django-comments, as it's > easy to customize (especially if your just adding extra fields). You > can read

Re: how to import variable from view to form

2009-05-15 Thread Yang ChengFu
Hi Urukay, Thanks a lot, it works! - *YÁNG ChéngF**u(* *Unix Administrator * *Gameloft** ***-- Global Network Services (GNS)** ** ***mailto:chengfu.y...@gameloft.com** **(** +86(10)8260-7820 Jabber:chengfu.y...@bei.gameloft.org urukay a écrit : > Don't know if i understand you

Oracle 10g Release 2 ignored 'primary_key=True'

2009-05-15 Thread modelmike
How do I use 'primary_key=True' with Oracle 10g R2 to create a primary key on a custom field instead of on the default ID field? 'python manage.py sqlall ' shows that Django's SQL generation correctly assigns the PRIMARY KEY attribute to the 'primary_key=True' field that I list in my class

Re: how to import variable from view to form

2009-05-15 Thread urukay
Don't know if i understand you right, but maybe this could help: in form: class ContactForm(forms.Form): def __init__( self, user_choices_list, *args, **kwargs ): super( ContactForm, self ).__init__( *args, **kwargs )

Re: how to import variable from view to form

2009-05-15 Thread Yang ChengFu
Anybody can help me out! Thanks! --- Yang a écrit : > Hello, > > I'd like to import the variables from view to form, but after trying > several ways, I failed. > > For example: user01 inputs his username/password(apache > authentication) to login, then based on this username, function, >

Re: ForeignKeys to MTI models break admin (as of 10756)

2009-05-15 Thread George Song
On 5/14/2009 11:40 PM, Russell Keith-Magee wrote: > On Fri, May 15, 2009 at 2:21 PM, Michael Strickland > wrote: >> Hi all, >> >> I've recently encountered a problem that arose with revision 10756. >> Say you have the following models: >> >> class Person(models.Model): >>

Re: ForeignKeys to MTI models break admin (as of 10756)

2009-05-15 Thread Russell Keith-Magee
On Fri, May 15, 2009 at 2:21 PM, Michael Strickland wrote: > > Hi all, > > I've recently encountered a problem that arose with revision 10756. > Say you have the following models: > > class Person(models.Model): >    name = models.CharField(max_length=20) > > class

Re: modelling question / many-to-many / intermediary

2009-05-15 Thread chris
Hi, I solved it that way: class PersonCollaboration(models.Model): person1 = models.ForeignKey('Person', related_name='person1') person2 = models.ForeignKey('Person', related_name='person2') timestamp_created = models.DateTimeField(default=datetime.now) class Person

Re: Limiting the queryset for a foreign key field in the admin change_list view

2009-05-15 Thread Margie
Thanks Colin. I will try that. I also found a tutorial at http://lethain.com/entry/2008/sep/21/intro-to-unintrusive-javascript-with-django/ that does some basic ajax stuff and that's useful to just get familiar with the paradigm. Been studying this stuff all day, am too bleary eyed to go any

ForeignKeys to MTI models break admin (as of 10756)

2009-05-15 Thread Michael Strickland
Hi all, I've recently encountered a problem that arose with revision 10756. Say you have the following models: class Person(models.Model): name = models.CharField(max_length=20) class Student(Person): grad_year = models.IntegerField() class Picture(models.Model): image =

Re: using ajax in django

2009-05-15 Thread Margie
I found a very good tutorial at http://lethain.com/entry/2008/sep/21/intro-to-unintrusive-javascript-with-django/. I've just gone through it and it is really simple and helpful if you have little/no familiarity with ajax. Margie On May 14, 10:08 pm, veasna bunhor wrote: >

Debugging methodology suggestion on PIL file upload problems

2009-05-15 Thread MrBodjangos
Hi, Please give me pointers on how to debug this. Basic form error: "Upload a valid image. The file you uploaded was either not an image or a corrupted image." I have googled around and the problems I have read regards recompiling jpeg for MAC after installing PIL. I have Windows, and so I