Re: Block delete

2009-04-17 Thread koranthala
On Apr 18, 1:26 am, koranthala wrote: > On Apr 18, 1:08 am, Alex Gaynor wrote: > > > > > On Fri, Apr 17, 2009 at 4:05 PM, koranthala wrote: > > > > On Apr 17, 11:57 pm, koranthala wrote: > > > > On Apr

Re: Unittests

2009-04-17 Thread Alex Gaynor
On Sat, Apr 18, 2009 at 12:31 AM, Russell Keith-Magee < freakboy3...@gmail.com> wrote: > > On Sat, Apr 18, 2009 at 8:06 AM, Daniel Joshua Worth > wrote: > >> No - please don't. The Django docs explicitly state that Django's test > >> framework is based on Python's

Re: Unittests

2009-04-17 Thread Russell Keith-Magee
On Sat, Apr 18, 2009 at 8:06 AM, Daniel Joshua Worth wrote: >> No - please don't. The Django docs explicitly state that Django's test >> framework is based on Python's unittest and doctest frameworks, and >> provides links to the docs for those frameworks. It's not our

Re: Authenication for django.views.generic Views

2009-04-17 Thread James Bennett
On Thu, Apr 16, 2009 at 3:04 PM, Col Wilson wrote: > Thanks all. I have some reading to do, but I have also noticed in the > meantime that generic views docs (http://docs.djangoproject.com/en/dev/ > ref/generic-views/#ref-generic-views) have a hook into the auth

Re: how to create some application variable for django

2009-04-17 Thread forrest yang
could any one provide some tips On Apr 17, 6:02 pm, forrest yang wrote: > session would be created esaily, but could django create some > application variable like asp.net , or provide some special function > for the different period of server, on_server_start() >

Re: Unittests

2009-04-17 Thread Daniel Joshua Worth
> > No - please don't. The Django docs explicitly state that Django's test > framework is based on Python's unittest and doctest frameworks, and > provides links to the docs for those frameworks. It's not our place to > including "how to use unittest" or "how to use doctest" documentation, > as we

Re: Unittests

2009-04-17 Thread Russell Keith-Magee
On Sat, Apr 18, 2009 at 5:32 AM, Alex Gaynor wrote: > > On Fri, Apr 17, 2009 at 5:28 PM, Daniel Joshua Worth > wrote: >> >> Of course that worked. I would like to put a plug in for adding that the >> tests need to begging with test in the docs.

template fails silent when passing form object

2009-04-17 Thread J. Williams
hi All, So I was beating my head against this problem for a couple of hours, and when I finally found out what I was doing wrong, I beat my self some more for over looking such a simple mistake.  I was starting a new app, and was adding a form to my view, and then passing this form to the

Re: Unittests

2009-04-17 Thread Alex Gaynor
On Fri, Apr 17, 2009 at 5:28 PM, Daniel Joshua Worth wrote: > Of course that worked. I would like to put a plug in for adding that the > tests need to begging with test in the docs. Would have saved me some > trouble. Thank you guys so much for your help. > > Daniel

Re: Unittests

2009-04-17 Thread Daniel Joshua Worth
Of course that worked. I would like to put a plug in for adding that the tests need to begging with test in the docs. Would have saved me some trouble. Thank you guys so much for your help. Daniel Worth --~--~-~--~~~---~--~~ You received this message because you

Re: Unittests

2009-04-17 Thread google torp
Well the docs use camel case for tests, so figured that was the convention in Django. But the there are also some other places where Django doesn't quite follow the rules, like using _ in some of the HTML it generates. Maybe that part of the docs should be cleaned up, I always thought camel cases

Re: Anyone else having issues with saving M2M in trunk?

2009-04-17 Thread Brandon Taylor
Ugh. My pastie was bad - had multiple versions of the same file open, and didn't get the most recent one: http://dpaste.com/34983/ On Apr 17, 3:54 pm, Brandon Taylor wrote: > Hi Alex, > > Thanks for the reply. Here's the link:http://dpaste.com/34979/ > > b > > On Apr

Re: Anyone else having issues with saving M2M in trunk?

2009-04-17 Thread Brandon Taylor
Sorry Alex, my bad. I see the error. Doh! On Apr 17, 3:54 pm, Brandon Taylor wrote: > Hi Alex, > > Thanks for the reply. Here's the link:http://dpaste.com/34979/ > > b > > On Apr 17, 3:50 pm, Alex Gaynor wrote: > > > On Fri, Apr 17, 2009 at 4:48

Re: Anyone else having issues with saving M2M in trunk?

2009-04-17 Thread Brandon Taylor
Hi Alex, Thanks for the reply. Here's the link: http://dpaste.com/34979/ b On Apr 17, 3:50 pm, Alex Gaynor wrote: > On Fri, Apr 17, 2009 at 4:48 PM, Brandon Taylor > wrote: > > > > > Hi everyone, > > > I have an abstract model called Page. Two

Re: Anyone else having issues with saving M2M in trunk?

2009-04-17 Thread Alex Gaynor
On Fri, Apr 17, 2009 at 4:48 PM, Brandon Taylor wrote: > > Hi everyone, > > I have an abstract model called Page. Two classes inherit this, and > there is a ManyToMany field on Page. syncdb is creating the > intermediary tables correctly, and admin shows me the correct

Anyone else having issues with saving M2M in trunk?

2009-04-17 Thread Brandon Taylor
Hi everyone, I have an abstract model called Page. Two classes inherit this, and there is a ManyToMany field on Page. syncdb is creating the intermediary tables correctly, and admin shows me the correct values to the related model. But, when I go to save the record, none of the m2m data is

Re: Queries, how to get what i want?

2009-04-17 Thread google torp
Hi. Glad it worked out. You can't use [0] when using get as it retrives an object. You can use it when you use filter as it returns a queryset instead. That was my point, but using exclude before get is fine aswell. ~Jakob On Apr 17, 8:13 am, zayatzz wrote: > Thanks

Re: Unittests

2009-04-17 Thread Alex Gaynor
On Fri, Apr 17, 2009 at 4:26 PM, google torp wrote: > > Hi. > You have named your test incorectly, so django won't see it as a test. > You need to name testCamelCaseName. Camel cases are probably not > required but that's the convention. Try renaming your test. > > ~Jakob > >

Re: Unittests

2009-04-17 Thread google torp
Hi. You have named your test incorectly, so django won't see it as a test. You need to name testCamelCaseName. Camel cases are probably not required but that's the convention. Try renaming your test. ~Jakob On Apr 17, 9:04 pm, Daniel Joshua Worth wrote: > If I run

Re: Block delete

2009-04-17 Thread koranthala
On Apr 18, 1:08 am, Alex Gaynor wrote: > On Fri, Apr 17, 2009 at 4:05 PM, koranthala wrote: > > > On Apr 17, 11:57 pm, koranthala wrote: > > > On Apr 17, 11:51 pm, Alex Gaynor wrote: > > > > > On Fri,

Re: Block delete

2009-04-17 Thread Alex Gaynor
On Fri, Apr 17, 2009 at 4:05 PM, koranthala wrote: > > > > On Apr 17, 11:57 pm, koranthala wrote: > > On Apr 17, 11:51 pm, Alex Gaynor wrote: > > > > > > > > > On Fri, Apr 17, 2009 at 2:47 PM, koranthala

Re: DjangoBook help Chapter 7

2009-04-17 Thread J. Cliff Dyer
On Fri, 2009-04-17 at 12:45 -0700, LeeRisq wrote: > Hey all, > > Thanks for reading. I have gone over and over the section first half > of the chapter about having a simple search form. Here are my views: > > from django.shortcuts import render_to_response > from mysite.books.models import Book

Re: Block delete

2009-04-17 Thread koranthala
On Apr 17, 11:57 pm, koranthala wrote: > On Apr 17, 11:51 pm, Alex Gaynor wrote: > > > > > On Fri, Apr 17, 2009 at 2:47 PM, koranthala wrote: > > > > Hi, > > >    I am facing a problem which I believe should be a usual issue

DjangoBook help Chapter 7

2009-04-17 Thread LeeRisq
Hey all, Thanks for reading. I have gone over and over the section first half of the chapter about having a simple search form. Here are my views: from django.shortcuts import render_to_response from mysite.books.models import Book def search_form(request): return

Re: django-grappelli setup problem

2009-04-17 Thread Lars Stavholm
patrickk wrote: > # stable release: > an "official release" won´t be there until reordering of edit-inlines > is possible. > we are using grappelli for most of our clients - so I´m considering > the trunk "stable". with stable I mean that for all _our_ usecases it > works fine. bookmarks &

Re: Unittests

2009-04-17 Thread Daniel Joshua Worth
If I run "./manage.py tests booking" it returns ok but says it ran 0 tests so I'm obviously not doing something right if it's not running the test at all. I keep reading the docs but it's not coming to me what I messed up. --~--~-~--~~~---~--~~ You received this

Re: Block delete

2009-04-17 Thread koranthala
On Apr 17, 11:51 pm, Alex Gaynor wrote: > On Fri, Apr 17, 2009 at 2:47 PM, koranthala wrote: > > > Hi, > >    I am facing a problem which I believe should be a usual issue for > > everyone. But I cannot find a way to do it in a straightforward > >

Re: Block delete

2009-04-17 Thread Alex Gaynor
On Fri, Apr 17, 2009 at 2:47 PM, koranthala wrote: > > Hi, >I am facing a problem which I believe should be a usual issue for > everyone. But I cannot find a way to do it in a straightforward > manner. > I have to select a list of items from table A and delete

Block delete

2009-04-17 Thread koranthala
Hi, I am facing a problem which I believe should be a usual issue for everyone. But I cannot find a way to do it in a straightforward manner. I have to select a list of items from table A and delete everyone of them. Now, there are close to 20K elements which I want to delete. So, what I

Re: Running django test suite

2009-04-17 Thread jeffhg58
Karen, Thanks so much for the explanation! Actually, I was incorrect I used the development version via SVN revision 10369. I just downloaded the latest version today. Also, I missed putting in the first error, a cut and paste problem. I included all the 3 errors are included here

Re: Clean URL Design: List Views and Details Views

2009-04-17 Thread birkin
On Apr 16, 9:29 am, Aidas Bendoraitis wrote: > ...and there should be either a black list of words for > like del.ici.ous and flickr.com does, or there > should be another way to differentiate between slugs and > controlling words... This may be obvious, but in

Re: How do I exclude a list from my search?

2009-04-17 Thread Alex Gaynor
On Fri, Apr 17, 2009 at 1:02 PM, Thierry wrote: > > Can someone tell me the equivalent QuerySet for the following sql: > > select city_name > from city > where city_name not in ('Toronto', 'Richmond', 'Montreal') > > From the python code, I will like to store the above 3

How do I exclude a list from my search?

2009-04-17 Thread Thierry
Can someone tell me the equivalent QuerySet for the following sql: select city_name from city where city_name not in ('Toronto', 'Richmond', 'Montreal') >From the python code, I will like to store the above 3 cities in a list. --~--~-~--~~~---~--~~ You received

Re: Serving Static Files - Pics work, but CSS doesn't

2009-04-17 Thread Anthony
Sure thing: === # Django settings for my project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_em...@domain.com'), ) MANAGERS = ADMINS DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.

Re: get value in session when concurrency request

2009-04-17 Thread James
I think (in v 1.0) you can call session_store.save() -- I'm guessing that it will save immediately, but I'm not sure: http://docs.djangoproject.com/en/dev/topics/http/sessions/?from=olddocs#using-sessions-out-of-views On Apr 16, 10:06 pm, leopay wrote: > at first session["a"]

Re: TreePanel in Django

2009-04-17 Thread Eduardo Aragon
Thank buddie...I'll try out On 14 abr, 16:43, Peter Herndon wrote: > I've done something similar using jquery and the dynatree plugin, > though the directory "structure" doesn't actually exist on the file > system of the server.  I'm building my tree from relationships

Re: Django doesn't validates CharFields before gitting the DB?

2009-04-17 Thread Horacio de Oro
> > What database backend are you using?. postgresql_psycopg2 On Apr 17, 12:51 pm, Horacio de Oro wrote: > > What database backend are you using?. > > PostgreSQL 8.3 > > > Can you see what's the actual DLL definition of the image_content_type > > field? (i.e. does it

Re: Django doesn't validates CharFields before gitting the DB?

2009-04-17 Thread Horacio de Oro
> > What database backend are you using?. > PostgreSQL 8.3 > Can you see what's the actual DLL definition of the image_content_type > field? (i.e. does it contain 'NULL' or 'NON NULL'). > The DLL is OK: CREATE TABLE "myprojects_simplemodelc" ( "id" serial NOT NULL PRIMARY KEY, "name"

Re: Running django test suite

2009-04-17 Thread Karen Tracey
On Thu, Apr 16, 2009 at 1:26 PM, jeffhg58 wrote: > > I recently installed django 1.1 beta and I needed to run the django > test suite. So, under the tests directory I executed runtests.py. I > received some errors when trying to execute all the tests. I was > expected that

Re: Creating menu from self-nested list

2009-04-17 Thread Ricardob
No help? --~--~-~--~~~---~--~~ 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

Re: Django ImageField url not relative to MEDIA_ROOT

2009-04-17 Thread Christian Berg
Hello! The ImageField and FileField URLs are relative to MEDIA_URL It's important to skip the leading slash, and add an slash to the end of the path Attribute. example: image = models.Imagefield(path="images/") In the Template use {{MEDIA_URL}}{{image.url}} On Fri, 17 Apr 2009 08:00:39 -0700

Re: Django ImageField url not relative to MEDIA_ROOT

2009-04-17 Thread SashaN
I'm hitting same problem. It seems to me it is a bug in django. --~--~-~--~~~---~--~~ 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

Registration

2009-04-17 Thread TP
Hi I have a HTML website and im looking to use Django-registration with it. I have downloaded the registration app, but cannot see how I add it to my already made website. Any help would be great. --~--~-~--~~~---~--~~ You received this message because you are

Re: Django doesn't validates CharFields before gitting the DB?

2009-04-17 Thread Ramiro Morales
On Fri, Apr 17, 2009 at 1:58 AM, Horacio de Oro wrote: > > Hi! I've a problem with Django not validating my 'CharField's. Maybe > I'm misunderstanding the docs, and Django doesn't do this kind of > validations? > > I've made a simple example. This is the model: > > class

Django admin custom forms - do i need them?

2009-04-17 Thread zayatzz
Hello Thanks to several people in these forums i've managed to understand how to make django queries when it comes to generic relations and how to manage those objects in django admin. Now my problems start getting more specific. I have 3 models - polls, questions and choices that are related

Re: newbie: syncdb doesnt update schema after model change?

2009-04-17 Thread JL
What you're trying to do is called "Schema migration" or "evolution" there's been a lot of talk of it in the past. I recommend the South project for evolution. Very very flexible. Check it out here: http://south.aeracode.org/ On Apr 17, 1:30 am, Rama Vadakattu

Re: ..... in templates

2009-04-17 Thread Christian Berg
To shorten this: You need a solid understanding of what HTML is and how the Internet works, to write Webapplications, or dynamic webpages. Try this: http://www.w3schools.com/html/DEFAULT.asp As soon as you understand what this means, and as soon as you can create a small and ugly - static -

Re: Query to retrieve users from a given group

2009-04-17 Thread Matthias Kestenholz
On Fri, Apr 17, 2009 at 3:18 PM, Daniel Roseman wrote: > > On Apr 17, 1:23 pm, Bastien wrote: >> Hi, >> >> I'm trying to retrieve a list of users belonging  to a given group but >> don't understand how to do it. It must be a sort of

Re: Fieldlookup: NOT

2009-04-17 Thread Matthias Kestenholz
On Thu, Apr 16, 2009 at 3:56 PM, Thomas Guettler wrote: > > Hi, > > > For forms which display a list of results I use: >    form=QueryForm(request.GET) >     >    queryset=MyModel.objects.filter(**form.cleaned_data) > > But, now I need to use exclude() instead of filter().

Re: ..... in templates

2009-04-17 Thread Daniel Roseman
On Apr 17, 2:38 pm, 83nini <83n...@gmail.com> wrote: > I'm looking at the following code from thewww.djangobook.com: > > > Ordering notice > > > > Ordering notice > > Dear {{ person_name }}, > > Thanks for placing an order from {{ company }}. It's scheduled to > ship on {{ ship_date|date:"F j,

Re: ..... in templates

2009-04-17 Thread 83nini
ah! I'm new to this stuff and i wonder why it's not mentioned in the beginners book that i'm reading!!! On 17 Apr, 15:40, Daniel Roseman wrote: > On Apr 17, 2:38 pm, 83nini <83n...@gmail.com> wrote: > > > > > > > I'm looking at the following code from

Re: {{perms}} is not displaying on template

2009-04-17 Thread Praveen
I solved my problem. i was calling wrong template. On Apr 17, 6:09 pm, Praveen wrote: > def myfunc(request, event_id): >         context_instance=RequestContext(request) >         print "Context", context_instance ### Context: [{'perms': > , > 'messages': [],

..... in templates

2009-04-17 Thread 83nini
I'm looking at the following code from the www.djangobook.com : Ordering notice Ordering notice Dear {{ person_name }}, Thanks for placing an order from {{ company }}. It's scheduled to ship on {{ ship_date|date:"F j, Y" }}. Here are the items you've ordered: {% for item in item_list %}

Re: Query to retrieve users from a given group

2009-04-17 Thread Bastien
Thanks Daniel, it works! On Apr 17, 3:18 pm, Daniel Roseman wrote: > On Apr 17, 1:23 pm, Bastien wrote: > > > > > > > Hi, > > > I'm trying to retrieve a list of users belonging  to a given group but > > don't understand how to do it.

Django Presentation & Slides

2009-04-17 Thread Christian Berg
Hello World! I'm doing a django presentation in Austria/Eisenstadt, on Fr. 08th May 2009. It's part auf the "Linuxwochen Eisenstadt" See http://linuxwochen.at/index.php?option=com_content=article=42=9 for details. There are a few weeks left for planning and i'm currently doing some Slides with

Re: Query to retrieve users from a given group

2009-04-17 Thread Daniel Roseman
On Apr 17, 1:23 pm, Bastien wrote: > Hi, > > I'm trying to retrieve a list of users belonging  to a given group but > don't understand how to do it. It must be a sort of many to many query > but I can't get it to work. > > I would like to do something like this: > >

{{perms}} is not displaying on template

2009-04-17 Thread Praveen
def myfunc(request, event_id): context_instance=RequestContext(request) print "Context", context_instance ### Context: [{'perms': , 'messages': [], 'user': }, {}] return render_to_response('test.html', {'user':request.user},context_instance=RequestContext(request)) in

Custom fields display

2009-04-17 Thread nelson
Hi all, I'ìm trying to use json encoding to pass data from a django view to a jquery based grid template. I have a model like this class Client(models.Model): name = models.CharField('Nome', max_length=30) surname = models.CharField('Cognome', max_length=30) def

Re: Comma instead of dot in FloatField

2009-04-17 Thread Knut Nesheim
Hi Aidas, 17 apr 2009 kl. 13.01 skrev Aidas Bendoraitis [aka Archatas]: > Actually, what would help you here is custom model field + form field > + widget. > > For example, the following combination based on Babel (http:// > babel.edgewall.org/) could be used: This looks like a great

Re: Clean URL Design: List Views and Details Views

2009-04-17 Thread Col Wilson
/products/by-popularity/ /products/featured/ /products/page/5/ /products/add/ /products/elvis/ /product/in-the-ghetto/ /product/jail-house-rock/ /product/love-me-tender/ On Apr 16, 2:29 pm, Aidas Bendoraitis wrote: > Hello, > > Recently, we are solving a conceptual

Query to retrieve users from a given group

2009-04-17 Thread Bastien
Hi, I'm trying to retrieve a list of users belonging to a given group but don't understand how to do it. It must be a sort of many to many query but I can't get it to work. I would like to do something like this: basic_users_list = User.objects.filter(groups__in=Group.objects.get

Re: Fieldlookup: NOT

2009-04-17 Thread Thomas Guettler
Christian Joergensen schrieb: > Thomas Guettler wrote: >> Hi, >> >> >> For forms which display a list of results I use: >> form=QueryForm(request.GET) >> >> queryset=MyModel.objects.filter(**form.cleaned_data) >> >> But, now I need to use exclude() instead of filter(). > > >> I

how to create some application variable for django

2009-04-17 Thread forrest yang
session would be created esaily, but could django create some application variable like asp.net , or provide some special function for the different period of server, on_server_start() on_application_start() or something like that? --~--~-~--~~~---~--~~ You

Re: Clean URL Design: List Views and Details Views

2009-04-17 Thread Philipp Bosch
I agree on that it's not a good ideo to have actions in GET parameters. For things like sorting, pagination and the like it's propably a good idea because you are only changing the view on the same data. But "add" is a completely new thing. In HTTP terms it should propably be a PUT request to

Re: Insert insetad edition with model form

2009-04-17 Thread Dmitry Teslenko
Problem finally solved. I have same form action field for both edit/create new: {{ form.as_p }} -- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail?

Re: proposal to allow loaddata to read from stdin [was: manage.py loaddata fails to report error]

2009-04-17 Thread Russell Keith-Magee
On Fri, Apr 17, 2009 at 3:56 PM, Phil Mocek wrote: > > However, due to long-standing conventions, the filename suffix > ("extension" in MS-DOS parlance) often provides a clue about the format > of the data within.  These conventions allow loaddata to make a >

Re: .py!

2009-04-17 Thread Phil Edwards
Ionut G. Stan wrote: > I guess you're coding in Notepad, in which case I'd recommend to look > for another editor. Yup - my favourite for code editing on Windows is PSPad. Free download from here: http://www.pspad.com/en/ Compatible with XP, Vista and Windows7 -- Regards Phil Edwards

For loop over integers rather than list within Django template

2009-04-17 Thread Martin Brochhaus
A while ago I needed a loop like "for(int i=0; i<20; i++)" within a Django template. Since the builtin for-loop only iterates over lists and since there was no appropriate template filter, I created a custom one. To me it seems as if this technique isn't well known to many users as you can see

Re: Comma instead of dot in FloatField

2009-04-17 Thread Aidas Bendoraitis [aka Archatas]
Hi Knut, Actually, what would help you here is custom model field + form field + widget. For example, the following combination based on Babel (http:// babel.edgewall.org/) could be used: class DecimalWidget(forms.TextInput): def render(self, name, value, attrs=None):

Re: How can I create a Python source code file? [was: .py!]

2009-04-17 Thread 83nini
thanks for the useful notes guys, you are really of great help. oh and Phil, i will pay attention to the subject next time i post something :) On 17 Apr, 10:28, Phil Mocek wrote: > On Fri, Apr 17, 2009 at 12:53:29AM -0700, 83nini wrote: > > guys how do i

Re: .py!

2009-04-17 Thread Ionut G. Stan
I guess you're coding in Notepad, in which case I'd recommend to look for another editor. By the way, if you want to be able to change file extensions on Windows, open a Windows Explorer window, then go to Tools -> Folder Options -> View tab -> uncheck "Hide extension for known file types".

How can I create a Python source code file? [was: .py!]

2009-04-17 Thread Phil Mocek
On Fri, Apr 17, 2009 at 12:53:29AM -0700, 83nini wrote: > guys how do i create a .py file? > > I am working on the tutorial and i don't know how to create views.py First, for your own good and that of other subscribers to this mailing list, please see Eric S. Raymond's essay, "How To Ask

Re: .py!

2009-04-17 Thread BraneSKS
It depends on your operating system but usually, right-click > rename > type what you want. On Apr 17, 2009, at 2:22 AM, 83nini wrote: > > thanks, i guessed that but the question is how to change the > extension? > > On 17 Apr, 10:11, Wayne Koorts wrote: >>> guys how do

Re: .py!

2009-04-17 Thread 83nini
thanks, i guessed that but the question is how to change the extension? On 17 Apr, 10:11, Wayne Koorts wrote: > > guys how do i create a .py file? > > stupid question i know, but i'm new to django. > > I am working on the tutorial and i don't know how to create views.py > >

Re: .py!

2009-04-17 Thread Wayne Koorts
> guys how do i create a .py file? > stupid question i know, but i'm new to django. > I am working on the tutorial and i don't know how to create views.py It's just a plain text source code file with a .py extension, nothing special. Any text editor should do the trick. Regards, Wayne

get value in session when concurrency request

2009-04-17 Thread leopay
at first session["a"] is oldvalue, request A set session["a"] to newvalue, before session.save to db,(as in django, the session save action occur at end of the request), meanwhile, request B arrive, but get session["a"] is still the oldvalue, how to handle this?

how to access and sort by data from intermediary tables in templates

2009-04-17 Thread DaleB
hi all, i have a (probably quite simple) problem concerning the use of intermediary tables. i am trying to create a list of users. users are members of different groups and within these groups they can have several positions/status (e.g. management, staff member, e.g.). my models look like

Re: Admin widget for filter_vertical and filter_horizontal slow

2009-04-17 Thread maco
Thanks, that's a nice workaround. I'll give it a thought. Having a input filed widget instead of select plus some JS for suggested search. I use jquery.liveSearch.js allready on a title in my model. On 16 apr., 17:01, Christopher Dodd wrote: > Yeah, this is a known

Re: Comma instead of dot in FloatField

2009-04-17 Thread julianb
On Apr 17, 9:04 am, Knut Nesheim wrote: > Hi all, > > I have a model with several FloatFields. Based on this, ModelForm   > creates some form.FloatFields.These fields require the user to type   > '3.2' instead of '3,2', which is the custom here(Sweden). We need to   > allow

proposal to allow loaddata to read from stdin [was: manage.py loaddata fails to report error]

2009-04-17 Thread Phil Mocek
On Thu, Apr 16, 2009 at 04:04:29PM +0800, Russell Keith-Magee wrote: > The problem with loading a fixture from stdin is that you have no idea > what format that fixture is. Currently, fixture format is detected > from the filename extension It's impossible to detect anything about the content

.py!

2009-04-17 Thread 83nini
guys how do i create a .py file? stupid question i know, but i'm new to django. I am working on the tutorial and i don't know how to create views.py thanks in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: django-grappelli setup problem

2009-04-17 Thread patrickk
# stable release: an "official release" won´t be there until reordering of edit-inlines is possible. we are using grappelli for most of our clients - so I´m considering the trunk "stable". with stable I mean that for all _our_ usecases it works fine. bookmarks & navigation is pretty new, so there

Comma instead of dot in FloatField

2009-04-17 Thread Knut Nesheim
Hi all, I have a model with several FloatFields. Based on this, ModelForm creates some form.FloatFields.These fields require the user to type '3.2' instead of '3,2', which is the custom here(Sweden). We need to allow the comma somehow, for obvious usability reasons. My first thought was

Re: manage.py loaddata fails to report error (#10849)

2009-04-17 Thread Phil Mocek
On Thu, Apr 16, 2009 at 04:04:29PM +0800, Russell Keith-Magee wrote: > On Thu, Apr 16, 2009 at 11:30 AM, Phil Mocek wrote: > > The built-in usage help shows that the filename argument (called a > > fixture for reasons that I have not yet researched) is mandatory: > > > >Usage: manage.py

Re: newbie: syncdb doesnt update schema after model change?

2009-04-17 Thread Rama Vadakattu
OR you can use django-evolutions which evolves the database schema in sync with the models. More details at : http://code.google.com/p/django-evolution/ On Apr 17, 10:29 am, zayatzz wrote: > If the tables of this app hold no info, then you can do python > manage.py

Re: Django doesn't validates CharFields before gitting the DB?

2009-04-17 Thread Daniel Roseman
On Apr 17, 5:58 am, Horacio de Oro wrote: > Hi! I've a problem with Django not validating my 'CharField's. Maybe > I'm misunderstanding the docs, and Django doesn't do this kind of > validations? > > I've made a simple example. This is the model: > > class

Strange inconsistency between SQL and ORM with SQLite.

2009-04-17 Thread Tai Lee
I'm trying to add an extra selection to a queryset, `featured`, which should be True (or 1) if the primary key matches a number of known values. It appears to work as expected both in SQL and the ORM when matching against a single value. When I try matching against multiple values, I get the

Re: django-grappelli setup problem

2009-04-17 Thread Lars Stavholm
patrickk wrote: > I´m working with the request-context-processor. I´ll change that for > the user (because the auth-processor is required for the admin > anyway). nevertheless, without the request-processor, bookmarks > probably doesn´t work. > > simple fix: > just add

Re: Queries, how to get what i want?

2009-04-17 Thread zayatzz
Thanks using [0] after objects.get(something=something) gives an error though. But writing it like this: q = ContentType.objects.get_for_model(self) z = Trans.objects.exclude(keel=2).get(content_type__pk=q.id, object_id=self.id) t = z.name