pass related_name-s into Model.objects.create()?

2010-05-17 Thread Phlip
Djangoists: The documentation for Model.objects.create(**kwargs) does not define kwargs. It just sez "kwargs". I think all of our experiences would bear out "kwargs" may at least be the model's fields. But what about 'ForeignKey's? May we pass their 'remote_name's in with the kwargs? If not,

Re: ANN: Django 1.1.2 and Django 1.2 released

2010-05-17 Thread rahul jain
Awesome job...but I discovered just one problem. Select all missing from admin panel. So now i cannot select all the objects if i want to from admin panel. It was fine on django 1.1. Its not fine on django 1.2 nor in the development versions. --RJ On Mon, May 17, 2010 at 7:11 PM, Joshua Partogi

Error was: cannot import name validators

2010-05-17 Thread Pankaj Singh
I am getting this error .. did a lot of googe search but not able to find a solution .. help please ViewDoesNotExist at /register/ Could not import user_registration.views. Error was: cannot import name validators Request Method: GET Request URL: http://127.0.0.1:/register/ Exception

Displaying dictionaries

2010-05-17 Thread Barry
Hi-- I want to dynamically display the contents of results (an array of dictionaries with the same keys) as a table where the column headers are a select group of keys in the variable result_col_titles and the order of the columns is the same as the order of the keys in result_col_titles. I

Custom Form in a ModelFormset_Factory?

2010-05-17 Thread Michael Davis
I am new to Django and am trying to get a custom modelForm to work in a ModelFormset_factory. For example: class Author(models.Model): name = models.CharField() address = models.CharField() -- You received this message because you are subscribed to the Google Groups "Django users"

Custom Form in a ModelFormset_Factory?

2010-05-17 Thread Michael Davis
I am new to Django and am trying to get a custom modelForm to work in a ModelFormset_factory. For example: # in models.py class Author(models.Model): name = models.CharField() address = models.CharField() phone = models.CharField() class AuthorForm(ModelForm): class Meta:

Re: Setting User as foreign key

2010-05-17 Thread Pirate Pete
Turns out i simply had to drop all the tables in the database, flush then syncdb and everything worked fine. thanks 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

Re: ANN: Django 1.1.2 and Django 1.2 released

2010-05-17 Thread Joshua Partogi
I have just read through the release notes, and really amazed how django 1.2 has evolved from 1.1. Kudos to everyone that is involved and put all effort into delivering django 1.2 Kind regards, Joshua On May 18, 9:46 am, Continuation wrote: > Congrats to the Django

Re: CSRF protection in admin in Django 1.2

2010-05-17 Thread Spaceman Paul
Seems to only be a problem when my over-ridden view function calls down to the base class view implementation. And indeed an excessive exercise in copy-and-pasting fixes it. It would be nice if there was a clean simple way to turn CSRF off in sub-classed admin sites. E.g: class

CSRF protection in admin in Django 1.2

2010-05-17 Thread Spaceman Paul
Hi, I just upgraded to Django 1.2 and am having some problems. My project contains several customised django.contrib.admin sites that offer highly stripped down subsets of admin functionality. These customised sites do not use authentication and are expected to be POSTed to both by users and by

pass related_name-s into Model.objects.create()?

2010-05-17 Thread Phlip
Djangoids: The documentation for Model.objects.create(**kwargs) just sez "**kwargs". What goes in the kwargs? Anything beside the obvious - the scalar members of the model? How about one-to-many relationships? Can I do this: Author.objects.create( name='Cromskey',

Re: ANN: Django 1.1.2 and Django 1.2 released

2010-05-17 Thread Continuation
Congrats to the Django team. Thanks for the great job. Really appreciate all your work. On May 17, 2:19 pm, James Bennett wrote: > We're pleased today to announce the release of both Django 1.1.2 -- > the second bugfix release in the 1.1 series -- and the long-awaited >

Multi-table inheritance - knowing the child object from the parent

2010-05-17 Thread Lee Hinde
Given the following: class Place(models.Model): name = models.CharField(max_length=50) address = models.CharField(max_length=80) zip_code = models.CharField(max_length=15) class Restaurant(Place): serves_hot_dogs = models.BooleanField() serves_pizza = models.BooleanField()

MySQL and transaction savepoint

2010-05-17 Thread Tomasz Zieliński
I've just discovered that MySQL supports savepoints. If so, then what is the reason of Django MySQL backend not supporting it? Is this Django limitation, MySQLdb limitation or there is some other reason? -- Tomasz Zieliński http://pyconsultant.eu -- You received this message because you are

Re: Combined search of specific fields

2010-05-17 Thread Rainy
Doh, here it is with hopefully fixed formatting: """ The following code searches records based on query and checkboxes checked in the search form. Query can have words with minus in front (e.g.: -word) to exclude terms. There are three checkboxes,

Combined search of specific fields

2010-05-17 Thread Rainy
The following code works fine but I'm wondering if there's a better / clearer way to do this. `qw` is a list of words to search for, `exclude` is a list of words to exclude from search. Thanks! """ Search records based on query and checkboxes checked in the

Re: can convert django docs of txt format to html format

2010-05-17 Thread Daniel Roseman
On May 17, 5:05 pm, pts wrote: > After download django 1.2,i want to read docs offline,but can i > convert all txt files to html format under windows xp? http://docs.djangoproject.com/en/1.1/internals/documentation/ -- You received this message because you are subscribed to

ANN: Django 1.1.2 and Django 1.2 released

2010-05-17 Thread James Bennett
We're pleased today to announce the release of both Django 1.1.2 -- the second bugfix release in the 1.1 series -- and the long-awaited Django 1.2. More information is available over at djangoproject.com: * Django 1.1.2 release announcement: http://www.djangoproject.com/weblog/2010/may/17/112/ *

Successful tests hanging

2010-05-17 Thread felipecruz
Hello everyone. When i run "manage.py test app_name" the python process hangs forever if tests succeed. If i got erros or failures, i'll not hang. Last output is: Destroying test database 'default'... I'm running django from trunk. I don't understand this behaviour.. maybe i'm missing

Re: Setting User as foreign key

2010-05-17 Thread Sameer Rahmani
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 First : did you sync your db after adding user field ? second : there were some django apps in google code for rating . and django have a complete comment framework -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux)

Setting User as foreign key

2010-05-17 Thread Pirate Pete
Hello, So basically i want to link users to comments they write and ratings they give on a video rating site. this is my models.py: from django.db import models from django.contrib.auth.models import User class Video(models.Model): title = models.CharField(help_text="Title of the

Re: override base translations in your project

2010-05-17 Thread lenz
Thanks for your reply. I used makemessages and compilemessages. The path in the project is correct - the fault was just in my question. On 17 Mai, 16:25, Ramiro Morales wrote: > On Sun, May 16, 2010 at 7:46 PM, lenz wrote: > > The Django docs tell that it

Re: override base translations in your project

2010-05-17 Thread lenz
Thanks for your reply. I used makemessages and compilemessages. The path in the project is correct - the fault was just in my question. On 17 Mai, 16:25, Ramiro Morales wrote: > On Sun, May 16, 2010 at 7:46 PM, lenz wrote: > > The Django docs tell that it

Re: override base translations in your project

2010-05-17 Thread lenz
Thanks for your reply. I checked it ...they work. On 17 Mai, 15:43, Nuno Maltez wrote: > I believe it should work the way you describe (you can even remove the > line with the reference to the source). > > Are all the othertranslationsin your project, excepto for those >

can convert django docs of txt format to html format

2010-05-17 Thread pts
After download django 1.2,i want to read docs offline,but can i convert all txt files to html format under windows xp? -- 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

Re: One to One chat like Facebook?

2010-05-17 Thread Ivan Uemlianin
Dear Anand Frederico Caceres' app [1,2] is worth a look, but note that it uses old-style repeated polling of the server. Alex Clemesha has written an exciting piece on developing real-time web apps with Django, Orbited and Twisted [3]. His demo application, hotdot [4], includes a real-time chat

Re: ordering inside regroup

2010-05-17 Thread zinckiwi
> annotate(myorder=Max('product__datefield')).order_by('producer.id', > 'myorder') Sorry, flip the order_by arguments: .order_by('myorder', 'producer.id') -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: ordering inside regroup

2010-05-17 Thread zinckiwi
> but I have to order this "structure" by the date of added product > ( newer first ) so if I add to this : product 2 for Producer 3 it > should look like this : > > Producer 3 >  product 1 >  product 2 > Producer 1 >  product 1 >  product 2 > Producer 2 >  product 1 > > so, is it possible to do

django-pluggables and decorators

2010-05-17 Thread imgrey
Have someone tried to use this: http://github.com/nowells/django-pluggables ? I tried to use decorators like this. class WebmoneyApp(PluggableApp): urlpatterns = patterns('', url(r'^(?P\d+)/$', 'invoice'), ) @login_required @csrf_protect def invoice(self, request,

Re: override base translations in your project

2010-05-17 Thread Ramiro Morales
On Sun, May 16, 2010 at 7:46 PM, lenz wrote: > The Django docs tell that it is possible to "override base > translations in your project path" but i have no idea how this works. > > I tried to copy the some contents of an third party apps django.po to > the django.po file of

Re: override base translations in your project

2010-05-17 Thread Nuno Maltez
I believe it should work the way you describe (you can even remove the line with the reference to the source). Are all the other translations in your project, excepto for those copied from the third party app, working fine? Nuno On Sun, May 16, 2010 at 11:46 PM, lenz wrote:

Group permissions

2010-05-17 Thread hadhiya
Hi I am trying to build a CMS where particular department users can only change/update/delete their pages. For example HR department() staff1(user1[HRGroup]) creates an entry(About HR) then staff2(user2[HRGroup]) must be able to change About HR page BUT IT department(ITGroup)

ordering inside regroup

2010-05-17 Thread maciekjbl
Hi, I'm new to django that's why the tittle may says something stupid. I was asked to write small application to group products with producers. OK now the problem. Problem is ordering. I use "regroup" to make: Producer 1 product 1 product 2 Producer 2 product 1 Producer 3 product 1 but I

OpenBookPlatform in django

2010-05-17 Thread Anand Agarwal
Hi All Has anybody tried to port OpenBookPlatform on django 1.1 Regards Anand Got an Idea? BootStrap it Today!! -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: include(admin.site.urls) mangles with the URL

2010-05-17 Thread Dennis Decker Jensen
On May 17, 1:30 pm, Russell Keith-Magee wrote: > On Mon, May 17, 2010 at 5:55 PM, Dennis Decker Jensen > > wrote: > > Hello! > > I use django straight from subversion trunk (with no significant > > trouble), and finally got around to change

Re: ManyRelatedManager object Question

2010-05-17 Thread appel268576
figured it out. Nevermind On May 17, 11:30 am, appel268576 wrote: > Hello. > > I have a model that draws info from another class, so basically a > ManyToMany field and want to display this information in my template. > > in my models.py I have the following. > > MODELS.PY

Re: Django 1.1.2?

2010-05-17 Thread Antoni Aloy
2010/5/17 Russell Keith-Magee : > On Mon, May 17, 2010 at 6:56 PM, Antoni Aloy wrote: >> Hello, >> >> On the main Django page the official version is 1.1.1 but there is a >> new 1.1.2 version even documented if you make a search on the Django >>

Re: admin media and template override ignored after switch to 1.2rc

2010-05-17 Thread naos
Well now I think that it might be related to virtualenv since I created new virtualenv with Django 1.1.1 and have the same result. On May 17, 12:44 pm, naos wrote: > Hi All, > > Today I tried to switch my project  from 1.0.4 to 1.2rc version and I > encountered

Re: Django 1.1.2?

2010-05-17 Thread Russell Keith-Magee
On Mon, May 17, 2010 at 6:56 PM, Antoni Aloy wrote: > Hello, > > On the main Django page the official version is 1.1.1 but there is a > new 1.1.2 version even documented if you make a search on the Django > site. Is the 1.1.2 officialy supported? Unofficially, yes it is

Re: include(admin.site.urls) mangles with the URL

2010-05-17 Thread Russell Keith-Magee
On Mon, May 17, 2010 at 5:55 PM, Dennis Decker Jensen wrote: > Hello! > > I've been using django for a while now, and been around in the > documentation and a bit in the source code as well. I have a site > setup along the lines of the tutorial, nothing fancy, a flat

Django 1.1.2?

2010-05-17 Thread Antoni Aloy
Hello, On the main Django page the official version is 1.1.1 but there is a new 1.1.2 version even documented if you make a search on the Django site. Is the 1.1.2 officialy supported? -- Antoni Aloy López Blog: http://trespams.com Site: http://apsl.net -- You received this message because

admin media and template override ignored after switch to 1.2rc

2010-05-17 Thread naos
Hi All, Today I tried to switch my project from 1.0.4 to 1.2rc version and I encountered problem with admin media definitions and template override. It simply doesn't work :) JS,CSS files are not included in the html and all template customizations are not present, looks like my custom templates

Re: order_with_respect_to fails for GenericForeignKey

2010-05-17 Thread Russell Keith-Magee
2010/5/17 Alper Çuğun : > Hello, > > A quick Google search reveals a ton of confusion about: > Meta: order_with_respect_to > > I have an abbreviated Model: > > class NewsItem(models.Model): >    # newsitems will be linked to blogs and projects >    content_type =

FormWizard and fields which allow only one validation

2010-05-17 Thread Valentin Golev
Hello! I've been using SuperCaptcha for Django for some time and everything was OK. But one day I was stupid enough and tried to use it with FormWizard. I think it's a bug and I could not invent a workaround for it (except for not using the FormWizard). The problem is, FormWizard validates every

template_context_processors

2010-05-17 Thread stefan
Hello, I have this issue, I am using the development Django version (checked out from svn). I use a template_context_processor and sometimes the context_processor is processed twice, one for the current request and one for the referring/previous request. I know this because I am using logging

include(admin.site.urls) mangles with the URL

2010-05-17 Thread Dennis Decker Jensen
Hello! I've been using django for a while now, and been around in the documentation and a bit in the source code as well. I have a site setup along the lines of the tutorial, nothing fancy, a flat urls.py and no fancy use of namespaces or anything like that. I use django straight from subversion

ManyRelatedManager object Question

2010-05-17 Thread appel268576
Hello. I have a model that draws info from another class, so basically a ManyToMany field and want to display this information in my template. in my models.py I have the following. MODELS.PY class Geo(models.Model): title = models.CharField(max_length=30) class Specie(models.Model):

Re: formsets and empty results

2010-05-17 Thread Wim Feijen
Hi Dexter, thanks for your answer, The urls you gave are about forms, not formsets? My code looks like this: @teacher_required def add_students(request): school = School.objects.for_user(request.user) class StudentForm(UserCreationForm): name =

Re: sqlite3 backend error

2010-05-17 Thread Tomi Pieviläinen
This is due to having a virtualenv created in a previous version of Ubuntu. Recreate the virtualenv under Lucid, and you should be fine. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

order_with_respect_to fails for GenericForeignKey

2010-05-17 Thread Alper Çuğun
Hello, A quick Google search reveals a ton of confusion about: Meta: order_with_respect_to I have an abbreviated Model: class NewsItem(models.Model): # newsitems will be linked to blogs and projects content_type = models.ForeignKey(ContentType) object_id =

Re: I need help

2010-05-17 Thread Jens Rantil
Hi Hussain, Please be more descriptive in your subject line next time. It makes it easier for everyone subscribed to the list to acknowledge if the message is something is of interest or not. Thank you, Jens On 14 Maj, 10:51, Hussain Deikna wrote: > Hi, >  I plan to start