Re: 'module' object has no attribute 'day_abbr' --Problem editing using Admin

2008-03-30 Thread Kenneth Gonsalves
On 31-Mar-08, at 10:28 AM, Ryan Vanasse wrote: > class Event(models.Model): > eventName = models.CharField(maxlength=63) > #eventDate = models.DateField() > start_time = models.DateTimeField() > end_time = models.DateTimeField() > eventLocation =

paginator.get_page(0) returning empty list

2008-03-30 Thread linnewbie
Hi, I'm using Django .96 and I am having a problem with pagination which I find very strange. My model is something like this and I have objects in the database: class Conference(models.Model): conf_no = models.CharField(maxlength=200) country =

Re: Localizing URLs

2008-03-30 Thread [EMAIL PROTECTED]
Perhaps you could try doing a per request url conf: http://www.b-list.org/weblog/2007/nov/06/urlconf/ I'm not sure how this would work, but I think it might help, although I guess you'd need a URL conf for each languages :/ On Mar 30, 11:58 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On

Re: Localizing URLs

2008-03-30 Thread Malcolm Tredinnick
On Fri, 2008-03-28 at 06:13 -0300, Marinho Brandao wrote: > Hi, > > I had tryied several ways a lot of time trying to localize my URLs, > like in django-authopenid [1] > > but I had have the same result: when I change the current language, > everything works but URLs stills in old language.

'module' object has no attribute 'day_abbr' --Problem editing using Admin

2008-03-30 Thread Ryan Vanasse
I'm sorry for writing at such an early, clueless time in my learning process (both with python and django) but this problem appears to be in code I didn't write and I'm not sure what the best way to work around this problem is. I'm sorry for not having lurked more to understand the norms of this

Re: how to force char field instead varchar to be created

2008-03-30 Thread Malcolm Tredinnick
On Thu, 2008-03-27 at 13:06 -0700, eat wrote: > I want to have char fields (db storage reason) instead of varchar > how to force that in the models.py ?? > > django seems to create only varchar You'll need to create a custom model field or a custom database backend. Malcolm -- Atheism is a

Re: Using Django for Teaching

2008-03-30 Thread Kenneth Gonsalves
On 31-Mar-08, at 9:58 AM, Todd O'Bryan wrote: > Sorry this is two weeks late (it's been a bear of a two weeks), but > I use Django with high school students who've done the equivalent > of a year of college programming--the AP Computer Science AB > curriculum. what age would these

Re: Using Django for Teaching

2008-03-30 Thread Todd O'Bryan
Sorry this is two weeks late (it's been a bear of a two weeks), but I use Django with high school students who've done the equivalent of a year of college programming--the AP Computer Science AB curriculum. We've been working on a webapp for two years that has evolved into something with 8 apps,

Re: synchronization problem

2008-03-30 Thread PENPEN
I checked the transaction module of django. I think it could work. But why do you prefer this version column solution? Does it have better performance? On 3月31日, 上午9时54分, meppum <[EMAIL PROTECTED]> wrote: > I found this thread helpful. > >

JSON-compatible query filter specification and code

2008-03-30 Thread Michael Halle
Hello, I've just uploaded a snippet for specifying Django query filters using a nested list syntax. This representation enables query filters to be built by a client-side JavaScript application and sent to a server app using JSON. The code included in the snippet transforms this query filter

Re: Model Inheritance

2008-03-30 Thread David Marquis
I think that Django does not support model inheritance (yet). The dev team seems to have thought about it : http://code.djangoproject.com/wiki/ModelInheritance You might want to ask Google for "django model inheritance" for all the information you need. -- David On 30-Mar-08, at 4:27 PM,

Re: Django Admin WAP

2008-03-30 Thread David Marquis
Using the Django admin on a WAP browser would involve serious usability issues. I just can't imagine myself filling a django edit form with a numeric keypad, I would quickly throw the phone out the window. I really don't understand why would anyone want to endure such a thing, except from

Re: many to many field problem

2008-03-30 Thread didia lim
Hi evert, the transparency is inside class tableSlot, when i'm looping tableSlot, it works fine... but when i add the columnsetup or querysetup, i got the error.. maybe my query is wrong? :( - Original Message From: Evert Rol <[EMAIL PROTECTED]> To: django-users@googlegroups.com Sent:

Re: mark_safe for a html field

2008-03-30 Thread Kenneth Gonsalves
On 31-Mar-08, at 7:20 AM, Marc Garcia wrote: > does anybody know a simple way to mark a model field as safe html (and > tell django not to escape this field content)? http://www.djangoproject.com/documentation/templates/#automatic-html- escaping -- regards kg http://lawgon.livejournal.com

mark_safe for a html field

2008-03-30 Thread Marc Garcia
Hi, does anybody know a simple way to mark a model field as safe html (and tell django not to escape this field content)? I can create a method in the model that outputs the return of mark_safe applied to field content, and it should work. But may be there is something more simple that I'm

Re: Google Maps API

2008-03-30 Thread Michael
I would search for "google maps API." Really though the integration with google maps is mostly a front end application. So you would create it all with front end javascript. The only real django knowledge to pass here would be to make store the longitude and latitude values that google gives you

Re: Google Maps API

2008-03-30 Thread Ramiro Morales
On Sun, Mar 30, 2008 at 10:08 PM, <[EMAIL PROTECTED]> wrote: > > I have a field I'm using that shows where events are around our area > for sports collectors, what I'd like to do is implement Google Maps, > kind of like the Washington Post does here: > > >

Re: Django Admin WAP

2008-03-30 Thread leonel
Jeff Anderson wrote: > leonel wrote: >> Hello: >> >> Is there a WAP admin for django ?? Been searching and didn't found >> anything about it >> > I'm fairly certain that there is no such thing. > > I am curious as to why you need it though. What specifically are you > trying to accomplish?

Re: synchronization problem

2008-03-30 Thread Mark Green
On Sun, 2008-03-30 at 17:49 -0700, meppum wrote: > The easiest way to deal with this is to create a "version" column that > gets updated with the current version number of the row in the > database. Increment this column value each time a save is performed on > that row. Override the save method

Google Maps API

2008-03-30 Thread cmccomas80
I have a field I'm using that shows where events are around our area for sports collectors, what I'd like to do is implement Google Maps, kind of like the Washington Post does here: http://projects.washingtonpost.com/2008-presidential-candidates/tracker/dates/2008/apr/09/6741/ Where/what would

Re: Django Admin WAP

2008-03-30 Thread Jeff Anderson
leonel wrote: Hello: Is there a WAP admin for django ?? Been searching and didn't found anything about it I'm fairly certain that there is no such thing. I am curious as to why you need it though. What specifically are you trying to accomplish? Jeff Anderson signature.asc

Django Admin WAP

2008-03-30 Thread leonel
Hello: Is there a WAP admin for django ?? Been searching and didn't found anything about it Thank you Leonel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: localflavor in admin

2008-03-30 Thread erikankrom
Sorry, I was referring to the state and zip fields. After modifying my model, doing a sqlreset, and implementing the changes, they now show up. Thanks! I was confused between the functionality of the forms and the fields in models. I'll get into the widget usage in the forms when building

Multiple sites on shared host

2008-03-30 Thread Brandon Taylor
Hi everyone, I'm on shared hosting and can't modify any Apache settings. So, I'm assuming I need to specify which settings file to use in .htaccess. I have two projects on my server. The first one is working correctly, the second is not. The problem with the second is that it seems to be

Re: localflavor in admin

2008-03-30 Thread Evert Rol
> I have a model: > > from django.db import models > from django import newforms as forms > from django.contrib.localflavor.us import forms as us_forms > > class Address(models.Model): > member = models.ForeignKey(Member, unique=True) > street =

Re: localflavor in admin

2008-03-30 Thread Daniel Roseman
On Mar 30, 8:49 pm, erikankrom <[EMAIL PROTECTED]> wrote: > I have a model: > > from django.db import models > from django import newforms as forms > from django.contrib.localflavor.us import forms as us_forms > > class Address(models.Model): > member =

Model Inheritance

2008-03-30 Thread jurian
How would I go about implementing a model that only exists to be inherited from and not used on it's own? Example: class Animal(models.Model): name = models.CharField() class Dog(Animal): x = models.CharField() class Cat(Animal): y = models.CharField() In the example I want to create and

localflavor in admin

2008-03-30 Thread erikankrom
I have a model: from django.db import models from django import newforms as forms from django.contrib.localflavor.us import forms as us_forms class Address(models.Model): member = models.ForeignKey(Member, unique=True) street =

Re: generic views - newforms

2008-03-30 Thread Michael
They are two very different animals really. Generic views work as a way to cut code from your views code (the code that creates the httpresponse, between the url handling and the template rendering). Newforms is the way that Django creates and handles forms. You will generally need to use a new

generic views - newforms

2008-03-30 Thread Victor Quiroz
Hello, what is the difference (advantage) to use generic views or newforms Victor --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Newforms

2008-03-30 Thread Michael
That is whoafully lacking in information. Here's a quick example of how data moves in newforms: >>> from registration.forms import RegistrationForm >>> form = RegistrationForm({'username':'jlennon','email':'[EMAIL >>> PROTECTED]','password1':'password','password2':'password'}) >>>

Funny video! Sexi girl!

2008-03-30 Thread romki
Funny video! Sexi girl! http://rozrywka.yeba.pl/show.php?id=1030 --~--~-~--~~~---~--~~ 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

users online

2008-03-30 Thread dall
Can someone help me how to get users online thingy done right ? --~--~-~--~~~---~--~~ 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

Re: Need Help Thinking Through How to Setup URLS and VIEWS

2008-03-30 Thread Rob Hudson
On Mar 29, 2:54 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Specifically, i need help with: > 1. How do I test to see what a slug is? I.E. In my case, is it a > section or a page. > > Finally, am I barking up the wrong tree? Would it be simpler to just > write a custom view that does

Re: Permissions get automatically created without class Admin in models

2008-03-30 Thread James Bennett
On Sun, Mar 30, 2008 at 10:47 AM, Karen Tracey <[EMAIL PROTECTED]> wrote: > Note ticket #5926 has been hanging around for a few months on this issue, > with at least 3 people (one who provided a patch) hoping the fix would be to > change the code to match the docs versus changing the docs to

Re: Permissions get automatically created without class Admin in models

2008-03-30 Thread Karen Tracey
On Sun, Mar 30, 2008 at 9:36 AM, James Bennett <[EMAIL PROTECTED]> wrote: > > On Sun, Mar 30, 2008 at 8:06 AM, Carl <[EMAIL PROTECTED]> wrote: > > I will open a ticket right away... > > Fixed in changeset 7388. > Note ticket #5926 has been hanging around for a few months on this issue, with at

Re: synchronization problem

2008-03-30 Thread Karen Tracey
On Sun, Mar 30, 2008 at 8:45 AM, PENPEN <[EMAIL PROTECTED]> wrote: > > Hi Carl, > I didn't mention to the syncdb of manage.py. > I'm talking about the problem that may happen when trying to access > the db. > > Take a poll for exmaple. It may happen that 2 users vote at the same > time. A vote

Re: Unexpected TypeError in m2m relationship

2008-03-30 Thread Karen Tracey
On Sun, Mar 30, 2008 at 8:38 AM, J. Clifford Dyer <[EMAIL PROTECTED]> wrote: > >[details snipped] > > > > Well I can still take your posted model file, simply add "class Admin: > > pass" to the models so I can dummy up some data in the admin, and then > > run your interactive session without

Creating Custom Admin Views

2008-03-30 Thread Bernd
Hello, I followed the documentation http://www.djangobook.com/en/1.0/chapter17/ in the section "Creating Custom Admin Views". I try to override the change_list.html for one of my models. I only would like to extend the change_list for the model with some extra context data. All of the other

Re: render_to_response syntax

2008-03-30 Thread Karen Tracey
On Sun, Mar 30, 2008 at 5:23 AM, Jaap <[EMAIL PROTECTED]> wrote: > > render_to_response('template', *args, **kwargs): > kwargs looks like a dictionary but if I refer to a dictionary, it is > ignored: > > In >names = {} >names['my_name'] = "somename" >

Re: Admin page doesn't show calendar popup

2008-03-30 Thread Evert Rol
> I just installed Django 96.1 on my Mac. When I follow the tutorial > and get to the Admin page, the calendar pop ups don't show up. Is > there a problem with the install. I'm using Leopard. Could be your browser (javascript problem). What browser & version are you using; have you tried

Re: render_to_response syntax

2008-03-30 Thread Evert Rol
> render_to_response('template', *args, **kwargs): > kwargs looks like a dictionary but if I refer to a dictionary, it is > ignored: > > In >names = {} >names['my_name'] = "somename" >render_to_response('template.html', names) > > names is equivalent to {'my_name': 'somename'}, so I

Re: Shell reloading

2008-03-30 Thread Evert Rol
Have you tried installing iPython? I can remembers your history across sessions, and has lots of other niceties (eg, you can define a default set of import statements on startup). If installed, python manage.py shell will automatically pick it up. > Thanks Christian, that's a great tip! > >

Re: Permissions get automatically created without class Admin in models

2008-03-30 Thread James Bennett
On Sun, Mar 30, 2008 at 8:06 AM, Carl <[EMAIL PROTECTED]> wrote: > The only problem is, that those automatically created permissions have > english descriptions and I'm building something for a german-only > speaking user base. But i think i'll just change the descriptions > manually in the

Re: Permissions get automatically created without class Admin in models

2008-03-30 Thread James Bennett
On Sun, Mar 30, 2008 at 8:06 AM, Carl <[EMAIL PROTECTED]> wrote: > I will open a ticket right away... Fixed in changeset 7388. -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~-~--~~~---~--~~ You received this message

Anyone Interested in writing an article for Digital Web Magazine?

2008-03-30 Thread William Hicks
Hi Kids, I'm one of the new editors at Digital-Web Magazine, a weekly online publication for web designers and developers. We're always looking for new authors and I was curious if anyone might want to do an intro to Django for our readers. We published a "Ruby on Rails for the rest of us" a

Re: Permissions get automatically created without class Admin in models

2008-03-30 Thread Carl
Thanks again! The only problem is, that those automatically created permissions have english descriptions and I'm building something for a german-only speaking user base. But i think i'll just change the descriptions manually in the database. That's just a few lines of SQL at the end... I will

Re: Permissions get automatically created without class Admin in models

2008-03-30 Thread Russell Keith-Magee
On Sun, Mar 30, 2008 at 8:41 PM, Carl <[EMAIL PROTECTED]> wrote: > > Hi, > > and fast thanks for the super fast reply! > Just to make sure that I understood it correctly ---> those standard > permissions are unevitable if I use django.contrib.auth? Yes. > That would really be inconvinient!

Re: synchronization problem

2008-03-30 Thread PENPEN
Hi Carl, I didn't mention to the syncdb of manage.py. I'm talking about the problem that may happen when trying to access the db. Take a poll for exmaple. It may happen that 2 users vote at the same time. A vote action is made in the three steps: 1. read the old counter 2. add the counter by 1

Re: Permissions get automatically created without class Admin in models

2008-03-30 Thread Carl
Hi, and fast thanks for the super fast reply! Just to make sure that I understood it correctly ---> those standard permissions are unevitable if I use django.contrib.auth? That would really be inconvinient! And moreover, the documentation would be misleading as it states: "Three basic

Re: Unexpected TypeError in m2m relationship

2008-03-30 Thread J. Clifford Dyer
On Wed, 2008-03-26 at 19:11 -0400, Karen Tracey wrote: > On Wed, Mar 26, 2008 at 5:16 PM, J. Cliff Dyer <[EMAIL PROTECTED]> > wrote: > > > So it did. I had stripped down my original one to get rid of > a couple > hundred lines of unimportant cruft, but

Re: Permissions get automatically created without class Admin in models

2008-03-30 Thread Russell Keith-Magee
On Sun, Mar 30, 2008 at 8:18 PM, Carl <[EMAIL PROTECTED]> wrote: > > Hi Djangonauts, > > just observed that the standard edit/update/delete-permissions get > created for all my models without me having given them the inner class > Admin. Anyone an idea why this happens? Because model permissions

Re: Shell reloading

2008-03-30 Thread Carl
Thanks Christian, that's a great tip! On 30 Mrz., 11:29, "Christian Vest Hansen" <[EMAIL PROTECTED]> wrote: > Try > > >>> help(reload) > > Instead of restarting the entier shell. > > On 3/30/08, Jorge Sousa <[EMAIL PROTECTED]> wrote: > > > Hi, > > > I'm using Django on windows. > > Is it

Re: synchronization problem

2008-03-30 Thread Carl
Hi PenPen, what do you mean with 'the multi-thread scenario'? I assume you already know the syncdb param for the manage.py? Best regards, Carl On 30 Mrz., 13:12, PENPEN <[EMAIL PROTECTED]> wrote: > Does Django provide any method to handle the synchronization problems > with DB? How does it

Permissions get automatically created without class Admin in models

2008-03-30 Thread Carl
Hi Djangonauts, just observed that the standard edit/update/delete-permissions get created for all my models without me having given them the inner class Admin. Anyone an idea why this happens? Best regards, Carl --~--~-~--~~~---~--~~ You received this message

Re: selenium versus django app

2008-03-30 Thread Russell Keith-Magee
On Sat, Mar 29, 2008 at 12:45 AM, Robin Becker <[EMAIL PROTECTED]> wrote: > > I have a bunch of really weird errors coming from selenium built with the IDE > when running in proper selenium. The page in question is an admin form coming > from the python django framework > > > info: Executing:

Re: Problem with django unit testing

2008-03-30 Thread Russell Keith-Magee
On Sat, Mar 29, 2008 at 11:00 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > but when I run unit test to test the failed function use: > $ ./manage.py test apps.test.test_template > there will be ok: > """ > . >

synchronization problem

2008-03-30 Thread PENPEN
Does Django provide any method to handle the synchronization problems with DB? How does it keep the DB's consistency in the multi-thread scenario? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group.

render_to_response syntax

2008-03-30 Thread Jaap
render_to_response('template', *args, **kwargs): kwargs looks like a dictionary but if I refer to a dictionary, it is ignored: In names = {} names['my_name'] = "somename" render_to_response('template.html', names) names is equivalent to {'my_name': 'somename'}, so I would expect the

News about GoFlow (workflow engine for django)

2008-03-30 Thread MiloZ
Some interesting new features: - fast user switch in debug/test mode - simulation mode with no code - refactoring Try it (again). Don't hesitate asking questions in the FAQ (http:// code.djangoproject.com/wiki/goflow%3AFAQ) --~--~-~--~~~---~--~~ You received

Re: Newforms

2008-03-30 Thread Rufman
if I do form = SothmeForm(fields) and fields is a dictionary, I don't get fields in the form object. Why is this? Stephane --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: Problem with django unit testing

2008-03-30 Thread Kenneth Gonsalves
On 30-Mar-08, at 1:31 PM, [EMAIL PROTECTED] wrote: > Any one who can help me? Thank you so much! be patient - it is a weekend ;-) -- regards kg http://lawgon.livejournal.com http://nrcfosshelpline.in/code/ --~--~-~--~~~---~--~~ You received this message

Re: Problem with django unit testing

2008-03-30 Thread [EMAIL PROTECTED]
Any one who can help me? Thank you so much! On Mar 29, 11:00 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi, all, > > I meet a strangely problem on django unittesting. I use django svn > version, the test code like this: > > """ > from

xsex ....... xanal.......xfuck.......ineresting

2008-03-30 Thread XxX
Hot World -- XXX *** http://myprofile96321.blogspot.com/ http://freewebs.com/7tracks/ http://freewebs.com/zbeauti/ *** --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

natural love become evershine sexual

2008-03-30 Thread XxX
Hot World -- XXX *** http://myprofile96321.blogspot.com/ http://freewebs.com/7tracks/ http://freewebs.com/zbeauti/ *** --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: distinct UPDATE / INSERT before save() without select to DB

2008-03-30 Thread Amit Ramon
* eat <[EMAIL PROTECTED]> [2008-03-29 05:24 -0700]: > > How to distinct in save() method of the model if the save operation > will be update or insert. > > I want to know it BEFORE doing the save(). > I want to know it WITHOUT doing a select to a database. > > THe reason for that : i want to