Presence of ForeignKey in list_display kills admin list view

2008-01-03 Thread Lee Hinde
I have two models, presented below: class Winery(models.Model): """(Winery description)""" name = models.CharField(blank=False, maxlength=100, db_index=True) winery_id = models.CharField(blank=True, maxlength=100) corporate_name = models.CharField(blank=True, maxlength=100) ad

Re: Django... False promises?

2008-01-03 Thread Kenneth Gonsalves
On 04-Jan-08, at 12:41 PM, LRP wrote: > So, it appears that my major problem is version. As several of you > point out, I'm running version 0.95.1-1, which I downloaded from the > current stable Debian repository, etch. I see that the Debian testing > repository, lenny, contains 0.96.1-1. > > No

Re: Django... False promises?

2008-01-03 Thread LRP
First, many thanks to all the kind salts who've responded to my SOS. And particular thanks to Karen Tracey who replied to my first plea for help. Your reply did slip by me. And it was a most helpful one. So, it appears that my major problem is version. As several of you point out, I'm running ve

Re: Flatpages and APPEND_SLASH=True

2008-01-03 Thread Ville Säävuori
This broke my site so I had to fix it. I ended up fixing the Flatpages app to behave with APPEND_SLASH=True. I added a ticket with a patch (also to docs): http://code.djangoproject.com/ticket/6309 - VS --~--~-~--~~~---~--~~ You received this message because you are

Re: Automatically hashed passwords

2008-01-03 Thread mickey ristroph
I am using 0.96, but switching to svn now. Thanks for the pointer! I'll look for it when I am done switching over. On Dec 28 2007, 5:11 pm, Alex Koshelev <[EMAIL PROTECTED]> wrote: > What version of django do you use? In trunk there is classic password/ > confirm schema. > > On 29 дек, 01:39, mic

Flatpages and APPEND_SLASH=True

2008-01-03 Thread Ville Säävuori
I'm not sure if this is a bug in my setup, a bug in Django or not a bug at all. I have the great APPEND_SLASH=True in my settings for canonical urls, and I'm using contrib.flatpages. Problem is, after the changes in r6582, all flatpages with url ending slash (ie, all of my flatpages) do not redire

Will Django ever get good support for Art and Comedy???

2008-01-03 Thread SamFeltus
Django rocks, but it needs better support for comedy and artsy shiny frilly stuff... 2008 Django generated Mardi Gras pages OTW... :) http://samfeltus.com/pythonista/MardiGrasPreview.html --~--~-~--~~~---~--~~ You received this message because you are subscribe

Session problem

2008-01-03 Thread Dani
Hi, I think I have a problem with session in django, maybe it will sound to any of you like a known issue. In general, the problem is that sometimes sessions are not saved. It usually happens if the server was up for more than 24 hours. If I restart the server the problem resolves. Code example

Re: Counting and indexing objects

2008-01-03 Thread Malcolm Tredinnick
On Fri, 2008-01-04 at 03:26 +, Tom Badran wrote: > Sure malcolm. Essentially what i have is table of pictures defined by > the following model (forgive typos, this is just extracted minus extra > junk. Album class is a model with title fields etc.): > > class Picture(models.Model ): > al

Re: Counting and indexing objects

2008-01-03 Thread Tom Badran
Sure malcolm. Essentially what i have is table of pictures defined by the following model (forgive typos, this is just extracted minus extra junk. Album class is a model with title fields etc.): class Picture(models.Model): album = models.ForeignKey(Album) image = models.ImageField(upload_

Re: Foreignkey relationship trouble

2008-01-03 Thread hern42
Thank you for your help... I am working on it in these lines. Best. Hrn --~--~-~--~~~---~--~~ 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 unsub

Re: how to use random of Built-in filter reference in templates?

2008-01-03 Thread jt.wang
Alex Koshelev 写道: >> ./manage.py shell >> from django.template.defaultfilters import random l = [ 1, 2, 3, 4 ] random( l ) > 2 > random( l ) > 1 > random( l ) > 4 > random( l ) > 2 > random(

Re: Ajax widget

2008-01-03 Thread Malcolm Tredinnick
On Thu, 2008-01-03 at 15:25 -0800, mike wrote: > I am trying to implement the Dojo Select box into a template I am > creating. > I have used the formtags that is inluded in the nongselect tar > package. but It seems with the development version of django the > import > statements {% load formta

Re: Accessing request object in templates

2008-01-03 Thread Malcolm Tredinnick
On Thu, 2008-01-03 at 23:10 +0530, venkata subramanian wrote: > Hi, > I had a problem recently. > To access the request object in all of my templates. > The solution I got surprised me. It involved explicitly passing on > the request object from the views. > (Example, to pass a RequestContext

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

2008-01-03 Thread Malcolm Tredinnick
On Thu, 2008-01-03 at 09:51 -0800, Wes Winham wrote: > Hello, > > I've got a bit of a design issue I'm trying to wrap my head around in > order to do things the Django Way. > > I'm attempting to creating a simple form that allows a user to take a > multiple choice "quiz." Quiz is a model and it

Replicating admin behavior in front end

2008-01-03 Thread Rodrigo Culagovski
I am making a site that will handle and display a magazine article database. I would like for front end (anonymous, not logged in) users to be able to use some of the same functionality the admin interface offers, namely the ability to sort by column (and reverse the order), and filter by year, pu

Re: Counting and indexing objects

2008-01-03 Thread Malcolm Tredinnick
On Thu, 2008-01-03 at 15:20 +, Tom Badran wrote: > Thanks for the hints Tim. The problem is that i'm not using the whole > sequence, im just pulling one item out of the query set and was hoping > for a way to get the position without having to use the whole set, in > the same vain that count(

Re: render xml component in container

2008-01-03 Thread Malcolm Tredinnick
On Wed, 2008-01-02 at 22:44 -0800, Tiger Uppercut wrote: > Hi, > > I'm looking for the most pythonic [or djangonautic] way to render a > FusionChart [http://www.fusioncharts.com/gadgets/docs/] in Django. I > searched through the forums and didn't see this addressed directly -- > my apologies if

Re: Django... False promises?

2008-01-03 Thread Marty Alchin
On 1/3/08, LRP <[EMAIL PROTECTED]> wrote: > Ah, Django promises much, but so far has delivered nothing but Mal de > Mar. Please tell me that there is smoother sailing beyond this patch > of troubled waters. First off, let me say that I absolutely love your nautical theme! I do tend to call Django

Re: Django... False promises?

2008-01-03 Thread Jeff Anderson
Hello! I am amused by your extensive use of the nautical analogy. 1) nautical charts I haven't used the django book myself, I prefer to use www.djangoproject.org/documentation I also use the svn version, which has many more features than 0.96. 2) If you are interested in just playing with the dj

Re: Django... False promises?

2008-01-03 Thread Malcolm Tredinnick
On Thu, 2008-01-03 at 16:51 -0800, LorenDavie wrote: > Hi Lloyd, > > In your urls.py file, you want to specify the view as a string - > you're currently missing the quotes around it. It should look like > this: > > urlpatterns = patterns(", > (r'^time/$' , 'current_datetime'), # <-- quot

Re: Django... False promises?

2008-01-03 Thread LorenDavie
Hi Lloyd, In your urls.py file, you want to specify the view as a string - you're currently missing the quotes around it. It should look like this: urlpatterns = patterns(", (r'^time/$' , 'current_datetime'), # <-- quotes added! ) The (not particularly helpful) message you're getting is

Re: Django... False promises?

2008-01-03 Thread J. Clifford Dyer
On Thu, 2008-01-03 at 16:07 -0800, LRP wrote: > Ah, Django promises much, but so far has delivered nothing but Mal de > Mar. Please tell me that there is smoother sailing beyond this patch > of troubled waters. > > 1) Picked as my nautical chart The Django Book... Must be > authoritative, right?

Re: Django... False promises?

2008-01-03 Thread Fredrik Lundh
LRP wrote: > Why didn't The Book steer me right to begin with? possibly because Django runs on tons of platforms, and those platforms tend to change even faster than Django itself. any attempt to provide complete installation details for all possible configuration variants on all supported

Django... False promises?

2008-01-03 Thread LRP
Ah, Django promises much, but so far has delivered nothing but Mal de Mar. Please tell me that there is smoother sailing beyond this patch of troubled waters. 1) Picked as my nautical chart The Django Book... Must be authoritative, right? 2) We've barely cast moorings and into Chapter 2 when The

Re: Django on MediaTemple (dv) howto?

2008-01-03 Thread Katie Lohrenz
To clarify, that entry is specific to their (gs) accounts with the new Django containers. The (dv) accounts don't use containers so things are completely different. And that's been a big pain when trying to google for (mt)-specific instructions. :( Googling for Plesk-specific instructions has yiel

Re: Rendering ManyToManyField in template

2008-01-03 Thread Rodrigo Culagovski
Rajesh, I was missing the ".all" attribute in my previous attempts. Thanks, Rodrigo On Jan 3, 7:17 pm, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > Hi, > > > > > {% block content %} > > {{articulo}} > > > > identificadores:{{articulo.identificadores}} > > > > {% endblock %} >

Re: Django on MediaTemple (dv) howto?

2008-01-03 Thread Katie Lohrenz
myproject.settings is relative to your python path. Look at this line: PythonPath "['/path/to/django'] + sys.path" /path/to/django is the (hypothetical) folder where all my django projects live. So inside it is a folder called myproject which has settings.py in it. (And if you have more questi

Re: How especify the default form (html)

2008-01-03 Thread Jeff Anderson
mamcxyz wrote: > I have 3 forms in the same html. One is for search, another for singup > y anoter for login. I'm in singup, enter the values and hit enter. But > search is executed (so, I get a nasty: Invalid login) > In your html, are you using separate form tags? eg: ... ... ... ...

Ajax widget

2008-01-03 Thread mike
I am trying to implement the Dojo Select box into a template I am creating. I have used the formtags that is inluded in the nongselect tar package. but It seems with the development version of django the import statements {% load formtags %} no longer work, I need a way to replace the {% sel

Re: Django on MediaTemple (dv) howto?

2008-01-03 Thread Josh Ourisman
Perfect, exactly what I've been looking for. Thanks! One other question that I haven't really been able to find a straight answer on: what am I actually supposed to replace myproject.settings with? Some people seem to be saying that it needs to be the path to the settings.py file for my project,

Re: Rendering ManyToManyField in template

2008-01-03 Thread Rajesh Dhawan
Hi, > > {% block content %} > {{articulo}} > > identificadores:{{articulo.identificadores}} > > {% endblock %} Since you can have many identificadores, you need to do something like this in your template: {% for ix in articulo.identificadores.all %} {{ ix.identificador }}

Re: Rendering ManyToManyField in template

2008-01-03 Thread Rodrigo Culagovski
Fixed it, in the class definition: @property def ids(self): return ' - '.join([a['identificador'] for a in self.identificadores.values()]) On Jan 3, 6:36 pm, Rodrigo Culagovski <[EMAIL PROTECTED]> wrote: > I forgot to show the identificadores class: > > --- > class Identificador(mo

Re: Rendering ManyToManyField in template

2008-01-03 Thread Rodrigo Culagovski
I forgot to show the identificadores class: --- class Identificador(models.Model): identificador = models.CharField(max_length=200,unique=True) def __unicode__ (self): return self.identificador class Admin: pass class Meta: verbose_name_plural = "identif

Rendering ManyToManyField in template

2008-01-03 Thread Rodrigo Culagovski
Hi, I am trying to render the contents of a ManyToManyField in a template. However, when viewing the page, instead of the contents, it shows: "" I understand why this is happening, sort of, but haven't been able to fix it. The field is called "identificadores", deifned in the class "Articulo" as

Re: Templates with multiple repeating blocks

2008-01-03 Thread AmanKow
I posted a diff on dpaste: http://dpaste.com/hold/29777/ This is for a change to django/template/loader_tags.py This change would add an explicit reuse_block tag. {% block menu %} ... {% endblock %} ... {% reuse_block menu %} This change will actually reuse the parsed block. It does not cr

Re: Django on MediaTemple (dv) howto?

2008-01-03 Thread Ramiro Morales
On Jan 3, 2008 6:30 PM, Josh Ourisman <[EMAIL PROTECTED]> wrote: > > Is there any good howto on setting up Django on a MediaTemple (dv) > server? Up until now I've been running various Django-powered sites > from Dreamhost. Now I'm migrating all my hosting over to MediaTemple, Brian Rosner posted

Re: Django on MediaTemple (dv) howto?

2008-01-03 Thread Katie Lohrenz
Hi, Josh. I'm on a (dv) server, too. You're right that it's a vhost.conf file that you need to edit. If you edit the httpd.conf or httpd.include, it'll be overwritten by Plesk next time you change settings in Plesk or when (mt) runs periodic server updates. Create a file called vhost.conf in /va

Re: save sometime cause duplicate data

2008-01-03 Thread Eratothene
This can happen of you multiple times price submit button on the page. That is why it is recommended to issue HttpRedirect after POST. Read carefully: http://www.djangoproject.com/documentation/tutorial04/ On Dec 21 2007, 10:06 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I start only

Re: Recommended tool for web load & stress testing

2008-01-03 Thread mamcxyz
I remember use JMeter eons ago. I dislike the clunky interface and the stability problems... Maybe is improved now? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send em

How especify the default form (html)

2008-01-03 Thread mamcxyz
I don't know if this question is ignorance or what! I have 3 forms in the same html. One is for search, another for singup y anoter for login. I'm in singup, enter the values and hit enter. But search is executed (so, I get a nasty: Invalid login). I think this must be a obvious usability proble

Re: creating a profile when a user is created

2008-01-03 Thread Rajesh Dhawan
Hi again, See Malcolm Tredinnick's reply in this thread for another possible approach: http://groups.google.com/group/django-users/browse_thread/thread/9b4ffa2a85c522fb/be02ebbccd69240f#be02ebbccd69240f Basically, he suggests the possibility of adding a higher priority URL pattern that goes to y

Re: creating a profile when a user is created

2008-01-03 Thread Rajesh Dhawan
Hi Milan, On Jan 3, 2:37 pm, Milan Andric <[EMAIL PROTECTED]> wrote: > Is it possible to set the destination of a redirect after a create in > the admin? Not without hacking into the Django admin code. > > My scenario is such that when users are created it's also necessary to > create a profile

Django on MediaTemple (dv) howto?

2008-01-03 Thread Josh Ourisman
Is there any good howto on setting up Django on a MediaTemple (dv) server? Up until now I've been running various Django-powered sites from Dreamhost. Now I'm migrating all my hosting over to MediaTemple, but I don't seem to be able to get Django running properly. I'm stuck at the point where you

Re: Accessing request object in templates

2008-01-03 Thread Marty Alchin
On Jan 3, 2008 2:33 PM, annacoder <[EMAIL PROTECTED]> wrote: > > I understand *how* it is done. > > But, my question was not related to the how part. Here's a quick rundown of the "why". Templates aren't triggered by HTTP requests like views are. Instead, they're rendered inside views, which *ar

Re: Need help creating a composite database index

2008-01-03 Thread Matt Wilson
Thanks! On Jan 3, 1:32 pm, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > Hi, > > On Jan 3, 12:28 pm, Matt Wilson <[EMAIL PROTECTED]> wrote: > > > This is the postgresql index I want to create: > > > CREATE UNIQUE INDEX v2category_nameIndex ON v2category > > (v2organization_id, parent_category, lowe

creating a profile when a user is created

2008-01-03 Thread Milan Andric
Is it possible to set the destination of a redirect after a create in the admin? My scenario is such that when users are created it's also necessary to create a profile object. I'm trying to figure out a quick (possibly hack) that would make creating a user and profile easier. (I know, it's jus

Re: Accessing request object in templates

2008-01-03 Thread annacoder
I understand *how* it is done. But, my question was not related to the how part. On Jan 4, 12:17 am, Ariel Calzada <[EMAIL PROTECTED]> wrote: > venkata subramanian wrote: > > Hi, > > I had a problem recently. > > To access the request object in all of my templates. > > The solution I got sur

Re: Accessing request object in templates

2008-01-03 Thread annacoder
Can you explain what is the security issue? On Jan 3, 10:58 pm, Sam Lai <[EMAIL PROTECTED]> wrote: > Security maybe? > > Not sure, but if you add django.core.context_processors.request to > your TEMPLATE_CONTEXT_PROCESSORS list in settings.py, you won't have > to explicitly add the request objec

Re: Accessing request object in templates

2008-01-03 Thread Ariel Calzada
venkata subramanian wrote: > Hi, > I had a problem recently. > To access the request object in all of my templates. > The solution I got surprised me. It involved explicitly passing on > the request object from the views. > (Example, to pass a RequestContext object as a context_instance > para

Re: passing data to view using httpresponseredirect

2008-01-03 Thread Peter Rowell
I didn't like my own explanation and did a little more searching. I just found a better description of this at http://requires-thinking.blogspot.com/2007/10/note-to-self-default-parameter-values.html. He points out that the 'def' is an executable statement and it's only executed once. Therefore,

Re: Need help creating a composite database index

2008-01-03 Thread Rajesh Dhawan
Hi, On Jan 3, 12:28 pm, Matt Wilson <[EMAIL PROTECTED]> wrote: > This is the postgresql index I want to create: > > CREATE UNIQUE INDEX v2category_nameIndex ON v2category > (v2organization_id, parent_category, lower(name)); > > How do I create this index with the Django model? This will get you

Re: passing data to view using httpresponseredirect

2008-01-03 Thread Peter Rowell
> def new(request, errors = [], messages = []): > ... > [ snip] > unfortunatly, django somehow remembers this and the arrays don't get cleaned > up. It's not django that's tripping you up. > So, normal python rules say these should get default values [] and > thus be cleared. Actually, normal

A proposal for syncdb finished

2008-01-03 Thread Chris Green
I've been upgrading my unit testing to use the django TestCase framework [1]. I wrote a single function that inspects my permissions: setup_auth() g1,g2, g3 create_groups() perms1 = [permission_finder('app1.perm1'), permission_finder('app2.perm1] perms2 = perms + [permission_finder(

Re: Foreignkey relationship trouble

2008-01-03 Thread Rajesh Dhawan
Hi, > I have a class Photo and a class Category with a one to many > relationship (many pictures can be in one category, but each photo can > be in only one category)... > I want to do an app for mysite/photo/category/OneCategory/ and have > all picture in OneCategory... Nothing fancy. > So far I

Re: Accessing request object in templates

2008-01-03 Thread Alex Koshelev
No. RequestContext instance used to handle context processors. It doesn't pass request instance to the context. Request instance passed to template context only by "django.core.context_processors.request" if its installed. On 3 янв, 20:40, "venkata subramanian" <[EMAIL PROTECTED]> wrote: > Hi, >

Re: Accessing request object in templates

2008-01-03 Thread Sam Lai
Security maybe? Not sure, but if you add django.core.context_processors.request to your TEMPLATE_CONTEXT_PROCESSORS list in settings.py, you won't have to explicitly add the request object in every view. You still have to pass a RequestContext object to the render_to_response method, but you shou

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

2008-01-03 Thread Wes Winham
Hello, I've got a bit of a design issue I'm trying to wrap my head around in order to do things the Django Way. I'm attempting to creating a simple form that allows a user to take a multiple choice "quiz." Quiz is a model and it has a many to many with Questions which has a m2m with AnswerOption

Re: how to use random of Built-in filter reference in templates?

2008-01-03 Thread Alex Koshelev
> ./manage.py shell >>> from django.template.defaultfilters import random >>> l = [ 1, 2, 3, 4 ] >>> random( l ) 2 >>> random( l ) 1 >>> random( l ) 4 >>> random( l ) 2 >>> random( l ) 2 >>> random( l ) 3 In template context behaviour is the same. On 3 янв, 19:09, "jt.wang" <[EMAIL PROTECTED]> w

Accessing request object in templates

2008-01-03 Thread venkata subramanian
Hi, I had a problem recently. To access the request object in all of my templates. The solution I got surprised me. It involved explicitly passing on the request object from the views. (Example, to pass a RequestContext object as a context_instance parameter in render_to_response method). It

Re: Foreignkey relationship trouble

2008-01-03 Thread Maarten
Hello, I'm no pro about this yet. But probably you need to explicitly use the object as follows: If you don't use the primary key (default = id), you must first retrieve the object: objectA = ObjectA.objects.get(name = ...) then you can use it: objectB = ...(... , fk_to_ObjectA = objectA) using

Re: passing data to view using httpresponseredirect

2008-01-03 Thread l5x
Why don't you use sessions? http://www.djangoproject.com/documentation/sessions/ --~--~-~--~~~---~--~~ 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.co

Need help creating a composite database index

2008-01-03 Thread Matt Wilson
This is the postgresql index I want to create: CREATE UNIQUE INDEX v2category_nameIndex ON v2category (v2organization_id, parent_category, lower(name)); How do I create this index with the Django model? TIA Matt --~--~-~--~~~---~--~~ You received this message be

Re: file uploading clean_data code missing

2008-01-03 Thread Karen Tracey
On Jan 3, 2008 10:49 AM, Chris Haynes <[EMAIL PROTECTED]> wrote: > > With the following form in my template > > > File: > {{ form.code }} > > > > > and the appended view code, I get the desired form with text box, > Browse... and Submit buttons. But when > browse for a plain text file and hit

passing data to view using httpresponseredirect

2008-01-03 Thread Maarten
Hi, I took a look around the django website and the user group here, but didn't really find an answer to this. I my application (which does administrative things with a stock) I have a view that allows creation of items that are stored in the stock. The view does different things on different a

Re: how to use random of Built-in filter reference in templates?

2008-01-03 Thread Tim Chase
> so,is there anyone who can give me an example about "random" > of Built-in filter reference in templates? I have these items: {% for item in items %} {{ item }} {% endfor %} This is my favorite item: {{ items|random }} -tim --~--~-~--~~~---~--~~ You rec

Re: 'WSGIRequest' object has no attribute 'user'

2008-01-03 Thread Karen Tracey
On Jan 3, 2008 10:32 AM, Chris Haynes <[EMAIL PROTECTED]> wrote: > > On Dec 29 2007, 11:03 am, Alex Koshelev <[EMAIL PROTECTED]> wrote: > > Is there 'django.contrib.auth.middleware.AuthenticationMiddleware' in > > your MIDDLEWARE_CLASSES ? > > No. Uncommenting >'django.middleware.common.Co

Re: YUI file upload and form errors

2008-01-03 Thread Graham Ullrich
Malcolm, Thanks so much for your suggestion. With that knowledge I found the problem in 10 minutes. The culprit turns out to be the YUI Connection Manager. As it turns out, when handling a file upload they change the location of the returned data. My response gets placed in a totally different chil

how to use random of Built-in filter reference in templates?

2008-01-03 Thread jt.wang
hi , we can see "random Returns a random item from the list."from http://www.djangoproject.com/documentation/templates/.but it is diffcult to understand without examples. so,is there anyone who can give me an example about "random" of Built-in filter reference in templates? thanks!

file uploading clean_data code missing

2008-01-03 Thread Chris Haynes
With the following form in my template File: {{ form.code }} and the appended view code, I get the desired form with text box, Browse... and Submit buttons. But when browse for a plain text file and hit Submit, I get the HttpResponseBadRequest response and the print statements flagged with

Re: 'WSGIRequest' object has no attribute 'user'

2008-01-03 Thread Chris Haynes
On Dec 29 2007, 11:03 am, Alex Koshelev <[EMAIL PROTECTED]> wrote: > Is there 'django.contrib.auth.middleware.AuthenticationMiddleware' in > your MIDDLEWARE_CLASSES ? No. Uncommenting 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddlewar

Re: Counting and indexing objects

2008-01-03 Thread Tom Badran
Thanks for the hints Tim. The problem is that i'm not using the whole sequence, im just pulling one item out of the query set and was hoping for a way to get the position without having to use the whole set, in the same vain that count() is much more sensible a choice than len() as it gets optimise

Re: Counting and indexing objects

2008-01-03 Thread Tim Chase
> In my template, i want to be able to print "Item X of Y" where > items are got from a QuerySet such as > Picture.objects.filter(album='name') > > Now Y is easy to get, its just the count() of the queryset, > however i cant seem to find a solution to find X. The objects > do have an ordering set

Re: Make Django admin edit return to custom page?

2008-01-03 Thread Ulf Kronman
Hi Malcom, and thanks for the reply. > The admin interface isn't really designed to be customised like that. > Rather, the principle is that if you can edit one record, you can edit > them all. OK, I guessed that I would get that answer, but I took a chance anyhow. > However, a bit of reading o

Counting and indexing objects

2008-01-03 Thread Tom Badran
In my template, i want to be able to print "Item X of Y" where items are got from a QuerySet such as Picture.objects.filter(album='name') Now Y is easy to get, its just the count() of the queryset, however i cant seem to find a solution to find X. The objects do have an ordering set, so they shoul

Re: Printable article page URLs?

2008-01-03 Thread Mordy Ovits
On Wednesday 02 January 2008 06:15 pm, Alex Koshelev wrote: > The second variant with GET query is the best. One resouce has one > uri but with query you specify it's display properties. I agree, and have modified my dev site to match that, using Ned Batchelder's tip of meta tags to solve the ro

Re: newforms-admin: specify model level extra js files (the js admin option)

2008-01-03 Thread Michel Thadeu Sabchuk
Hi! > The newforms.txt documentation in the newforms-admin branch contains a > detailed discussion on the capabilities of the new Media class. I will take a look on the newforms and modeladmin documentation. Very thanks! Best regards... Michel --~--~-~--~~~---~--~---

Foreignkey relationship trouble

2008-01-03 Thread hern42
Hello, I have an issue (it might be a beginner issue, if so I am sorry... please point to the chapter in the doc) I have a class Photo and a class Category with a one to many relationship (many pictures can be in one category, but each photo can be in only one category)... I want to do an app for

WYSIWYG Editfor for the Admin Interface (Not TinyMCE or FCK)

2008-01-03 Thread FrostedDark
So I just can't get this going... but really, I have no idea what I actually need to do to get it to work. I need to use InnovaStudio Editor for about 75% of the textareas in the Django admin site. I am running the newforms-admin branch updated a few hours ago. Now with some editors, it is as s

Re: Printable article page URLs?

2008-01-03 Thread Ned Batchelder
D'oh! Sorry. I hate those kind of replies! (At least I also contributed answering the asked questions in another post...) --Ned. Tim Chase wrote: >> You could try not serving a different page at all: CSS can >> apply a different stylesheet when printing than when on the >> screen. See http://w

Re: admin urls in my own admin view

2008-01-03 Thread Nianbig
I´ll post som code as well.. here´s the view: from mysite.books.models import Book from django.template import RequestContext from django.shortcuts import render_to_response from django.contrib.admin.views.decorators import staff_member_required def report(request): return render_to_respons

SelectDateWidget

2008-01-03 Thread AniNair
Hi all... I would like to know how to get SelectDateWidget to correctly display a value retrieved from a database. I saw a similar post but no answers have been posted... http://groups.google.com.et/group/django-users/browse_thread/thread/5bf7348f9b13a880/1ccbde2bd4cc272a?#1ccbde2bd4cc272a Thank

Re: Recommended tool for web load & stress testing

2008-01-03 Thread Christian Vest Hansen
Apache JMeter should be able to give you #1, #2 & #5 and can operate in a distributed fashion. On 1/2/08, Ryan K <[EMAIL PROTECTED]> wrote: > > For all your testing needs http://www.softwareqatest.com/qatweb1.html > > On Jan 2, 2:58 pm, mamcxyz <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I wonder