Re: Row level security

2007-08-20 Thread Sean Perry
On Aug 20, 2007, at 6:41 PM, Catriona wrote: > > Hello > > Is there a way to implement row level security where a user can > determine who can do what to particular records - ie invoices? The > default would be full access only to the creater. > > I am looking at implementing a ContactInvoiveRole

Re: Row level security

2007-08-20 Thread Catriona
Hello Thanks for that Catriona On Aug 21, 12:07 pm, "Kai Kuehne" <[EMAIL PROTECTED]> wrote: > Hi, > > On 8/21/07, Catriona <[EMAIL PROTECTED]> wrote: > > > Is there a way to implement row level security where a user can > > determine who can do what to particular records - ie invoices? The > >

Re: Odd 404 error on Textdrive with Lighty

2007-08-20 Thread RajeshD
On Aug 20, 7:53 pm, "David Merwin" <[EMAIL PROTECTED]> wrote: > http://stpaulswired.org/media/audio/2007/aug/05/straight-from-t/is > teh main one and then derivitaves of the same: > > http://stpaulswired.org/media/audio/2007/aug/05/http://stpaulswired.org/media/audio/2007/aug/ > > Thanks so

Re: Can Django be combined with a more powerful ORM?

2007-08-20 Thread Ben Ford
I had some success mapping SQLAlchemy Table objects to django models, but as Malcolm said if you're starting from scratch, unless you have a really compelling reason to use django models, why not use SA directly? Also, and forgive the tone of this, it's not meant to sound rude, why do you want to

Re: Row level security

2007-08-20 Thread Kai Kuehne
Hi, On 8/21/07, Catriona <[EMAIL PROTECTED]> wrote: > Is there a way to implement row level security where a user can > determine who can do what to particular records - ie invoices? The > default would be full access only to the creater. > > I am looking at implementing a ContactInvoiveRole

Lighttpd conf

2007-08-20 Thread Bakeoh
Does this conf file look right? In particular the fcgi statement fastcgi.server = ( "/mysite.fcgi" => and fastcgi.server = ( "/mysite.fcgi" => ( "main" => ( each is a different django project using a different fastcgi socket.

Row level security

2007-08-20 Thread Catriona
Hello Is there a way to implement row level security where a user can determine who can do what to particular records - ie invoices? The default would be full access only to the creater. I am looking at implementing a ContactInvoiveRole table but wonder if this is the way to go. Thanks

Re: Using the DB Package Outside of Django

2007-08-20 Thread [EMAIL PROTECTED]
Thanks for the help. A little tip for anyone else who wants to do this: put models.py in a package. You can't have models.py in the same directory as the script because django is hard coded to get the model's package at django.db.models.base.py", line 52, in __new___. On Aug 20, 4:57 pm,

HOT HOT HOT!! nude and on cam right now!!!

2007-08-20 Thread [EMAIL PROTECTED]
Local people looking for sex. Talk with them live right now at www.420.irio.net --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Serving large files through HttpResponse

2007-08-20 Thread Graham Dumpleton
If using mod_python, you might also look at Tramline: http://infrae.com/products/tramline This allows a response to set a special header which is then picked up by an Apache output filter, with the output filter then inserting the file contents direct into the output stream. Using Python to

Re: Using the DB Package Outside of Django

2007-08-20 Thread Russell Keith-Magee
On 8/21/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I've looked around and haven't found anything on it. Is there a quick > way of creating a settings.py file and calling Django's DB API to > connect to the database and start using my models? Thanks. Yes:

Re: Odd 404 error on Textdrive with Lighty

2007-08-20 Thread David Merwin
http://stpaulswired.org/media/audio/2007/aug/05/straight-from-t/ is teh main one and then derivitaves of the same: http://stpaulswired.org/media/audio/2007/aug/05/ http://stpaulswired.org/media/audio/2007/aug/ Thanks so much for the help. On 8/20/07, RajeshD <[EMAIL PROTECTED]> wrote: > > > >

Re: Custom primary key using Oracle 10g

2007-08-20 Thread Catriona
Hi Ian Sorry for taking a while to get back to you but I've been away. Thanks for your advice. I will log a bug. I have also found a couple of other issues and will report those as well. Regards Catriona On Aug 16, 3:44 pm, Ian <[EMAIL PROTECTED]> wrote: > On Aug 15, 9:43 pm, Catriona

Re: Odd 404 error on Textdrive with Lighty

2007-08-20 Thread RajeshD
On Aug 20, 6:11 pm, "David Merwin" <[EMAIL PROTECTED]> wrote: > Fixed the 404 template and 500 templates. > > Here is the site wide URLS:http://dpaste.com/hold/17376/ > > Here is the object URLS:http://dpaste.com/hold/17375/ A couple of URLs that give you the 404 error?

Using the DB Package Outside of Django

2007-08-20 Thread [EMAIL PROTECTED]
I've used the template engine of Django in many scripts and I was wondering if there's a simple way of doing the with django.db package. I've already invested a lot of time learning Django's DB API and really like it so it would be great if I can make a models.py file and use those classes in my

Re: Apache does not serve static files from document root

2007-08-20 Thread Peter Melvyn
On 8/20/07, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > Have you read the mod_python documentation on Django site? It gives an > example, which modified for your case would be: > > > SetHandler None > > > The important bit is the SetHandler directive. Have you done that? Yes, I did.

Re: Odd 404 error on Textdrive with Lighty

2007-08-20 Thread David Merwin
Fixed the 404 template and 500 templates. Here is the site wide URLS: http://dpaste.com/hold/17376/ Here is the object URLS: http://dpaste.com/hold/17375/ Lemme know what you see. Just emailed, textdrive. They do not think it is memory related. Thanks, Dave On 8/20/07, RajeshD <[EMAIL

ugettext vs. ugettext_lazy

2007-08-20 Thread Tomas Kopecek
Hello, I've been playing with these functions and finally I've become totally confused. I've expected that there would be some difference in behaviour, but I was not able to create such use case in which these two functions produces different results. More precisely, I haven't find place

Odd behavior of filtering

2007-08-20 Thread Djon
Hi My model is: class Tag(models.Model): name = models.CharField(maxlength=30) class Snippet(models.Model): name = models.CharField(maxlength=30) tags = models.ManyToManyField(Tag,filter_interface=models.HORIZONTAL) My aim to filter snippets according to multiple tag constraints

GoFlow: a workflow engine for django

2007-08-20 Thread MiloZ
Hi, I'm just starting a workflow engine for django, based on Zope2 openflow product. Home: http://django-goflow.blogspot.com/ (in french) Dev trac: https://opensvn.csie.org/traccgi/openflow Take a look, your comments and ideas are welcome. Miloz

db-api optimization

2007-08-20 Thread Grupo Django
Hello, I'm preparing a search form to perform searches against the db (Postgre ). well, Imagine the form with a category field, and a words field. My view is something similar to this: def my_view( request ): items = a_model.objects.all() if request.GET: ... if

Re: What's possible in the admin?

2007-08-20 Thread Rob Hudson
Thanks for both of the great replies, Malcolm and oggie rob. Much appreciated. -Rob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Float Field not displaying the two zeros at the end of a price

2007-08-20 Thread Greg
Jake and Zerek, I will able to fix the problem thanks to your suggestions. It turns out that instead of using 'a.price' I have to use 'a.price.name'. Below is my model code: class Price(models.Model): name = models.DecimalField(max_digits=6, decimal_places=2) price_cat =

Re: Odd 404 error on Textdrive with Lighty

2007-08-20 Thread RajeshD
Hi Dave, > line 72, in find_template_source > raise TemplateDoesNotExist, name > TemplateDoesNotExist: 404.html This is really saying that you do not have a 404.html template defined. Just create a simple 404.html file at the base of your template dir path and add a simple message to it.

Re: Apache does not serve static files from document root

2007-08-20 Thread Graham Dumpleton
On Aug 21, 3:21 am, "Peter Melvyn" <[EMAIL PROTECTED]> wrote: > On 8/20/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > > Not really Django related, so I'll do this briefly... > > Yes, I know. I appreciate your prompt reply. Thanks. > > > In this case you'll probably want to add another

Odd 404 error on Textdrive with Lighty

2007-08-20 Thread David Merwin
I have textdrive account with lightty and flup running. The blog section works great. No problems. However, the audio media (and I suspect other elemets of the same app) generic views are throwing an odd 404 error. It seems that the system is not getting to the django debug. However, it is

Re: Manytomany relation with additional data

2007-08-20 Thread Austin Govella
Sounds like you need to add a Recipes model (table) with a M2M field for the ingredient and a separate column for the percentage. Then your Product table actually has the ability to have more than once recipe for each product. -- Austin Govella Thinking & Making: IA, UX, and IxD

Re: Float Field not displaying the two zeros at the end of a price

2007-08-20 Thread jake
hi greg, Greg wrote: > Jake, > I've made the change to where both of my fields are now of type > DecimalField. However, I'm getting the same error: > > TypeError > float() argument must be a string or a number > Here is what I have is my models file: > > models.DecimalField(max_digits=6,

Re: ImageField via admin

2007-08-20 Thread Carl Karsten
Grigory Fateyev wrote: > Hello Carl Karsten! > On Sun, 19 Aug 2007 21:39:31 -0500 you wrote: > >> Grigory Fateyev wrote: >>> Hello! >>> >>> I have simple class with ImageField, but cann't add any object: >>> >>> class Book(models.Model): >>> name = models.CharField(_('Book Title'),

how to change admin output of fields in editmode?

2007-08-20 Thread G.o.D
i want to change how fields are displayed in admin mode in the edit view. for example: if i use a ImageField, on editmode it says: > Derzeit: images/2007/08/17/preview/preview1.png but i want it to display the image, instead of the path and a link to the image how would one do that? is

Dynamically changing newforms

2007-08-20 Thread Matt
Hello group, I'm trying to build a fairly complicated form submission using newforms, which requires that the form is modified based on information in the model. For example, I've got a couple of models which look like this: class Question(models.Model): questionText =

Re: Django with cmemcache extension issues

2007-08-20 Thread Sasha Weberov
On Aug 19, 12:18 am, Sasha Weberov <[EMAIL PROTECTED]> wrote: > On Aug 18, 10:01 pm, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote: > > > On 8/18/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > ... > > > > however, upon enabled the middlwear with memcached using > > > cmemcached... I've tried >

Money

2007-08-20 Thread Mirko48
www.mirko-banner.5ub.de www.mirko-homepage.5ub.de www.mirko-search.5ub.de --~--~-~--~~~---~--~~ 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: Can Django be combined with a more powerful ORM?

2007-08-20 Thread Aidas Bendoraitis
You can minimize the amount of code writing some special methods for your Player model, i.e.: player = Player.objects.get(...) player.increase("kills", 1) where class Player(..): ... def increase(self, attribute, by_value): current_value = getattr(self, attribute, 0)

Re: Unicode question

2007-08-20 Thread arthur debert
Hi Rob. After the unicode branch merge django expects and produces unicodes objects throughout. A detail how to port guide is here: http://code.djangoproject.com/wiki/UnicodeBranch#PortingApplicationsTheQuickChecklist In this specific case, you can call "lower" directly on your unicode object:

Re: Ajax Form Submission Trouble

2007-08-20 Thread Sasha Weberov
On Aug 19, 3:11 am, Thejaswi Puthraya <[EMAIL PROTECTED]> wrote: > > Thanks a bunch, but would that go into the markup or into the > > comments.js file? I'm a js newb (really bad one). I'm guessing into > > the js file, the submit button doesn't have an id. Here is my current > > comments.js

Re: Apache does not serve static files from document root

2007-08-20 Thread Peter Melvyn
On 8/20/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > Not really Django related, so I'll do this briefly... Yes, I know. I appreciate your prompt reply. Thanks. > In this case you'll probably want to add another Location section before > this one to handle things to WWW-ROOT/bizweb

Re: url issue giving me grief

2007-08-20 Thread wheresdave
Dude, thanx, it just clicked what you were saying. On Aug 20, 7:08 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Mon, 2007-08-20 at 14:00 +, wheresdave wrote: > > [...] > > > > > urls.py > > > from django.conf.urls.defaults import * > > > urlpatterns = patterns('', > >

Re: (1040, 'Too many connections')

2007-08-20 Thread Michel Thadeu Sabchuk
Hi guys, First, thanks for the great help. I read your recomendations and fall on 2 solutions: 1) Upgrade django to version 0.96. I see some people run into problems with mysql (postgresql too), the recomended revision is [5511]. I don ´t work on this project (the site I´m keeping) from the

how to change admin output of fields in editmode?

2007-08-20 Thread G.o.D
i want to change how fields are displayed in admin mode in the edit view. for example: if i use a ImageField, on editmode it says: > Derzeit: images/2007/08/17/preview/preview1.png but i want it to display the image, instead of the path and a link to the image how would one do that? is

Arama yaparak para kazan!

2007-08-20 Thread shadowspain
Arama yaparak para kazan! Hergün google'da yüzlerce kelime aratıyoruz! Google'da arama yaparken bi yandanda para kazanmak istemisiniz! oturduğunuz yerde arama yapmaktan başka bi ekstrası olmadan para kazanmak 2 tık kadar kolay!!! http://www.search-earn.com/shadowspain

Re: how to change admin output of fields in editmode?

2007-08-20 Thread patrickk
the only solution I could think about is using js: 1. detect all image-input-fields 2. extract the value 3. build the image-tag 4. use DOM-manipulation to add the image-tag after the input-field patrick On 20 Aug., 17:07, "G.o.D" <[EMAIL PROTECTED]> wrote: > i want to change how fields are

Unicode question

2007-08-20 Thread Rob Slotboom
After moving to the latest version of Django one of the functions I wrote fails to work. I'll drop the code... def year_cal(sectie, req_year = None, req_month=None): cur_year= str(datetime.datetime.now().year) cur_month= datetime.datetime.now().strftime("%b") all_month_list = ['jan',

Manytomany relation with additional data

2007-08-20 Thread Marcob
Hi all! I think the subject is self explaining. I already know in this case I need to define an intermediary table with two foreign keys and the needed additional fields. Let's imagine this situation: 1) a product table 2) an ingredient table 3) need to link many ingredients (with its percentage)

Re: url issue giving me grief

2007-08-20 Thread wheresdave
well, according to the tutorial i am following (r'^polls/$', 'mysite.polls.views.index'), should not work either. Cause in the tutorial mysite is the project and polls is the application. Just like with mine where Social is the project and network is the application. On Aug 20, 7:08

Re: url issue giving me grief

2007-08-20 Thread Malcolm Tredinnick
On Mon, 2007-08-20 at 14:00 +, wheresdave wrote: [...] > urls.py > > from django.conf.urls.defaults import * > > urlpatterns = patterns('', > (r'^network/$', 'social.network.views.index'), >(r'^accounts/', include('registration.urls')), >(r'^admin/',

url issue giving me grief

2007-08-20 Thread wheresdave
I am going through the tutorial from the site, however I have named my files a bit different. My project is named Social and my application is named Network. settings.py ROOT_URLCONF = 'social.urls' TEMPLATE_DIRS = ( "C:/python25/scripts/social/network/templates/admin",

Re: Float Field not displaying the two zeros at the end of a price

2007-08-20 Thread Jarek Zgoda
Greg napisał(a): > Jake, > No I didn't. When I tried the 'floatformat:2' I made sure that my > model fields were of type FloatField. When I do use the 'floatformat: > 3' and view the template. I notice that in my error message my for > statement is highlighted: > > TypeError at

Can Django be combined with a more powerful ORM?

2007-08-20 Thread Stefan Matthias Aust
As a side-project I tried to port Stellar Crisis 2.2 (a 15 year old browser game written in the C-like langage Pike for the Roxen server) to Django. So far, unfortunately, I failed. It seems, Django isn't the right tool to create such kind of application :( SC keeps all persistent data two

Re: Float Field not displaying the two zeros at the end of a price

2007-08-20 Thread Greg
Jake, I've made the change to where both of my fields are now of type DecimalField. However, I'm getting the same error: TypeError float() argument must be a string or a number Caught an exception while rendering: float() argument must be a string or a number 26 {% for a in thespinfo %}

Re: truncate string after x characters

2007-08-20 Thread Ceph
{{ post.subject|slice:":15"|escape }} does the job. On Aug 20, 6:55 am, patrickk <[EMAIL PROTECTED]> wrote: > thanks. > > since truncatewords and truncatewords_html are predefined filters, I > guess that truncate should also be one (just my opinion). > > patrick > > On 20 Aug., 12:33, Malcolm

fs directory representation

2007-08-20 Thread imgrey
First of all i would like to know if it is exists a way to represent filenames in different encodings with django. Seems i've tried everything, but cannot get rid of UnicodeDecodeError/ UnicodeEncodeError messages. There is my view: from django.shortcuts import render_to_response from

Serving large files through HttpResponse

2007-08-20 Thread Ceph
I'm serving rather large, static files through Django. I'd rather not use renaming trickery to serve them, but I don't know what the best way to serve them through HttpResponse is. I used to use this: response = HttpResponse(iter(open(file_path, "rb"))) return response in my view. That stopped

Re: Mod_Python and Apache

2007-08-20 Thread Graham Dumpleton
On Aug 20, 5:13 pm, Sasha Weberov <[EMAIL PROTECTED]> wrote: > On Aug 20, 12:13 am, Graham Dumpleton <[EMAIL PROTECTED]> > wrote: > > > > > On Aug 20, 3:01 pm, Sasha Weberov <[EMAIL PROTECTED]> wrote: > > > > Is it normal to experience a sudden sharp spike in cpu and memory > > > usage for about

Re: truncate string after x characters

2007-08-20 Thread patrickk
thanks. since truncatewords and truncatewords_html are predefined filters, I guess that truncate should also be one (just my opinion). patrick On 20 Aug., 12:33, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Mon, 2007-08-20 at 11:52 +0200, patrickk wrote: > > how do I truncate a string

Re: emulating an existing session in tests

2007-08-20 Thread omat
I am using the api via shell (i.e.: python manage.py shell) as follows: >>> from django.contrib.sessions.middleware import SessionWrapper >>> from django.test.client import Client >>> c = Client() >>> s = SessionWrapper('8a3dd9235b8e718c3f7e890106180528') >>> c.session = s._session >>> c.session

Re: truncate string after x characters

2007-08-20 Thread Malcolm Tredinnick
On Mon, 2007-08-20 at 11:52 +0200, patrickk wrote: > how do I truncate a string (in the template) after a certain amount > of characters? > I know there´s a truncate-filter, but it works with words and not > characters. There's #5025 in Trac. This shouldn't be seen as any endorsement for

Re: truncate string after x characters

2007-08-20 Thread Stefan Matthias Aust
2007/8/20, patrickk <[EMAIL PROTECTED]>: > how do I truncate a string (in the template) after a certain amount > of characters? It's not difficult to create custom filters. For example from django.template import Library register = Library() @register.filter def truncate(value, arg): try:

Re: emulating an existing session in tests

2007-08-20 Thread Malcolm Tredinnick
On Mon, 2007-08-20 at 09:57 +, omat wrote: > Thanks for the reply... > > I used the existing database instead of the test database to hook to > the user's session like this: > > from django.test.client import Client > from django.contrib.sessions.models import Session > > client = Client()

truncate string after x characters

2007-08-20 Thread patrickk
how do I truncate a string (in the template) after a certain amount of characters? I know there´s a truncate-filter, but it works with words and not characters. thanks, patrick --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: Attribute Error

2007-08-20 Thread MikeHowarth
Guys I spent quite a while yesterday reading through the newforms section of the docs, and thought I'd taken everything in. As a python novice, I wrote a test script and couldn't replicate the error, so was beginning to wonder whether I was cracking up! After reading Malcolm's (comprehensive)

Re: Mod_Python and Apache

2007-08-20 Thread Sasha Weberov
On Aug 20, 12:13 am, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > On Aug 20, 3:01 pm, Sasha Weberov <[EMAIL PROTECTED]> wrote: > > > Is it normal to experience a sudden sharp spike in cpu and memory > > usage for about a minute or so after a start/stop and restart? I'm > > running the pre-fork