Re: How to save/link/rename thumbnail in model

2008-10-21 Thread krylatij
You can define image upload path at runtime (check manual for ImageField) def get_photo_path(instance, filename): return 'static/upload_to/photos/%s' % instance.name class ProductImage(models.Model): name = models.CharField(max_length=50) file = models.ImageField(upload_to=

Re: Returning Queryset that excludes certain results from another queryset.

2008-10-21 Thread timc3
Sounds like it is, will try it out soon. Thanks! --~--~-~--~~~---~--~~ 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: Feature like "acts_as" in Django ORM or contrib ?

2008-10-21 Thread Daniel Roseman
On Oct 21, 6:45 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi, > > Are there something in Django ORM or contrib to do "acts_as" like in > RoR or Elixir (SqlAlchemy). Example : > > http://elixir.ematia.de/apidocs06/elixir.ext.htmlhttp://elixir.ematia.de/apidocs06/elixir.ext.list.html > >

Re: render_to_response failed to render media files in base.html

2008-10-21 Thread Daniel Roseman
On Oct 21, 4:26 am, "James Bennett" <[EMAIL PROTECTED]> wrote: > On Mon, Oct 20, 2008 at 9:30 PM, Chuck22 <[EMAIL PROTECTED]> wrote: > > Adding context_instance=RequestContext(request) to the method fixed > > the problem. Seems this should be done by default for > > render_to_response method.

Re: In URL dispatcher, is there a way to pass values of Named Groups directly to template?

2008-10-21 Thread Daniel Roseman
On Oct 21, 4:12 am, "yuanyun.ken" <[EMAIL PROTECTED]> wrote: > Hi,all great Django users and developers, I have a little problem. > In URL dispatcher, is there a way to pass values of Named Groups > directly to template, don't want to write a view function just for > this. > for example, I have

i18n all languages not displayed

2008-10-21 Thread bluefireredsky
Hi, I am implementing an i18n for a web application. The customer requires support for certain Indian languages such as Hindi and Tamil. I had refered to http://www.i18nguy.com/unicode/language-identifiers.html for identifying the respective language codes. I am not able to get it working for

Re: In URL dispatcher, is there a way to pass values of Named Groups directly to template?

2008-10-21 Thread DimebagBorgir
Hey, I'm new to this group, but I believe you want generic views, specifically: django.views.generic.simple.direct_to_template http://docs.djangoproject.com/en/dev/ref/generic-views/?from=olddocs#django-views-generic-simple-direct-to-template which would give you something like this:

Re: In URL dispatcher, is there a way to pass values of Named Groups directly to template?

2008-10-21 Thread DimebagBorgir
I'm not sure what happened to my previous reply, maybe i sent it to you directly, lol.. I'm new. but i think this is what you want: http://docs.djangoproject.com/en/dev/ref/generic-views/?from=olddocs#django-views-generic-simple-direct-to-template urlpatterns =

Re: Feature like "acts_as" in Django ORM or contrib ?

2008-10-21 Thread James Bennett
On Tue, Oct 21, 2008 at 12:45 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > In Elixir, when I add acts_as_list(qualifier=qualify) in Model I can > use move_higher, move_lower ... methods. Be careful about confusing multiple things here; there are applications available for Django which add

Re: Feature like "acts_as" in Django ORM or contrib ?

2008-10-21 Thread [EMAIL PROTECTED]
On 21 oct, 08:37, Daniel Roseman <[EMAIL PROTECTED]> wrote: > > acts_as is a Ruby design pattern rather than a Python one. However, > for the specific higher/lower functionality, look into > django-mptt:http://code.google.com/p/django-mptt/ Very good. Do you know something to do : * ordered

Re: i18n all languages not displayed

2008-10-21 Thread Jarek Zgoda
Wiadomość napisana w dniu 2008-10-21, o godz. 07:46, przez bluefireredsky: > I am implementing an i18n for a web application. The customer requires > support for certain Indian languages such as Hindi and Tamil. I had > refered to http://www.i18nguy.com/unicode/language-identifiers.html > for

Re: i18n all languages not displayed

2008-10-21 Thread Jarek Zgoda
Wiadomość napisana w dniu 2008-10-21, o godz. 09:30, przez Jarek Zgoda: >> gettext = lambda s: s >> >> LANGUAGES = ( >>('en', gettext('English')), >>('ta', gettext('Tamil')), >>('hi-IN', gettext('Hindi')), >> ) >> >> My folder structure on the locale is as

Authenticating static files against Django Auth with FastCGI

2008-10-21 Thread MrJogo
Hi, I am using Django on my university webspace. I set it up by following (and slightly modifying) the instructions on this page: http://docs.djangoproject.com/en/dev/howto/deployment/fastcgi/#running-django-on-a-shared-hosting-provider-with-apache Now I would like to protect certain static

Re: login_required for imported apps

2008-10-21 Thread bruno desthuilliers
On 20 oct, 01:33, "James Bennett" <[EMAIL PROTECTED]> wrote: > On Sun, Oct 19, 2008 at 2:10 PM, bruno desthuilliers > > <[EMAIL PROTECTED]> wrote: > > Indeed. But , OTHO, having to copy/paste a whole urls.py just to a add > > a simple decorator on the view functions is not really DRY. > >

MySQL to Oracle db engine

2008-10-21 Thread mbdtsmh
Hi All - I'm having trouble going from using a mysql database to an oracle database. The MySQL db settings work fine and I can validate & syncdb my tables into the database. However, when I change my settings.py to point to an oracle database then I get the following error (I have cx_Oracle

Adding a custom permission to the User model

2008-10-21 Thread Benedict Verheyen
Hi, I'm trying to specify a custom permission on the User model. I would use it to delegate control to users over certain models. I have an admin.py file where i add this: from django.contrib.auth.models import User ... class UserAdmin(admin.ModelAdmin): class Meta: permissions = (

Re: is it possible to run 0.96 and 1.0 in parallel?

2008-10-21 Thread Rachel Willmer
Virtualenv - great, just what I've been looking for :-) Thanks Rachel --~--~-~--~~~---~--~~ 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

Re: How to save/link/rename thumbnail in model

2008-10-21 Thread mcordes
Hello, I'd suggest you also consider this app: http://code.google.com/p/sorl-thumbnail/ . It makes it very simple to have thumbnails of various sizes associated with your image fields. -Matt On Oct 21, 2:10 am, krylatij <[EMAIL PROTECTED]> wrote: > You can define image upload path at runtime

Re: cheeserater css reference

2008-10-21 Thread coderb
nevermind, solved - using djangos - serving static pages - work around On Oct 18, 1:22 am, coderb <[EMAIL PROTECTED]> wrote: > forgot to mention that I did actually change the template css > references to match settings.py, but obviously still got it wrong. I'm > using django 1.0 on win XP. > >

Can't validate a datetime ...

2008-10-21 Thread dbee
Getting an error when i try to validate a datetime ... help ! Table "public.tarait1_teleint" Column | Type | Modifiers -+-- +--

Query: Field of model "not defined", but existing

2008-10-21 Thread Micha Pietsch
Hi, I've got a model "Note" with a DateTimeField "updated". I ran dbsync and entered some data but making the query "n = Note.objects.filter(owner=request.user.id).exclude(updated__tle=datetime.datetime.now())" tells me that "updated" is "not defined". Without the exclude statement it works, I

Spliting a single result from a db

2008-10-21 Thread [EMAIL PROTECTED]
HI all, I've just starting using django and am really impressed. In my simple app I want to retrieve a single "article" from a db and then display it broken into reasonable length pages (either based on word count or a specific markup in the text). I'd really appreciate any pointers on how I

Re: Accessing Sessions in Custom Tags

2008-10-21 Thread Eugene A.
Thanks for post, I searched this solve too long. But: I added in settings.py TEMPLATE_CONTEXT_PROCESSORS = (         'django.core.context_processors.request', ) and it doesn't work, raises 'Failed lookup for key [request] in u"[{'sess': 'hello', 'mods': [, ]}]"' So 'request' field isn't in

Re: i18n all languages not displayed

2008-10-21 Thread bluefireredsky
Great! It works like a charm! Thank you. On Oct 21, 12:33 pm, Jarek Zgoda <[EMAIL PROTECTED]> wrote: > Wiadomość napisana w dniu 2008-10-21, o godz. 09:30, przez Jarek Zgoda: > > > > > > >> gettext = lambda s: s > > >> LANGUAGES = ( > >>            ('en', gettext('English')), > >>            

Re: Python on Windows re-using old .pyc files?

2008-10-21 Thread Thomas Guettler
Ulf Kronman schrieb: > I'm using Django trunk and I have set the MaxRequestsPerChild 1 > directive in httpd.conf. I'm running on Windows XP (sp3?). > Here a guess: Apache creates several threads (or worker processes) and after one request the thread/process gets killed. But the other are

referencing the slug of parent ('self')

2008-10-21 Thread coderb
hi, I know this is probably easy, but ... I have a category model: class Category(models.Model): name = models.CharField(max_length=100, unique=True) slug = models.SlugField(max_length=100, unique=True) parent=

Security Trimming and Roles

2008-10-21 Thread killer barney
Loving django 1.0! But one thing I notice they don't seem to have is security trimming (where you can hide certain links based on the role permissions of a user) or any sort of roles security. Is there any solid way at going about this that already exists in the django framework or is this

Comments in reversed order

2008-10-21 Thread jrivero
Is possible obtain the comments of django.contrib in reversed order? In old version: {% get_free_comment_list for workgroups.workgroup group.id as comment_list reversed %} But in new version the templatetag not have control of this parameter. The method for order is other? Regards

Re: referencing the slug of parent ('self')

2008-10-21 Thread Daniel Roseman
On Oct 21, 1:13 pm, coderb <[EMAIL PROTECTED]> wrote: > def category(request, myslug): >     category_list = get_list_or_404(Category, parent=myslug) get_list_or_404(Category, parent__slug=myslug) -- DR. --~--~-~--~~~---~--~~ You received this message because you

i18n translation in forms?

2008-10-21 Thread chris
Hi there, I am trying to get I18N working for a website. So far the language selection, custom messages and their translation in templates using {% trans "" %} etc. works like a charm. However I can't quite figure out how to get things like the Paginator (it displays and such stuff) or field

Re: Security Trimming and Roles

2008-10-21 Thread Dj Gilcrease
http://docs.djangoproject.com/en/dev/topics/auth/?from=olddocs#id6 http://docs.djangoproject.com/en/dev/topics/auth/#the-permission-required-decorator might be a good place to start reading Dj Gilcrease OpenRPG Developer ~~http://www.openrpg.com

Re: Accessing Sessions in Custom Tags

2008-10-21 Thread Daniel Roseman
On Oct 21, 7:58 am, "Eugene A." <[EMAIL PROTECTED]> wrote: > Thanks for post, I searched this solve too long. > > But: > > I added in settings.py > TEMPLATE_CONTEXT_PROCESSORS = ( >          'django.core.context_processors.request', > ) > and it doesn't work, raises 'Failed lookup for key

Re: referencing the slug of parent ('self')

2008-10-21 Thread coderb
thanks Daniel. On Oct 21, 2:09 pm, Daniel Roseman <[EMAIL PROTECTED]> wrote: > On Oct 21, 1:13 pm, coderb <[EMAIL PROTECTED]> wrote: > > > def category(request, myslug): > >     category_list = get_list_or_404(Category, parent=myslug) > > get_list_or_404(Category, parent__slug=myslug) > -- > DR.

Re: Query: Field of model "not defined", but existing

2008-10-21 Thread Karen Tracey
On Tue, Oct 21, 2008 at 6:55 AM, Micha Pietsch <[EMAIL PROTECTED]> wrote: > > Hi, > I've got a model "Note" with a DateTimeField "updated". I ran dbsync and > entered some data but making the query > "n = Note.objects.filter(owner=request.user.id > ).exclude(updated__tle=datetime.datetime.now())"

Re: Feature like "acts_as" in Django ORM or contrib ?

2008-10-21 Thread shabda
Ordering: qs = Model.objects.filter(...).order_by('ordering_field') ord_list = [el for el in qs] Versioning: code.google.com/p/django-rcsfield (There are a few others, cant remember the names offhand.) On Oct 21, 12:13 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On 21 oct, 08:37,

filtering pulldowns in django admin

2008-10-21 Thread Matt Berg
I realize there is probably a very simple solution for this but it has been bothering me. How do I filter a pulldown in the admin. If I have an inline form, for example, I want to be able to limit results in a pulldown to the parent object/form. Thanks for the help. Matt

ordering edit inlines in admin

2008-10-21 Thread patrickk
does anyone know about a clean way to order edit-inlines using the admin-interface? 1. I´ve seen this and other javascript-based snippets: http://simonwillison.net/2008/Sep/13/django/ ... it´s quite simple, but it doesn´t really work. for example, if the formset isn´t valid, the order is lost.

Re: File upload progress bar for Django?

2008-10-21 Thread varikin
On Oct 20, 6:15 pm, Sascha Brossmann <[EMAIL PROTECTED]> wrote: > > Is anyone > > familiar with a django or python tutorial that shows how to implement > > some kind of file upload progress bar? > > Sorry, but the main magic in those uploaders is done via flash, not > via js or php. AFAIK there

Re: login_required for imported apps

2008-10-21 Thread Heather
I completely agree. Even the middleware solution doesn't seem quite right as it will check each page/request. I've been thinking about this a lot and I wonder if maybe the only part that should be reusable is the models? I don't know. But since there is no way (that I know of) to use

Re: Difficulty getting Django working with Apache and mod_python

2008-10-21 Thread projecktzero
On Oct 20, 4:17 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Mon, Oct 20, 2008 at 5:15 PM, projecktzero <[EMAIL PROTECTED]>wrote: > > I'm pretty new to Django. I'm having trouble getting my Django > > app/web-site to run under Apache2 and Mod_Python. I'm running Django > > 0.96. I

comparing from two models in the same function (view) ?

2008-10-21 Thread Net_Boy
Hi, I am trying to make a view function to get the posted values and make some comparison (if x.value >= y.value).. where x is the model that I got it's values from the post and y is the other model . so if anyone know how to do that I would be grateful :) regards..

what is the status of inline unique_together non-fatal error messages?

2008-10-21 Thread bobhaugen
I mean the normal displayable and user-correctable form validation errors, not the fatal database IntegrityError. I found http://groups.google.com/group/django-users/browse_thread/thread/f0e245366b02411b/df6d03f32eb37f93 and http://www.djangosnippets.org/snippets/338/ both more than a year old.

Re: MySQL to Oracle db engine

2008-10-21 Thread Ian
On Oct 21, 3:55 am, mbdtsmh <[EMAIL PROTECTED]> wrote: > Hi All - I'm having trouble going from using a mysql database to an > oracle database. The MySQL db settings work fine and I can validate & > syncdb my tables into the database. However, when I change my > settings.py to point to an oracle

Re: comparing from two models in the same function (view) ?

2008-10-21 Thread Net_Boy
def comp(request): form = ItemForm() if request.method=="POST": form = ItemForm(request.POST, request.FILES) if form.is_valid(): if item.price >= old.price and item.pub_date <= old.pub_date item = form.save(commit=False) item.seller =

Re: Security Trimming and Roles

2008-10-21 Thread killer barney
awesome! thanks On Oct 21, 6:20 am, "Dj Gilcrease" <[EMAIL PROTECTED]> wrote: > http://docs.djangoproject.com/en/dev/topics/auth/?from=olddocs#id6http://docs.djangoproject.com/en/dev/topics/auth/#the-permission-requ... > > might be a good place to start reading > > Dj Gilcrease > OpenRPG

Re: what is the status of inline unique_together non-fatal error messages?

2008-10-21 Thread Karen Tracey
On Tue, Oct 21, 2008 at 11:39 AM, bobhaugen <[EMAIL PROTECTED]> wrote: > > I mean the normal displayable and user-correctable form validation > errors, not the fatal database IntegrityError. > > I found >

Setting up Django on CentOS5 with flup and fastcgi

2008-10-21 Thread [EMAIL PROTECTED]
Hello, I am a webhosting provider that is trying to set up django on my server so that my clients can utilise it for their own programs. Although we do not allow ssh access our only ability to allow them access is to use fastcgi Although i am having trouble with doing so. Is there any

Re: Setting up Django on CentOS5 with flup and fastcgi

2008-10-21 Thread Karen Tracey
On Tue, Oct 21, 2008 at 11:50 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]>wrote: > > Hello, > > I am a webhosting provider that is trying to set up django on my > server so that my clients can utilise it for their own programs. > > Although we do not allow ssh access our only ability to allow them >

Re: PIL with python 2.5 on Leopard - [Solution]

2008-10-21 Thread Heather
Have you tried Macports? If not, you should check it out. On Oct 20, 2:11 pm, Francis <[EMAIL PROTECTED]> wrote: > I had trouble installing PIL on my Mac with 10.5 Leopard. > > I always got an : "Upload a valid image. The file you uploaded was > either not an image > or a corrupted image." > >

Re: Python on Windows re-using old .pyc files?

2008-10-21 Thread Ulf Kronman
Hi Thomas, > Apache creates several threads (or worker processes) and after one > request the thread/process gets killed. But the other are still alive and > have the old code loaded. > > Maybe you could try mod_wsgi. It is much more flexible. Thanks for the tip. It seems as this could be the

Re: what is the status of inline unique_together non-fatal error messages?

2008-10-21 Thread bobhaugen
On Oct 21, 10:59 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > Have you tried whatever scenario you are particularly interested in on 1.0 > or current code? > > Though general model validation did not make it into 1.0, checking of unique > and unique_together was added in changeset [8805]. It

Disable i18n for certain templates

2008-10-21 Thread Armandas
Hi, I am using internationalization on my project. Recently I found out that output from date filter is not in english. The point is, that I use this to construct pubDate for my rss, like this: {{ post.date|date:"D, d M Y H:i:s" }} GMT and i18n just screws things up here. Is there any proper

Re: Feature like "acts_as" in Django ORM or contrib ?

2008-10-21 Thread ro60
I've been working on an acts_as_list implementation for Django recently. I know gasp... I will prob be strung up by my toes for it. I work with Rails and Django both and like the way that the acts as list stuff works in Rails. The code is untested and there are some gaps that still need to be

Re: Updating path and filename of ImageFieldFile

2008-10-21 Thread Jon Biddle
This code should work with Django 1.0 : from django.db import models from PIL import Image class Photo(models.Model): related_entry_id = models.ForeignKey(MyBlogEntryModel) # Use your model object photo = models.ImageField(upload_to="my_upload_path/") # Point to your upload directory

Re: what is the status of inline unique_together non-fatal error messages?

2008-10-21 Thread Karen Tracey
On Tue, Oct 21, 2008 at 12:36 PM, bobhaugen <[EMAIL PROTECTED]> wrote: > > On Oct 21, 10:59 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > > Have you tried whatever scenario you are particularly interested in on > 1.0 > > or current code? > > > > Though general model validation did not make it

Re: Setting up Django on CentOS5 with flup and fastcgi

2008-10-21 Thread [EMAIL PROTECTED]
yes i have read that.. it seems that the .fcgi file does not read correctly. it just returns the actual text in the fcgi file. and when i try and run a development server you just get a timeout. On Oct 21, 5:05 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Tue, Oct 21, 2008 at 11:50 AM,

Re: File upload progress bar for Django?

2008-10-21 Thread jonknee
On Oct 20, 7:15 pm, Sascha Brossmann <[EMAIL PROTECTED]> wrote: > > Is anyone > > familiar with a django or python tutorial that shows how to implement > > some kind of file upload progress bar? > > Sorry, but the main magic in those uploaders is done via flash, not > via js or php. AFAIK there

Re: Name of button pressed not in request.POST

2008-10-21 Thread Glen
I know this is an old thread. However, I found it when searching online when I had the same problem. I did quite a bit of other searching before I finally realized what was happening. Yes, I see the same behavior where the 'submit.x' and 'submit.y' values were in the request.POST dictionary, but

Re: what is the status of inline unique_together non-fatal error messages?

2008-10-21 Thread bobhaugen
On Oct 21, 12:34 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > Well then the next step I would try is testing out the current patch for > general model validation, which is ticket #6845: > > http://code.djangoproject.com/ticket/6845 > > Status on this was most recently reported here, I think: >

GeoDjango - Difficulty placing vector marker from DB

2008-10-21 Thread Alfonso
Hey, Having great trouble getting geodjango/openlayers to display vector markers propery - everything I try positions the sample point off the coast of Africa (no matter if I change the vector position in geoadmin). Here's what I'm working with - any help appreciated!: var lon = -2.900; var

Re: GeoDjango - Difficulty placing vector marker from DB

2008-10-21 Thread Ariel Mauricio Nunez Gomez
There are many ways to fix the projection issue, this is one (probably not the best) On your view code: sites_list=sites_list.transform(900913) Best, Ariel. On Tue, Oct 21, 2008 at 1:57 PM, Alfonso <[EMAIL PROTECTED]> wrote: > > Hey, > > Having great trouble getting geodjango/openlayers to

problem testing application named "core"

2008-10-21 Thread reyjexter
When running manage.py test core, the test seem to run but no test suite is executed. but when using plain manage.py test its okay. Is this problem caused by the naming? thanks rey --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Better attack handling on Apache(wsgi)/Django servers

2008-10-21 Thread adamiis111
I'm starting a new project on Django 1.0/Pinax and I'm noticing that these silly IIS attacks that I used to see in my previous logs show up in a much more cluttered way through Apache(wsgi)/Django. Is there a best practices way to handle these types of attacks so that the attack is logged (or

Re: Setting up Django on CentOS5 with flup and fastcgi

2008-10-21 Thread Adam Nelson
I've had great luck with wsgi. http://code.djangoproject.com/wiki/django_apache_and_mod_wsgi http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango This article relates how to reverse proxy that with Nginx if you're interested (for speed, isolation):

Re: login_required for imported apps

2008-10-21 Thread bruno desthuilliers
On 21 oct, 16:40, Heather <[EMAIL PROTECTED]> wrote: > I completely agree. Even the middleware solution doesn't seem quite > right as it will check each page/request. Well, that's the whole concept of middlewares, isn't it ?-) > I've been thinking about > this a lot and I wonder if maybe the

Re: File upload progress bar for Django?

2008-10-21 Thread john Moylan
There are working examples around. Basically get your server to report the upload status to a javascript ui at intervals. Try searching the djangoproject trac server - there is a link from there to a django uploader project on google code that I have used in the past. I think it uses JQuery. I'd

Creating a system with multiple types of users

2008-10-21 Thread itsnotvalid
I am going to help some people making a website that has a few admins, a crowd of service providers (individuals) and customers. There could be agents who invites people to become service providers or customers as well. Looking at the user system provided by django, and as a new programmer to

Re: Creating a system with multiple types of users

2008-10-21 Thread Mozey
Well, django user auth has groups implemented. "It handles user accounts, groups, permissions and cookie-based user sessions." (http://docs.djangoproject.com/en/dev/topics/auth/? from=olddocs) How can you effectively separate their views. Separate your apps based on their nature, not based on

Named URLs for Flatpages?

2008-10-21 Thread erikcw
Hi all, I'm working on a project that uses flatpages pretty heavily. I was wondering if there was a way to use named urls with flatpages so that I can use reverse() in my other views and {% url flat_privacy_policy %} in my templates. I haven't been able to find anything helpful in the docs so

Getting latest ManyToMany related model

2008-10-21 Thread Charlie Gunyon
Hey everyone. Is there a way to get the latest ManyToMany related model? My models.py looks like this: class Conference(models.Model): name = models.CharField(max_length=30, unique=True) class Team(models.Model): name = models.CharField(max_length=30, unique=True) conferences =

Permissions in template tags

2008-10-21 Thread [EMAIL PROTECTED]
Simple question: is it possible to access all user permissions in template tags just as in regular templates through the {{ perms }} context variable or do I need to manually pass the permissions are template tag params? By default the perms map does not seem to work in tags.

Re: File upload progress bar for Django?

2008-10-21 Thread john
On Oct 20, 2008, at 12:22 PM, M Godshall wrote: > Is anyone familiar with a django or python tutorial that shows how > to implement > some kind of file upload progress bar? Ideally I'd like to use > jquery, but I'm open to anything at this point. Any links or code > examples would be greatly

Re: what is the status of inline unique_together non-fatal error messages?

2008-10-21 Thread Karen Tracey
On Tue, Oct 21, 2008 at 2:35 PM, bobhaugen <[EMAIL PROTECTED]> wrote: > > On Oct 21, 12:34 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > > Well then the next step I would try is testing out the current patch for > > general model validation, which is ticket #6845: > > > >

Re: Getting latest ManyToMany related model

2008-10-21 Thread Charlie Gunyon
Nevermind, I think I figured it out. On Oct 21, 3:13 pm, Charlie Gunyon <[EMAIL PROTECTED]> wrote: > Hey everyone.  Is there a way to get the latest ManyToMany related > model?  My models.py looks like this: > > class Conference(models.Model): >     name = models.CharField(max_length=30,

Re: Difficulty getting Django working with Apache and mod_python

2008-10-21 Thread Graham Dumpleton
On Oct 22, 2:23 am, projecktzero <[EMAIL PROTECTED]> wrote: > On Oct 20, 4:17 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > > > > > On Mon, Oct 20, 2008 at 5:15 PM, projecktzero <[EMAIL PROTECTED]>wrote: > > > I'm pretty new to Django. I'm having trouble getting my Django > > > app/web-site

Re: Python on Windows re-using old .pyc files?

2008-10-21 Thread Graham Dumpleton
On Oct 21, 10:51 pm, Thomas Guettler <[EMAIL PROTECTED]> wrote: > Ulf Kronman schrieb:> I'm using Django trunk and I have set the > MaxRequestsPerChild 1 > > directive in httpd.conf. I'm running on Windows XP (sp3?). > > Here a guess: > > Apache creates several threads (or worker processes) and

Re: callable upload_to problem

2008-10-21 Thread Brot
Is there nobody who can help me with my problem? Is this a bug and should I open a ticket or is it my fault? ~Bernd On 20 Okt., 22:05, Brot <[EMAIL PROTECTED]> wrote: > Hello, > > I am using the latest svn-revision 9236 and tried to use a callable in > the upload_to parameter of the ImageField.

Re: Django on Apache (mod_python) administration cookie problem

2008-10-21 Thread M.Ganesh
Hi Daniel, I am also facing the same problem. I really can't understand the technicalities of the solution offered in this thread. Since you seemed to have solved the problem, can you please give a little more details on how to do it Thanks in advance Regards Ganesh Daniel bodom_lx

Re: Feature like "acts_as" in Django ORM or contrib ?

2008-10-21 Thread ro60
Also you may want to look at this one... Seems pretty good as well (haven't used it personally though). http://www.djangosnippets.org/snippets/884/ On Oct 21, 1:20 pm, ro60 <[EMAIL PROTECTED]> wrote: > I've been working on an acts_as_list implementation for Django > recently. I know gasp... I

Import error exception "No module named urls" when running from eclipse

2008-10-21 Thread DragonSlayre
Hi, I'm new to django/python, and I'm testing out eclipse for development. I'm using pydev, and managed to run my app, but then when I go to the web page, I get: ImportError at /time/ No module named urls Request Method: GET Request URL:http://localhost:8080/time/ Exception Type:

Re: Django on Apache (mod_python) administration cookie problem

2008-10-21 Thread Graham Dumpleton
On Oct 22, 10:52 am, "M.Ganesh" <[EMAIL PROTECTED]> wrote: > Hi Daniel, > > I am also facing the same problem. I really can't understand the > technicalities of the solution offered in this thread. Since you seemed > to have solved the problem, can you please give a little more details on > how

Re: Import error exception "No module named urls" when running from eclipse

2008-10-21 Thread Jeff Anderson
DragonSlayre wrote: > Hi, I'm new to django/python, and I'm testing out eclipse for > development. > > I'm using pydev, and managed to run my app, but then when I go to the > web page, I get: > > ImportError at /time/ > No module named urls > You'll need to include the code for the view that is

Re: callable upload_to problem

2008-10-21 Thread Karen Tracey
On Tue, Oct 21, 2008 at 7:42 PM, Brot <[EMAIL PROTECTED]> wrote: > > Is there nobody who can help me with my problem? Is this a bug and > should I open a ticket or is it my fault? > > It's either a bug or behavior that needs more explicit documentation. The problem is that upload_to is called

Re: Import error exception "No module named urls" when running from eclipse

2008-10-21 Thread DragonSlayre
Thanks for your help, It turns out that it was a problem to do with the renaming functionality not working properly in eclipse. I tried renaming my package - and that doesn't work for some reason, and then my hack around caused a problem when I created a new package, which ultimately stuffed up

admin.site.register errors (due to user mistake)

2008-10-21 Thread [EMAIL PROTECTED]
If you make a boneheaded move such as creating a ModelAdmin class for a model that you forgot to include in your admin.py's model import statement, you get an error. But it's not the error you might expect. What happens is you get the "model already registered exception", citing the first model

Re: admin.site.register errors (due to user mistake)

2008-10-21 Thread Malcolm Tredinnick
On Tue, 2008-10-21 at 19:51 -0700, [EMAIL PROTECTED] wrote: > If you make a boneheaded move such as creating a ModelAdmin class for > a model that you forgot to include in your admin.py's model import > statement, you get an error. But it's not the error you might expect. > What happens is you

Error in django.contrib.comments with {% comment_form_target %}

2008-10-21 Thread Brandon Taylor
Hi everyone, I'm using Django 1.0 and I'm attempting to add comments to a blog, following along in the "Practical Django Projects" book. The error is: Reverse for '' with arguments '()' and keyword arguments '{}' not found. when {% comment_form_target %} is present in the template.

Timing is everything

2008-10-21 Thread Info Cascade
Hey, I'm new to Django. Be nice! Is there some simple way to time the whole Django process, request to response? PHP has something like that. I'd like to include that information in the response. Any ideas? Liam --~--~-~--~~~---~--~~ You received this message

S3Storage, Models, and Files...is this obvious?

2008-10-21 Thread Info Cascade
Hi -- Again, I'm new to Django (and for that matter, Python). I am using the S3Storage module (and currently set default_storage to S3Storage). My model has a FileField which should store the file using S3 (because S3Storage is the default). I am creating an mp3 file using Popen, which is

Reverse error in contrib.comments

2008-10-21 Thread Brandon Taylor
Hi everyone, I'm using Django 1.0 and I'm attempting to add comments to a blog, following along in the "Practical Django Projects" book. The error is: Reverse for '' with arguments '()' and keyword arguments '{}' not found. when {% comment_form_target %} is present in the template.

Can't do any manipulation on a db object

2008-10-21 Thread guruyaya
I'm kinda new to django, and python, so I'm probably gonna make myself look a bit stupid. Here goes anyway: As a simple django (1.0) project, (using python 2.6) I've decided to write a blog application. Here it goes: blog/urls.py -- from django.conf.urls.defaults import *