Re: Maximum ImageFIeld width

2008-01-08 Thread David Grant
I'm not an expert, actually I've just started looking into the django source recently. My first idea would be to inherit from the ImageField Field, call it MyImageField. In MyImageField override the validate method and if the width isn't what you want, raise a

Re: Many to Many

2008-01-08 Thread Darthmahon
Hi Alex, I am using 0.96 - __str__ did the trick :) Thanks so much for your help! On Jan 8, 11:01 pm, Alex Koshelev <[EMAIL PROTECTED]> wrote: > What version of django do you use? May be you need __str__ method for > models > > On 9 янв, 01:52, Darthmahon <[EMAIL PROTECTED]> wrote: > > > Hi

Re: Middleware for checking client info and many other queries

2008-01-08 Thread Ravi Kumar
Yes, I am using older self compiled version. Hmm, Well, lets look at what the new release has now. Are you people sure when I setup Django on mod_python+Apache+Linux, there won't be memory issues like what I read about the older mod_python. Any suggestions to take about during setup or such. >

Re: Forms and non-editable fields

2008-01-08 Thread Alexander Chemeris
Hi, Interestingly, I wanted to write very similar request, but you passed ahead of me. :) I'm writing form/questionnaire site for our summer school and I want to be able render filled forms as text, easy readable and easy printable. So, my needs are pretty close to yours. My thought was to

Re: How to exclude field from geneated ModelForm, but not from admin interface

2008-01-08 Thread Alexander Chemeris
On 1/6/08, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Sat, 2008-01-05 at 22:43 +0300, Alexander Chemeris wrote: > > Is there any way to exclude field from being generated by > > ModelForm, but still be present on admin interface? If I pass > > 'editable=False' to some element, it is not

Re: using re.sub with unicode string in response middleware

2008-01-08 Thread Malcolm Tredinnick
On Tue, 2008-01-08 at 22:45 -0600, Gary Wilson Jr. wrote: > Malcolm Tredinnick wrote: > > Hey Gary, > > > > On Tue, 2008-01-08 at 00:35 -0600, Gary Wilson Jr. wrote: > > [...] > >> So, looking at a couple places in Django trunk where response.content is > >> used, > >> these look like bugs: >

Re: gis: MySql Persistence Problem

2008-01-08 Thread Ben Walton
Thanks Justin, I seemed to have glanced over that section of the documentation, I'd realized that the query wasn't actually using the query from contrib/gis and that explains why! Thanks again! Ben On Jan 8, 2008 8:34 PM, Justin Bronn <[EMAIL PROTECTED]> wrote: > > Ben, > > > Can anyone help

Re: using re.sub with unicode string in response middleware

2008-01-08 Thread Gary Wilson Jr.
Malcolm Tredinnick wrote: > Hey Gary, > > On Tue, 2008-01-08 at 00:35 -0600, Gary Wilson Jr. wrote: > [...] >> So, looking at a couple places in Django trunk where response.content is >> used, >> these look like bugs: >> >> >> django.contrib.csrf.middleware.CsrfMiddleware.process_response: >>

Re: The timeuntil / timesince filter doesn't handle time objects -- was that a design decision, or was that something that got overlooked?

2008-01-08 Thread Malcolm Tredinnick
On Tue, 2008-01-08 at 22:41 -0500, Ned Batchelder wrote: > I would think we can make a reasonable semantic that using timesince > or timeuntil on a time object means that time, today. Joe, is that > what you expected it to mean? Making this change to the filter would > turn what is now an

Re: Print view

2008-01-08 Thread James Bennett
On Jan 8, 2008 6:27 PM, Jeff Anderson <[EMAIL PROTECTED]> wrote: > The only way I know to accomplish this is to modify the admin template, > and display a link based on the name of the model, as determined by the > template logic. > Is this the best way to do this? or is there a cleaner way?

Re: QuerySet in generic views is cached with others Managers

2008-01-08 Thread Guilherme M. Gondim (semente)
On Jan 8, 11:29 pm, "Guilherme M. Gondim (semente)" <[EMAIL PROTECTED]> wrote: > In generic views, my queryset is cached and I need restart my > application for get new itens. It is a bug? With default objects > manager, I don't have this problem. Hi, I found the problem. Is on my Manager

Re: The timeuntil / timesince filter doesn't handle time objects -- was that a design decision, or was that something that got overlooked?

2008-01-08 Thread Ned Batchelder
I would think we can make a reasonable semantic that using timesince or timeuntil on a time object means that time, today. Joe, is that what you expected it to mean? Making this change to the filter would turn what is now an error condition into something useful. --Ned.

Re: The timeuntil / timesince filter doesn't handle time objects -- was that a design decision, or was that something that got overlooked?

2008-01-08 Thread Malcolm Tredinnick
On Tue, 2008-01-08 at 11:39 -0800, Joe Murphy wrote: > I was trying to run some comparisons in a template on a time, took a > look at the utils/timesince.py code, ran some more tests, read the > doco again, saw that the doco didn't mention timesince / timeuntil > handling time objects, and

Re: using re.sub with unicode string in response middleware

2008-01-08 Thread Malcolm Tredinnick
Hey Gary, On Tue, 2008-01-08 at 00:35 -0600, Gary Wilson Jr. wrote: [...] > So, looking at a couple places in Django trunk where response.content is used, > these look like bugs: > > > django.contrib.csrf.middleware.CsrfMiddleware.process_response: > > def process_response(self, request,

Re: SplitDateTimeField: time validation & format

2008-01-08 Thread Karen Tracey
On Jan 8, 2008 9:21 PM, Lucas Di Pentima <[EMAIL PROTECTED]> wrote: > > 2008/1/9, Karen Tracey <[EMAIL PROTECTED]>: > > > Looks like it was a bug, fixed in October: > > > > http://code.djangoproject.com/changeset/6578 > > > > So, you shouldn't see the problem if you switch to using an SVN

Re: SplitDateTimeField: time validation & format

2008-01-08 Thread Lucas Di Pentima
2008/1/9, Karen Tracey <[EMAIL PROTECTED]>: > Looks like it was a bug, fixed in October: > > http://code.djangoproject.com/changeset/6578 > > So, you shouldn't see the problem if you switch to using an SVN checkout > instead of 0.96. Thanks Karen! I'm trying to use the most stable version,

Re: Print view

2008-01-08 Thread Tim Chase
> I have a view that will generate a pdf based on one of my objects. > I'd like to have a link to this view from the admin interface. > The only way I know to accomplish this is to modify the admin template, > and display a link based on the name of the model, as determined by the > template

Re: SplitDateTimeField: time validation & format

2008-01-08 Thread Karen Tracey
On Jan 8, 2008 6:33 PM, Lucas Di Pentima <[EMAIL PROTECTED]> wrote: > > Hi all, > > I'm a Django newbie trying to learn this wonderful framework, so if > my question is too obvious, please bear with me :-) > > I'm learning how to use the newforms from Django 0.96, as it comes > installed on a

QuerySet in generic views is cached with others Managers

2008-01-08 Thread Guilherme M. Gondim (semente)
If I have a Manager like below: class CurrentSitePublishedManager(CurrentSiteManager): def get_query_set(self): return super(CurrentSitePublishedManager, self).get_query_set().filter(is_draft=False, pub_date__lte=datetime.now()) And this "info" dictionary: info_dict = {

Maximum ImageFIeld width

2008-01-08 Thread Rodrigo Culagovski
How can you validate that an ImageField's width is <= a maximum in pixels? --~--~-~--~~~---~--~~ 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

Print view

2008-01-08 Thread Jeff Anderson
I have a view that will generate a pdf based on one of my objects. I'd like to have a link to this view from the admin interface. The only way I know to accomplish this is to modify the admin template, and display a link based on the name of the model, as determined by the template logic. Is

Re: anyone have luck with http://code.google.com/p/django-pyodbc/

2008-01-08 Thread rick
oh man I didn't even consider that, kinda makes me wonder if anyone has ever run the code ! thanks, I'll rename and try again. On Jan 8, 3:24 pm, "James Bennett" <[EMAIL PROTECTED]> wrote: > Python module names cannot include hyphens, so > 'django-pyodbc.db.mssql' is not a valid Python module

Re: Middleware for checking client info and many other queries

2008-01-08 Thread Graham Dumpleton
On Jan 8, 11:36 pm, "Ravi Kumar" <[EMAIL PROTECTED]> wrote: > I am sorry. I mean to say "Django on Apache" has some memory overusage and > leak problem due to mod_python or whatever :) To repeat was Kenneth said but in respect of your clarification, 'where did you hear this? It is not true. '.

Re: Many to Many

2008-01-08 Thread Alex Koshelev
What version of django do you use? May be you need __str__ method for models On 9 янв, 01:52, Darthmahon <[EMAIL PROTECTED]> wrote: > Hi Alex, > > Thanks - no error now, but it prints this: > > Platform object > > How can I get it to print the title for this platform? > > On Jan 8, 10:01 pm,

Re: Many to Many

2008-01-08 Thread Darthmahon
Hi Alex, Thanks - no error now, but it prints this: Platform object How can I get it to print the title for this platform? On Jan 8, 10:01 pm, Alex Koshelev <[EMAIL PROTECTED]> wrote: > My mistake, colon needed after "join" > > {{game.platforms.all|join:", "}} > > On 9 янв, 00:49, Darthmahon

Re: using filter on the queryset of generic views.

2008-01-08 Thread Alex Koshelev
There is no way to do it in urls.py. But you may write wrapper view that will filter queryset and then pass it to generic view. On 9 янв, 01:19, "Shishir Ramam" <[EMAIL PROTECTED]> wrote: > I'd like to pass a parameter from a url to a query set of a generic view. > > Something like the

using filter on the queryset of generic views.

2008-01-08 Thread Shishir Ramam
I'd like to pass a parameter from a url to a query set of a generic view. Something like the following. I'm not sure if this is possible, but would appreciate any tips on how this can be accomplished. thanks, -shishir my_info_dict = { 'queryset':

Re: Many to Many

2008-01-08 Thread Alex Koshelev
My mistake, colon needed after "join" {{game.platforms.all|join:", "}} On 9 янв, 00:49, Darthmahon <[EMAIL PROTECTED]> wrote: > Hi Alex, > > I want to do what you've shown me; print a list of games with the name > of the platform(s). I've been trying to find an answer to this in all > of the

Re: Many to Many

2008-01-08 Thread Darthmahon
Hi Alex, I want to do what you've shown me; print a list of games with the name of the platform(s). I've been trying to find an answer to this in all of the docs but the examples given never use real-world examples and everything seems to be done on the Python shell, which is now how I am using

Re: Many to Many

2008-01-08 Thread Alex Koshelev
What are you want to do? Do you read docs? The view's code is very strange. So many times appears word "list". May be you what get all games with platforms, so def games(request): games = Game.objects.all() return render_to_response('games/games.html', { 'games':games },

Many to Many

2008-01-08 Thread Darthmahon
Hey, Can't get my head around this. Basically I have a model that includes a manytomany field like this: ## File: /games/models.py ## class Platform(models.Model): title = models.CharField(maxlength=30) def __unicode__(self):

Re: Trying to limit choices in my admin view

2008-01-08 Thread David Grant
So you get are getting 1000 records back in javascript, then doing the filtering in Javascript down to 100? But instead you want to have your ajax code talk to a view that will return you just the 100 records that you want? Makes sense to me. Would you mind sharing your javascript code with me?

Re: Django Quizzes or Questionnaires App

2008-01-08 Thread Rajesh Dhawan
On Jan 8, 3:27 pm, Sebastian Macias <[EMAIL PROTECTED]> wrote: > Basically what I'm looking forward is be able to have a schema-less > model. Perhaps this write up will help: http://code.djangoproject.com/wiki/DynamicModels -Rajesh D --~--~-~--~~~---~--~~ You

Re: Django Quizzes or Questionnaires App

2008-01-08 Thread Sebastian Macias
Basically what I'm looking forward is be able to have a schema-less model. Sebastian Macias wrote: > Hello, > > I need to be able to build custom questionnaires with yes/not options, > multiple options and free text options. The answers must be > searchable: > > I need to query users that took

Re: anyone have luck with http://code.google.com/p/django-pyodbc/

2008-01-08 Thread James Bennett
Python module names cannot include hyphens, so 'django-pyodbc.db.mssql' is not a valid Python module name regardless of whether you have the code on your system. Try renaming the module to not include a hyphen. Also, make sure you're using a recent SVN checkout of Django; the ability to use

HowTo: Django + SliceHost + lighttpd + fcgi + flup + MySQL + MySQLdb

2008-01-08 Thread [EMAIL PROTECTED]
Hi! I just setup a new Slicehost slice, built with Ubuntu 7.10 Server edition. I'm using Django with Lighttpd, flup for fastcgi, mysql with python- mysqldb Here is the software I needed. I left off a few bits, but hopefully you'll find this useful. Feel free to post this on your site. Some of

Re: syncdb fail. mysql.base?

2008-01-08 Thread [EMAIL PROTECTED]
Thanks for all the info! I changed to a Ubuntu setup 7.10, got the right headers, and everything is working great. I'll post a howto shortly. Ivan On Jan 7, 4:45 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Mon, 2008-01-07 at 15:03 -0800, [EMAIL PROTECTED] wrote: > > Grabbing the

anyone have luck with http://code.google.com/p/django-pyodbc/

2008-01-08 Thread rick
Help, I followed the install instructions but still get the following error: django.core.exceptions.ImproperlyConfigured: 'django-pyodbc.db.mssql' isn't an a vailable database backend. Available options are: 'ado_mssql', 'dummy', 'mysql', 'mysql_old', 'oracle', 'postgresql',

Django Quizzes or Questionnaires App

2008-01-08 Thread Sebastian Macias
Hello, I need to be able to build custom questionnaires with yes/not options, multiple options and free text options. The answers must be searchable: I need to query users that took quiz 1 and selected option a and b in question x, took quiz 2 and selected option c or d for in question y.

The timeuntil / timesince filter doesn't handle time objects -- was that a design decision, or was that something that got overlooked?

2008-01-08 Thread Joe Murphy
I was trying to run some comparisons in a template on a time, took a look at the utils/timesince.py code, ran some more tests, read the doco again, saw that the doco didn't mention timesince / timeuntil handling time objects, and thought: Hey, I bet that was on purpose, but maybe this was

Just curious....How many members would visit this site? Check it out and leave a comment. Thanks. :-)

2008-01-08 Thread tazz8u
Global Property Mortgage Global Property are bond brokers, they specialize in obtaining financing on behalf of their clients from different banks in the form of a bond (mortgage) over their property. They also specialise in getting non-banking business finance for start up and current

Re: Many Django checkouts, setting which one to use (PYTHONPATH perference)

2008-01-08 Thread Ryan Kaskel
Graham Dumpleton wrote: > On Jan 8, 8:50 am, ryan k <[EMAIL PROTECTED]> wrote: >> I used svn propset svn:external so my project (in transition to >> another developer when I return to college) can easily use the most >> recent version fo Django (and comment_utils, etc). How can I ensure >> that

Re: read only in Admin interface

2008-01-08 Thread James Bennett
On Jan 8, 2008 12:14 PM, Jeff Anderson <[EMAIL PROTECTED]> wrote: > Another dirty solution would be to simply create a user account, and > give it permissions to only view things. I haven't played with > permissions at all, but I imagine it would be possible. > The correct way is still to write

Trying to limit choices in my admin view

2008-01-08 Thread Greg
Hello, I developed an AWESOME django website and everything works great except for one MAJOR problem!! I have the following models: class Collection(models.Model): name = models.CharField("Name", maxlength=200) description = models.TextField(maxlength=1000, blank=True) class

Re: read only in Admin interface

2008-01-08 Thread Jeff Anderson
James Bennett wrote: On Jan 8, 2008 10:17 AM, Nader <[EMAIL PROTECTED]> wrote: I have looked while for a answer to my problem but unfortunately I haven't found a one, maybe I had to spend more time. However I have a project with some applications. By using of Admin we can Create, Read,

Re: read only in Admin interface

2008-01-08 Thread Tim Chase
>> one application I would like only to read the model and could not >> use Create, Update and Delete capabilities. Would somebody tell me >> how I can solve this problem by using of Admin interface? > > As you'll find by searching the archives of this list, this is not > something the Django

Re: read only in Admin interface

2008-01-08 Thread Alex Koshelev
Look at the databrowse application http://www.djangoproject.com/documentation/databrowse/ On 8 янв, 19:17, Nader <[EMAIL PROTECTED]> wrote: > Hello, > > I have looked while for a answer to my problem but unfortunately I > haven't found a one, maybe I had to spend more time. However I have a >

Re: Adding a request.user to a ModelForm instance

2008-01-08 Thread James Bennett
On Jan 8, 2008 11:16 AM, l5x <[EMAIL PROTECTED]> wrote: > This should help you: > http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser No. That's a nasty, ugly, horrible hack that's about fifty times more complicated than what's actually needed to do this. He got it right the first

Re: Adding a request.user to a ModelForm instance

2008-01-08 Thread l5x
On Jan 8, 3:03 am, Car <[EMAIL PROTECTED]> wrote: > Hello > > I have following code; > > class PlaceForm(ModelForm): > class Meta: > model = Place > exclude = ('useradd',) #excluded, because form shouldn't give > a way to set user manually > > Model Place has one foreign key

Re: read only in Admin interface

2008-01-08 Thread James Bennett
On Jan 8, 2008 10:17 AM, Nader <[EMAIL PROTECTED]> wrote: > I have looked while for a answer to my problem but unfortunately I > haven't found a one, maybe I had to spend more time. However I have a > project with some applications. By using of Admin we can Create, Read, > Update and Delete

Re: gis: MySql Persistence Problem

2008-01-08 Thread Justin Bronn
Ben, > Can anyone help as to why I can't load my points? Is it a MySql problem? > No, it is not a MySQL problem. This didn't work because you forgot to set the model manager to use the `GeoManager`, i.e., you didn't add `objects = models.GeoManager()` to both your UserProfile and Lcoation

Re: Adding a request.user to a ModelForm instance

2008-01-08 Thread James Bennett
On Jan 7, 2008 8:03 PM, Car <[EMAIL PROTECTED]> wrote: > Is it possible to add field formerly excluded in ModelForm in view > like in this example below: Yes, but you're not "adding a field". You're simply getting back a model object and then you're 100% done with the ModelForm. What you do with

read only in Admin interface

2008-01-08 Thread Nader
Hello, I have looked while for a answer to my problem but unfortunately I haven't found a one, maybe I had to spend more time. However I have a project with some applications. By using of Admin we can Create, Read, Update and Delete (CRUD) models information in the project. But in one

Re: Context processor a bit too helpful

2008-01-08 Thread James Bennett
On Jan 8, 2008 12:47 AM, Michael Hipp <[EMAIL PROTECTED]> wrote: > How do I say "no thanks" to this helpfulness so my html can to thru? By reading the Django template documentation, which covers this in some detail. -- "Bureaucrat Conrad, you are technically correct -- the best kind of

Re: Modifing User.__unicode__

2008-01-08 Thread Thomas Guettler
Am Dienstag, 8. Januar 2008 14:10 schrieb Alex Koshelev: > Simpliest way is to patch model class at applications loading time: > > #somewhere in your own models.py file of some app > from django.contrib.auth.models import User > > def user_unicode(self): > return '%s: %s %s' % (self.username,

Re: models and python circular import

2008-01-08 Thread Medardo Rodriguez
On Jan 8, 2008 8:24 AM, Grindizer <[EMAIL PROTECTED]> wrote: > Hello. > I have a project with at least 2 applications > A, which define ModelA1, ModelA2, ModelA3 (and other). > B, which define ModelB1, ModelB2. > > And I have these dependencies: > In A: > - ModelsA1 need as a foreign key ModelB1

Re: Basic Form Design Question: Pulling as much as possible from models

2008-01-08 Thread Wes Winham
Oops. So it is. Thanks for the clarification. On Jan 7, 1:10 pm, Simon Willison <[EMAIL PROTECTED]> wrote: > On Jan 7, 5:07 pm, Wes Winham <[EMAIL PROTECTED]> wrote: > > >http://www.pointy-stick.com/blog/2008/01/06/django-tip-complex-forms/ > > > A shiny solution to the problem with code and

Re: how strange this register module

2008-01-08 Thread [EMAIL PROTECTED]
hehe, thanks! you know i did not have 'password_change' view, this is import from standard model of django_registeration. i found how resolved it now, just change the template name to pw_change_form.html, maybe password_change_form.html is the same as admin site. though my problem is ok now, i

Re: models and python circular import

2008-01-08 Thread Alex Koshelev
Its very strange that so "hard linked" applications can produce clean and logic architecture:) 1. Try to split your A's models.py into 2 files. A1, A2 in first file. A3 in second file. In first models file import second with wildcard(*). In B models.py import only second A file. It's only

Re: how strange this register module

2008-01-08 Thread Alex Koshelev
Standard django.contrib.admin.views.auth.user_change_password cannot be customized with user defined template. What is inside *your* 'password_change' view? On 8 янв, 16:31, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > i found the view is the same as we click Change password in the admin >

Re: Middleware for checking client info and many other queries

2008-01-08 Thread Ravi Kumar
I did that. --~--~-~--~~~---~--~~ 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 to [EMAIL PROTECTED] For

Re: how strange this register module

2008-01-08 Thread [EMAIL PROTECTED]
i found the view is the same as we click Change password in the admin site, so maybe auth_password_change links to the default template file, but why login.htm can be customered with the same url stucture. On 1月8日, 下午9时22分, Alex Koshelev <[EMAIL PROTECTED]> wrote: > Show code of

models and python circular import

2008-01-08 Thread Grindizer
Hello. I have a project with at least 2 applications A, which define ModelA1, ModelA2, ModelA3 (and other). B, which define ModelB1, ModelB2. And I have these dependencies: In A: - ModelsA1 need as a foreign key ModelB1 - ModelsA2 need ModelB2 (ManyToManyField) In B: - ModelB2 need ModelA3

Re: how strange this register module

2008-01-08 Thread Alex Koshelev
Show code of 'password_change' view On 8 янв, 16:18, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > sorry, this is just the type error. > > it is still in strange after i changed to the correct url. > > On 1月8日, 下午9时13分, Alex Koshelev <[EMAIL PROTECTED]> wrote: > > > Your url conf says: > >

Re: how strange this register module

2008-01-08 Thread [EMAIL PROTECTED]
sorry, this is just the type error. it is still in strange after i changed to the correct url. On 1月8日, 下午9时13分, Alex Koshelev <[EMAIL PROTECTED]> wrote: > Your url conf says: > r'^password_change/$', > > but you tries to check: > /password/change/ > > Very strange, really? > > On 8 янв, 15:53,

Re: how strange this register module

2008-01-08 Thread Alex Koshelev
Your url conf says: r'^password_change/$', but you tries to check: /password/change/ Very strange, really? On 8 янв, 15:53, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > i have this in one urls.py: > url(r'^login/$', auth_views.login,{'template_name': 'registration/ >

Re: Modifing User.__unicode__

2008-01-08 Thread Alex Koshelev
Simpliest way is to patch model class at applications loading time: #somewhere in your own models.py file of some app from django.contrib.auth.models import User def user_unicode(self): return '%s: %s %s' % (self.username, self.first_name, self.last_name) User.__unicode__ = user_unicode

how strange this register module

2008-01-08 Thread [EMAIL PROTECTED]
i have this in one urls.py: url(r'^login/$', auth_views.login,{'template_name': 'registration/ login.html'},name='auth_login'), (r'^password_change/$', 'password_change', {'template_name':'registration/password_change_form.html'}, 'auth_password_change'), this 2 url is the same structure. when

Re: Modifing User.__unicode__

2008-01-08 Thread Michael Elsdörfer
I'd probably put it in my models file. Michael Thomas Guettler schrieb: > Hi, > > our customer wants to display the username as 'username: firstname > lastname' > > The easiest way would be to overwrite User.__unicode__. But where > should you put code like this? Up to now I put it in our

Re: Middleware for checking client info and many other queries

2008-01-08 Thread Ravi Kumar
I am sorry. I mean to say "Django on Apache" has some memory overusage and leak problem due to mod_python or whatever :) But i did read those docs. Suggestion were to restart (using cron, stop then start rather than restart) to release those. So if this is true, is there any way to command it. Any

Modifing User.__unicode__

2008-01-08 Thread Thomas Guettler
Hi, our customer wants to display the username as 'username: firstname lastname' The easiest way would be to overwrite User.__unicode__. But where should you put code like this? Up to now I put it in our middleware. Any comments, or better solutions? # middleware.py import new from

New PC Softwares for Free

2008-01-08 Thread [EMAIL PROTECTED]
here r the new & latest pc softwares for u hurry up log on to http://wincommunications.blogspot.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: how to restrict username length must more than 5 words

2008-01-08 Thread Steingrim Dovland
On 1/7/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > i user django-register in my project,it is fatastic, but how to:' > 1. restrict username length must more than 5 words > 2. make sure email is unique. I haven't heard of django-register, but maybe you mean django-registration? If so,

Re: how to restrict username length must more than 5 words

2008-01-08 Thread [EMAIL PROTECTED]
yes, thanks Peter. i maybe need to read the user module's code, change the code and keep updating it when django updated. or i can write a ajax code to check user data. On 1月8日, 上午12时33分, Peter Rowell <[EMAIL PROTECTED]> wrote: > > i user django-register in my project,it is fatastic, but how

Re: dynamically assigning a field value

2008-01-08 Thread andy baxter
pinco wrote: > Hi, > > I'm trying to figure out how to solve the following issue without > succeed. > > I have a model like this: > > class Product(models.Model): >... >measure_cm = models.FloatField(...) >measure_in = models.FloatField(...) > ... > > The fields contain the same

Re: Passing data when using render_to_response

2008-01-08 Thread Darthmahon
Thanks Maarten, so can I still then iterate through the songs in my template file? On Jan 8, 10:00 am, Maarten <[EMAIL PROTECTED]> wrote: > Hello > > """ > def songs(request): > songs_listing = [] > for songs_list in Song.objects.all(): > songs_dict = {} >

Re: Passing data when using render_to_response

2008-01-08 Thread Maarten
Hello """ def songs(request): songs_listing = [] for songs_list in Song.objects.all(): songs_dict = {} songs_dict['list_object'] = songs_list songs_listing.append(songs_dict) return render_to_response('songs/songs.html', {

Re: Query How To

2008-01-08 Thread Darthmahon
Ahh ok I saw that and thought it might be useful. Can I have more than one ManyToMany field in my custom user profile model? I.E. if a user has a list of songs and groups, for example? Just reading about ManyToMany - it seems to create an intermediary join table - is this exactly what I am

Re: Query How To

2008-01-08 Thread [EMAIL PROTECTED]
Another option is to create a user profile class (http:// www.djangoproject.com/documentation/authentication/#storing-additional-information-about-users), and have that user profile class have a ManytoManyField(http:// www.djangoproject.com/documentation/model-api/#many-to-many-relationships)

Re: problem with the auth_message table

2008-01-08 Thread Alexander Clausen
Hi, zodman wrote: > when a sumbit something on the admin interface of django haves this warning: > > http://dpaste.com/30234/ > > http://dpaste.com/30235/ > > ever as the same a column 'message' on auth_message table. > > im drop the database an gen again with syncdb try to recreate your

Advice needed for moving a VB program online.

2008-01-08 Thread [EMAIL PROTECTED]
I'm converting a Visual Basic program to run as a Django app, and I need some advice on how to go about doing it, whether or not it's possible of feasible, etc. Basically, I need to turn the VB form linked below into a web form. I've got several reasons for this including improved version

problem with the auth_message table

2008-01-08 Thread zodman
when a sumbit something on the admin interface of django haves this warning: http://dpaste.com/30234/ http://dpaste.com/30235/ ever as the same a column 'message' on auth_message table. im drop the database an gen again with syncdb ii python-mysqldb 1.2.1-p2-4 A Python

Re: Query How To

2008-01-08 Thread Darthmahon
Hi Ivan, Thanks for the reply. Ok that makes sense, but I'm assuming I would then have to query the database again to get the name of that game for each result that is returned? This sounds like a lot of queries just to get a list - this is something I would usually handle by doing a JOIN query,