Dynamic choice on Model

2008-06-03 Thread wulfrano
Hi, I'm creating a model with a field as follows: trackno = models.PositiveSmallIntegerField(choices=SONGNO_CHOICES) I try to create the SONGNO_CHOICES tuple with this code: dict = {} j = 0 while j<100: dict[j]=(j,j+1) j=j+1 SONGNO_CHOICES = dict When a try to validate my model,

Re: ModelForm and required fields

2008-06-03 Thread Mayank Dhingra
did u try using the required parameter ? In my case the default behavior was required and i changed it to not-required by adding "required=False" like name = forms.CharField(widget=forms.TextInput(attrs=class_txtbox), required=False) On May 2, 10:18 am, zmalloc <[EMAIL PROTECTED]> wrote: >

Re: problem in remember me feature

2008-06-03 Thread Mayank Dhingra
traceback UnboundLocalError at /login/ local variable 'settings' referenced before assignment Installed Middleware: ('django.middleware.common.CommonMiddleware', 'myproject.dual_session_middleware.DualSessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware',

Re: select only some feilds

2008-06-03 Thread Vance Dubberly
Thank you ! I'm obviously gone blind. w On Tue, Jun 3, 2008 at 1:29 PM, josesoa <[EMAIL PROTECTED]> wrote: > > http://www.djangoproject.com/documentation/db-api/#values-fields > > On Jun 3, 4:08 pm, "Vance Dubberly" <[EMAIL PROTECTED]> wrote: >> So I think I heard somewhere out there in django

Re: sorting inspectdb output

2008-06-03 Thread [EMAIL PROTECTED]
I don't think there is an option for that.. On Jun 3, 3:16 pm, Vidja <[EMAIL PROTECTED]> wrote: > Thanks Carole, > > Didn't know this option. Is there a way to tell inspectdb to do that? > Would be a nice option. For now I will just change the file. > > VidJa > > On 3 jun, 05:54, "[EMAIL

Re: Different time zone for server and editors screwing up show_from__lte = datetime.now()

2008-06-03 Thread Rodrigo Culagovski
Forgot: timezone is set correctly: TIME_ZONE = 'America/Santiago' The server is in Houston, USA: On Jun 3, 9:16 pm, Rodrigo Culagovski <[EMAIL PROTECTED]> wrote: > I have a Banner model with a show_from DateTimeField, which I filter > to make sure I'm only showing them after they're due, like

Re: Is there any Django module like ViewCV for svn repositories?

2008-06-03 Thread Kenneth Gonsalves
On 03-Jun-08, at 9:22 PM, The Code Janitor wrote: > I want to have a source code repository view on my Django site. I can > not find any such module available. trac -- regards kg http://lawgon.livejournal.com http://nrcfosshelpline.in/code/

Data too long for column error using textfield

2008-06-03 Thread emy_66
Hi All, I have a problem with a DataError at /admin/polls/poll/5/ (1406, "Data too long for column 'choice' at row 1"), even though the model field is set as a textfield which is taking longtext. The data I'm trying to input is this below, as you can see it's not very long at all. I've tried

Re: why so slow?

2008-06-03 Thread Aaron Fay
If it makes any difference to you at this point: I run django-nfa on a intel 825 dual core with 2GB of ram, eclipse, and a multitude of other apps running, and django dev server reloads my applications about as fast as I can change from the ide to the browser. My other developer, on the

Different time zone for server and editors screwing up show_from__lte = datetime.now()

2008-06-03 Thread Rodrigo Culagovski
I have a Banner model with a show_from DateTimeField, which I filter to make sure I'm only showing them after they're due, like so: from datetime import datetime current_banners = Banner.objects.filter(show_from__lte = datetime.now()) However, the server is not in the same time zone as the

Re: Navigation components

2008-06-03 Thread Peter Rowell
> The bit I don't see is how you get the info about section navigation > into the context - is it hard-coded into the view? This is what I'd > like to avoid. Ah. The short answer is: sort of. The breadcrumbs are a straight computation. The nav bar was done by CSS class manipulation, where the

Re: why so slow?

2008-06-03 Thread Colin Bean
On Tue, Jun 3, 2008 at 4:01 PM, <[EMAIL PROTECTED]> wrote: > > now i see, ty very much. django seems awesome though now that it is > working for me. > > On 4 Juni, 00:57, "Colin Bean" <[EMAIL PROTECTED]> wrote: >> On Tue, Jun 3, 2008 at 2:00 PM, <[EMAIL PROTECTED]> wrote: >> >> > im running

Re: django mysqldb cursor

2008-06-03 Thread Russell Keith-Magee
On Wed, Jun 4, 2008 at 7:30 AM, Eric Wertman <[EMAIL PROTECTED]> wrote: > > No one answered this.. Does anyone see it? Please have some patience. You asked your question 7 hours ago. Keep in mind that this is an international mailing list, and not everyone is in the same timezone as you, waiting

Re: django mysqldb cursor

2008-06-03 Thread Eric Wertman
No one answered this.. Does anyone see it? I found out that the connection does support pyformat, and does not require any action to use the cursor object in that way.. seems to figure out that's how you are using it automatically. On Tue, Jun 3, 2008 at 11:40 AM, Eric Wertman <[EMAIL

Re: Accessing model fields by name

2008-06-03 Thread Russell Keith-Magee
On Wed, Jun 4, 2008 at 5:49 AM, eelcoh <[EMAIL PROTECTED]> wrote: > > > Hi, > > I am using setattr(self, fieldname, value) to set a value on a field > for which i do not know anything but the name. Is that common django > idiom, or are there better ways to do this? This isn't a Django-specific

Re: Setting variables in context in a template tag

2008-06-03 Thread Daryl Spitzer
On Tue, Mar 18, 2008 at 12:29 AM, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > If you know how many levels of nesting you want to keep the value for, > you could traverse the context['parent'] links to store things in the > right parent / grandparent / what have you. I don't see any

Re: why so slow?

2008-06-03 Thread circularfunc
now i see, ty very much. django seems awesome though now that it is working for me. On 4 Juni, 00:57, "Colin Bean" <[EMAIL PROTECTED]> wrote: > On Tue, Jun 3, 2008 at 2:00 PM, <[EMAIL PROTECTED]> wrote: > > > im running part 2 of the tutorial right now and im inside the admin. > > when

Re: why so slow?

2008-06-03 Thread Colin Bean
On Tue, Jun 3, 2008 at 2:00 PM, <[EMAIL PROTECTED]> wrote: > > im running part 2 of the tutorial right now and im inside the admin. > when connecting to localhost it is s slow, why? Well, the tutorial does say: "You've started the Django development server, a lightweight Web server

Re: Django bug or very strange behavior - new to Django don't know which

2008-06-03 Thread puff
An hour later I know what caused the behavior and it seems to me to be a Django bug or at least deficiency. This behavior occurred during an initialization of the application. First the table xx_xxnode was initialized by deleting all of its records and then reloading the table from an external

Setting a ManyToMany default

2008-06-03 Thread Peter Rowell
My current project is loaded with ManyToMany relationships. Most of them are not required and default to nothing. One of them, however, is required and there is a very clear default value I could use ... if I could only figure out how. Consider: class Varietal(models.Model): name =

Re: Changing 'list_display' for User

2008-06-03 Thread Jay Parlar
On 6/3/08, Tim <[EMAIL PROTECTED]> wrote: > > I'm looking for something similar to this and I ran across this blog: > http://www.amitu.com/blog/2007/july/django-extending-user-model/ > > Perhaps will spark your imagination. Ahh, I had forgotten about ._meta, that let me do what I needed.

Re: why so slow?

2008-06-03 Thread Paulo Abreu
[EMAIL PROTECTED] wrote: im running part 2 of the tutorial right now and im inside the admin. when connecting to localhost it is s slow, why? Are you using firefox? I have the same problema connecting through firefox. I'm using windows and I have django in a ubuntu virtual machine

Accessing model fields by name

2008-06-03 Thread eelcoh
Hi, I am using setattr(self, fieldname, value) to set a value on a field for which i do not know anything but the name. Is that common django idiom, or are there better ways to do this? eelco --~--~-~--~~~---~--~~ You received this message because you are

Re: why so slow?

2008-06-03 Thread James Bennett
On Tue, Jun 3, 2008 at 4:00 PM, <[EMAIL PROTECTED]> wrote: > im running part 2 of the tutorial right now and im inside the admin. > when connecting to localhost it is s slow, why? If you need to have a running dialogue with someone who can help you as you walk through the tutorial, consider

Re: ImageField get_X_url() method not respecting MEDIA_URL?

2008-06-03 Thread Marty Alchin
On Tue, Jun 3, 2008 at 5:15 PM, Chris Czub <[EMAIL PROTECTED]> wrote: > # URL that handles the media served from MEDIA_ROOT. > # Example: "http://media.lawrence.com; > MEDIA_URL = 'http://www.mysite.com/media' > > > which is correct - the url of the image SHOULD be > >

Django bug or very strange behavior - new to Django don't know which

2008-06-03 Thread puff
RAW sql statement SELECT COUNT(*) FROM `xx_xxraid` shows table has 12 records. In application statement print '---xxx raids have', ESRaid.objects.count() prints 0! Why? I've imported connections and print connection.queries[-1] just after the count prints {'time': '0.000', 'sql':

Re: Changing 'list_display' for User

2008-06-03 Thread Tim
I'm looking for something similar to this and I ran across this blog: http://www.amitu.com/blog/2007/july/django-extending-user-model/ Perhaps will spark your imagination. Tim On Jun 3, 12:04 pm, "Jay Parlar" <[EMAIL PROTECTED]> wrote: > Is there a programatic way to modify the 'list_display'

Re: django + google appengine?

2008-06-03 Thread James Bennett
On Tue, Jun 3, 2008 at 4:02 PM, <[EMAIL PROTECTED]> wrote: > google appengine seems like a good place to start, then i dont have to > get my own servers and stuff. > > is this easy integrateable? or doesnt google appengine and django work > together? There are a number of articles and tutorials

ImageField get_X_url() method not respecting MEDIA_URL?

2008-06-03 Thread Chris Czub
I'm having an issue with the ImageField's get_X_url() method(I think it actually inherits from FileField) not using my MEDIA_URL in the url it forms. *Model:* class ImageUpload(models.Model): image = models.ImageField(help_text='Image to upload', upload_to="uploads/%Y%m%d%H%M%S") class

Re: django + google appengine?

2008-06-03 Thread Will Boyce
oops, http://code.google.com/appengine/articles/django.html was the link I should've given you Regards, Will Boyce u: http://willboyce.com e: [EMAIL PROTECTED] On 3 Jun 2008, at 22:02, [EMAIL PROTECTED] wrote: > > i, once i have learned more about django, will build a prety big >

Re: django + google appengine?

2008-06-03 Thread Will Boyce
Google discuss this at length. http://code.google.com/p/google-app-engine-django/ would be a good starting place I guess. There may be more in the GAE Docs Regards, Will Boyce u: http://willboyce.com e: [EMAIL PROTECTED] On 3 Jun 2008, at 22:02, [EMAIL PROTECTED] wrote: > > i, once i have

django + google appengine?

2008-06-03 Thread circularfunc
i, once i have learned more about django, will build a prety big application and want to host it somewhere for free. google appengine seems like a good place to start, then i dont have to get my own servers and stuff. is this easy integrateable? or doesnt google appengine and django work

why so slow?

2008-06-03 Thread circularfunc
im running part 2 of the tutorial right now and im inside the admin. when connecting to localhost it is s slow, why? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: Tutorial, def __unicode__ not working

2008-06-03 Thread circularfunc
problem was i ahd to restart the shell, didnt work just reimporting. On 3 Juni, 22:18, Sebastian Bauer <[EMAIL PROTECTED]> wrote: > try: > def __str__(self): > return self.question > > [EMAIL PROTECTED] pisze: > > >http://www.djangoproject.com/documentation/tutorial01/ > > > added these: > >

Re: select only some feilds

2008-06-03 Thread josesoa
http://www.djangoproject.com/documentation/db-api/#values-fields On Jun 3, 4:08 pm, "Vance Dubberly" <[EMAIL PROTECTED]> wrote: > So I think I heard somewhere out there in django land that with the > merge of QuerySet refactor we gained the ability specify the fields we > want returned in a

Re: Navigation components

2008-06-03 Thread Will Boyce
I am also in a very similar situation to you, Will (nice name btw). I have a 2 level hierarchy in an ajax-y fashion.. It's easier to show than describe: http://beta.willboyce.com/blog (if it fails to load and you care enough, try again in a few mins - "beta" ;-)) In order to mark the current

Re: Tutorial, def __unicode__ not working

2008-06-03 Thread Sebastian Bauer
try: def __str__(self): return self.question [EMAIL PROTECTED] pisze: > http://www.djangoproject.com/documentation/tutorial01/ > > added these: > class Poll(models.Model): > # ... > def __unicode__(self): > return self.question > > class Choice(models.Model): > # ... >

Re: Tutorial, def __unicode__ not working

2008-06-03 Thread circularfunc
Adjango\utils Adjango\utils\termcolors.py Adjango\utils\_decimal.py Adjango\utils\__init__.py Adjango\utils\autoreload.py Adjango\utils\dates.py Adjango\utils\stopwords.py Adjango\utils\html.py Adjango\utils\safestring.py Adjango\utils\translation A

select only some feilds

2008-06-03 Thread Vance Dubberly
So I think I heard somewhere out there in django land that with the merge of QuerySet refactor we gained the ability specify the fields we want returned in a query. Unfortunately I can't find any info on this, am I being delusional or blind? Got any pointers? Vance -- To pretend, I actually do

Tutorial, def __unicode__ not working

2008-06-03 Thread circularfunc
http://www.djangoproject.com/documentation/tutorial01/ added these: class Poll(models.Model): # ... def __unicode__(self): return self.question class Choice(models.Model): # ... def __unicode__(self): return self.choice using the latest django-version fetched by

Re: Navigation components

2008-06-03 Thread Will
Thanks for your replies, chaps. I need to mull this over, but I think I see what you're getting at (using template inheritance). I've realised the breadcrumbs should be easy (use Super to add to the breadcrumb section I suppose). The bit I don't see is how you get the info about section

Re: why do i have to add this to Apache?

2008-06-03 Thread James Bennett
On Tue, Jun 3, 2008 at 2:17 PM, <[EMAIL PROTECTED]> wrote: > why is this necessary? do i have to do this for every project? > testproject.settings implies i do. You probably want to research how mod_python works in order to understand what the configuration directives are and which ones are

why do i have to add this to Apache?

2008-06-03 Thread circularfunc
why is this necessary? do i have to do this for every project? testproject.settings implies i do. http://thinkhole.org/wp/django-on-windows/ Step 6. Configure Apache for Django Now that everything is installed and we know that Django is working properly, it’s time to get it working with

Re: sorting inspectdb output

2008-06-03 Thread Vidja
Thanks Carole, Didn't know this option. Is there a way to tell inspectdb to do that? Would be a nice option. For now I will just change the file. VidJa On 3 jun, 05:54, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > If a class is defined after it is being referenced, you can just > modify

Apache monitor is not working

2008-06-03 Thread circularfunc
ive had the apache server up and running before but the apache srvice monitor isnt working like it should(i think). i am using windows vista and the 2.2server. it is the tollbar in the bottom right of thw window and i can bring it up. however pressing start deosnt do anything. i can start by

ful crack for Internet Download Manager v5.12 build 11

2008-06-03 Thread how ?,???
this is the link for this crack http://doiop.com/download-crack/crack-Internet-Download-Manager-v5.12-build-11 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

mod_python Python version and executable don't match

2008-06-03 Thread Alex Robbins
I am attempting to deploy django on a RHEL 5 server. My team decided they would really like Python 2.5, instead of the 2.4 that Red Hat supports and ships with. I installed python 2.5 to /usr/local so as not to interfere with the system's python living at /usr/lib. Then I downloaded the

fastcgi crashing

2008-06-03 Thread skunkwerk
django's been working great for me thusfar, but a few days ago i noticed the server started to go down intermittently - there was nothing in my django log file that indicated a fatal error, and my lighttpd log file only stated that the fastcgi process had died... here's how i'm starting fastcgi

Changing 'list_display' for User

2008-06-03 Thread Jay Parlar
Is there a programatic way to modify the 'list_display' value for the User model in django.contrib.auth? I really don't want to patch the Django sources, but I can't immediately see another way. Thanks, Jay P. --~--~-~--~~~---~--~~ You received this message

Re: How to a record to a ManyToMany Table?

2008-06-03 Thread Christian Joergensen
Greg wrote: > Hello, > I'm trying to add a record to a ManyToMany table in a script. Use obj.m2mfield.add(related_obj). /Christian -- Christian Joergensen http://www.technobabble.dk --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: Is there any Django module like ViewCV for svn repositories?

2008-06-03 Thread Tom Badran
Trac is built on python, but not django specifically. There is no reason you couldnt run it side by side with django. I have a setup with django running the main site, and a subdomain (but it could just as easily be a different url on the server) that runs a trac instance, all on the same server.

Re: Is there any Django module like ViewCV for svn repositories?

2008-06-03 Thread Ed McCaffrey
I don't know if Trac is Django powered, but you may be able to port parts of it for what you need. On Tue, Jun 3, 2008 at 11:52 AM, The Code Janitor <[EMAIL PROTECTED]> wrote: > > I want to have a source code repository view on my Django site. I can > not find any such module available. Mostly I

Re: auto admin for production

2008-06-03 Thread James Bennett
On Tue, Jun 3, 2008 at 11:54 AM, pihentagy <[EMAIL PROTECTED]> wrote: >> Currently the admin interface doesn't handle row-level permissions. A >> user can be granted to edit articles, but not restricted to only their >> own. I *believe* this is a feature that will be added in newforms-admin. > >

Re: auto admin for production

2008-06-03 Thread pihentagy
On May 10, 1:25 am, Jeff Anderson <[EMAIL PROTECTED]> wrote: > pihentagy wrote: > Currently the admin interface doesn't handle row-level permissions. A > user can be granted to edit articles, but not restricted to only their > own. I *believe* this is a feature that will be added in

Re: "Includes" directory?

2008-06-03 Thread James Matthews
and Welcome to Django! On Tue, Jun 3, 2008 at 9:05 AM, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > > > On 02-Jun-08, at 11:59 PM, Huuuze wrote: > > > I'm new to Django, so please be gentle. Basic question: when > > developing a web app, I've typically created an "includes" directory > >

How to a record to a ManyToMany Table?

2008-06-03 Thread Greg
Hello, I'm trying to add a record to a ManyToMany table in a script. / Below is my script: coll = Collection.objects.all() for a in coll: a.thematerials_set = [a.material] assert False, "End" Below is my model class Collection(models.Model): name =

BEST!

2008-06-03 Thread tobiktobiktobik
It for you!!! http://rozrywka.yeba.pl/show.php?id=2737 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this

Re: appengine and django default filters

2008-06-03 Thread [EMAIL PROTECTED]
> Hey guys... anybody had in luck getting the django default filters > working with appengine John, I posted an answer on your original posting in the AppEngine group. Scott --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Is there any Django module like ViewCV for svn repositories?

2008-06-03 Thread The Code Janitor
I want to have a source code repository view on my Django site. I can not find any such module available. Mostly I want something like ViewCV with a couple of twists (user authentication, group permissions to view sections, tagging, etc.) In poking around I couldn't find any example python-svn

Re: Lost stdout and stderr on fcgi with Django

2008-06-03 Thread The Code Janitor
I am going to submit this as a bug. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email

django mysqldb cursor

2008-06-03 Thread Eric Wertman
Does anyone know if the django cursor supports MySQLdb.paramstyle = "pyformat" for parameter passing? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

appengine and django default filters

2008-06-03 Thread John M.
Hey guys... anybody had in luck getting the django default filters working with appengine When I include this line in my templates {% load filters %} I get the following error... 'filters' is not a valid tag library: Could not load template library from django.templatetags.filters, No module

show reverse relationship on admin pages

2008-06-03 Thread lee
Guys, I have the following classes. class Team(models.Model): name = models.CharField(core=True, max_length=255,unique=True) class Traders(Client): teams = models.ManyToManyField(Team,blank=True, filter_interface=models.HORIZONTAL, verbose_name="Trader Teams") I have a filter

Re: error with custom sql

2008-06-03 Thread Karen Tracey
On Tue, Jun 3, 2008 at 10:32 AM, msoulier <[EMAIL PROTECTED]> wrote: > > On May 15, 2:23 pm, msoulier <[EMAIL PROTECTED]> wrote: > > So, custom SQL in Django can't include a LIKE statement with a % > > unless it's escaped? I'm > > looking in the docs and I can't seem to find anything that

Re: error with custom sql

2008-06-03 Thread msoulier
On May 15, 2:23 pm, msoulier <[EMAIL PROTECTED]> wrote: > So, custom SQL in Django can't include a LIKE statement with a % > unless it's escaped? I'm > looking in the docs and I can't seem to find anything that mentions > that. In fact, I've replaced my % with %% and it's not matching anything

Re: django-tagging installation problem

2008-06-03 Thread Myles Braithwaite
I have a patch for version 0.2.1 to get it working with django trunk. http://media.mylesbraithwaite.com/uploads/files/2008-05-29/django-tagging-0.2.1_fix_for_django_trunk.patch --- Myles Braithwaite [EMAIL PROTECTED] Please consider the trees before print this email. On 2-Jun-08, at 11:05 PM,

i18n ono Fedora 5

2008-06-03 Thread Flavio Curella
Hi, for some weird reason, I can't get my translations on Fedora 5. It works great on development sever (running on MacOs 10.5), but on the production machines, it's like I didn't compile the language files (which I did!). Any ideas? Thanks, Flavio Curella.

Re: Model inheritance and primary keys

2008-06-03 Thread ekellner
On Tue, Jun 3, 2008 at 2:49 PM, Etienne Robillard <[EMAIL PROTECTED]> wrote: > I agree with you, and think this should be better expressed. Perhaps without > words which refers to abstract C++ concepts like pointers, and using a > vocabulary > more adapted to Python. At least this would be more

Re: Template tag to split list evenly

2008-06-03 Thread mike171562
Thanks for your help tim, I had a look at your filter, but I ended up using the template tag here: http://www.djangosnippets.org/snippets/660/ The only problem is it requires you to know the length of your list, and the length of mine varies. {% load splitlist %} {% split_list tags as

Re: paginator LIMITing properly?

2008-06-03 Thread omat
I figured it out: I should you QuerySetPaginator instead of the Paginator and the LIMIT is set properly. Thanks. On Jun 3, 2:44 pm, omat <[EMAIL PROTECTED]> wrote: > Hi, > > I am using a recent svn checkout of django and: > > Paginator(User.objects.all(), 20) > > results in the following

Re: debug runserver

2008-06-03 Thread MiloZ
sorry, I just found the answer here; I just add the --norelod option after runserver, and it works ! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Use variables inside an 'include' tag (and/or: how to set a variable in a template)

2008-06-03 Thread Berco Beute
Passing a complete context to a simple_tag doesn't (yet?) work, as described here: http://groups.google.com/group/django-users/browse_thread/thread/ee830466be465704/a41d89fd476becb1#a41d89fd476becb1 I finally solved my problem by defining my own tag as follows: === from

Re: 6095-nfadmin.3.diff

2008-06-03 Thread Russell Keith-Magee
On Tue, Jun 3, 2008 at 6:58 PM, alessandro boschi <[EMAIL PROTECTED]> wrote: > > Thanks, but i have a problem. For exemple file: > /django/contrib/admin/options.py do not exist. > Can you send me a zip of patched file. > Thanks for your help It sounds like you're applying the patch to a checkout

"no relations found"?

2008-06-03 Thread circularfunc
"If you’re interested, run the command-line client for your database and type \dt (PostgreSQL), SHOW TABLES; (MySQL), or .schema (SQLite) to display the tables Django created." i write \dt and get "no relations found". what does this mean? i create a database(even three) before.

Re: Model inheritance and primary keys

2008-06-03 Thread Etienne Robillard
On Tue, 3 Jun 2008 12:33:25 +0200 ekellner <[EMAIL PROTECTED]> wrote: > > As I was looking at model inheritance with admin recently, I came > across this issue: > http://code.djangoproject.com/ticket/6755 > > I'm thinking now that the underlying issue that I'm seeing, and what > the patch in

debug runserver

2008-06-03 Thread MiloZ
Hi, I use to debug django scripts in the pydev/eclipse environment, it works very well; I try to launch "python manage.py runserver" in debug mode, but it doesn't work. Is there something I forgot ? Thanks. --~--~-~--~~~---~--~~ You received this message because

Re: pluralize : empty dict is plural

2008-06-03 Thread Eugene Van den Bulke
On Tue, Jun 3, 2008 at 12:39 PM, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > > I am not sure whether this is a bug or a feature, an empty dict is > > plural? > > Feature. > > If I'm counting bags, I have: > 0 Bags > 1 Bag > 2 Bags > 3 Bags argh ... I am sprung ... not a native English

Re: django-tagging installation problem

2008-06-03 Thread M.Ganesh
Matthias Kestenholz wrote: > On Tue, 2008-06-03 at 08:35 +0530, M.Ganesh wrote: > >> Hi, >> >> Running 'python manage.py syncdb' after including 'tagging' in the >> INSTALLED_APPS throws the following error. >> >> My django version : (0, 97, 'pre') r7543 (trunk) >> Python version : Python

paginator LIMITing properly?

2008-06-03 Thread omat
Hi, I am using a recent svn checkout of django and: Paginator(User.objects.all(), 20) results in the following SQL query: SELECT "auth_user"."id", "auth_user"."username", "auth_user"."first_name", "auth_user"."last_name", "auth_user"."email", "auth_user"."password", "auth_user"."is_staff",

Re: 6095-nfadmin.3.diff

2008-06-03 Thread alessandro boschi
Thanks, but i have a problem. For exemple file: /django/contrib/admin/options.py do not exist. Can you send me a zip of patched file. Thanks for your help 2008/5/31, Russell Keith-Magee <[EMAIL PROTECTED]>: > > On Fri, May 30, 2008 at 9:47 PM, alessandro boschi > <[EMAIL PROTECTED]> wrote: >> >>

Re: pluralize : empty dict is plural

2008-06-03 Thread Russell Keith-Magee
On Tue, Jun 3, 2008 at 6:21 PM, EuGeNe <[EMAIL PROTECTED]> wrote: > > I am not sure whether this is a bug or a feature, an empty dict is > plural? Feature. If I'm counting bags, I have: 0 Bags 1 Bag 2 Bags 3 Bags The 0-case is given the plural name; None/{} etc is a 0-case. Yours, Russ Magee

Model inheritance and primary keys

2008-06-03 Thread ekellner
As I was looking at model inheritance with admin recently, I came across this issue: http://code.djangoproject.com/ticket/6755 I'm thinking now that the underlying issue that I'm seeing, and what the patch in 6755 is fixing, doesn't actually have anything to do with newforms at all. I think it

pluralize : empty dict is plural

2008-06-03 Thread EuGeNe
I am not sure whether this is a bug or a feature, an empty dict is plural? >>> from django.template import Template, Context >>> t = Template("{{ d|pluralize }}") >>> empty = Context({"d" : dict()}) >>> t.render(empty) u's' >>> one = Context({"d" : dict(a=1)}) >>> t.render(one) u'' >>> two =

Re: Extending User

2008-06-03 Thread Alessandro Ronchi
Alessandro Ronchi ha scritto: > > > On 2 Giu, 00:33, puff <[EMAIL PROTECTED]> wrote: > >> I'm stumped. What am I missing? The edit_inline doesn't work. Anyone managed to make it? -- Alessandro Ronchi Skype: aronchi http://www.alessandroronchi.net - Il mio blog http://www.soasi.com -

Re: django-tagging installation problem

2008-06-03 Thread Matthias Kestenholz
On Tue, 2008-06-03 at 08:35 +0530, M.Ganesh wrote: > Hi, > > Running 'python manage.py syncdb' after including 'tagging' in the > INSTALLED_APPS throws the following error. > > My django version : (0, 97, 'pre') r7543 (trunk) > Python version : Python 2.5.1 (r251:54863, Mar 7 2008, 03:41:45)

Re: Navigation components

2008-06-03 Thread Matthias Kestenholz
Hi, On Mon, 2008-06-02 at 08:46 -0700, Will wrote: > Hi all > > I'd like to start a discussion about generating navigation components. > Despite their importance and their fairly generic nature, best > practice is not obvious to me after trawling through hundreds of > posts, blogs etc. > >

Re: Extending User

2008-06-03 Thread Alessandro Ronchi
On 2 Giu, 00:33, puff <[EMAIL PROTECTED]> wrote: > I'm stumped. What am I missing? > > Thanks for any help. I've the same problem. If I manage to have the profile saved and I then edit the User, it reset the profile one time every two. Please help us!

Re: Custom CSS for newforms using ModelForm

2008-06-03 Thread Eric Abrahamsen
Yes, that was it. ModelForms are nice because you don't have to specify the fields to put in the form, it does that automatically. However, as soon as you want to customize the widgets being used for the fields, you _do_ have to specify the fields in your ModelForm, and put the classes

Re: How nicely does django play in a distributed environment?

2008-06-03 Thread Phillip B Oldham
On Jun 2, 5:40 pm, "James Bennett" <[EMAIL PROTECTED]> wrote: > Django is the easy part. Replicating your DB is the hard part. This isn't too much of a concern for me. The db we're using currently will scale nicely, and we've already got replication happening for back-up and redundency purposes.

Re: How nicely does django play in a distributed environment?

2008-06-03 Thread Phillip B Oldham
On Jun 2, 5:10 pm, The Code Janitor <[EMAIL PROTECTED]> wrote: > solid enterprise grade examples are > seriously lacking. Do you mean high-traffic'd django sites? I've not really come across many myself. Examples of these would be good. --~--~-~--~~~---~--~~ You

Re: Custom CSS for newforms using ModelForm

2008-06-03 Thread Mayank Dhingra
Actually I wanted to know how to Say I have a model "Model_1" and I made a form from that model using ModelForm now how am I supposed to add custom CSS to the fields of this model? class Model_1Form(ModelForm): class Meta: model = Model_1 exclude = ('hash') def

Re: "Includes" directory?

2008-06-03 Thread Kenneth Gonsalves
On 02-Jun-08, at 11:59 PM, Huuuze wrote: > I'm new to Django, so please be gentle. Basic question: when > developing a web app, I've typically created an "includes" directory > which stores commonly used functions or methods. From a best practice > standpoint, is it recommended that I create

Re: How to change Apache port? do I need to?

2008-06-03 Thread Thierry Schork
The "it works" message is, I believe, the sandard default page. Did you stopped/restarted apache after each modifications ? Because of it's nature, I don't think you can send a reload signal to apache on windows, so you need to stop/restart it after each modifications in the config file. The