Django Certifications

2009-03-05 Thread Praveen
Is there any Django certification as others like SCJP, MCSE, CCNA and more on? --~--~-~--~~~---~--~~ 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 T

Re: Cherrypy and view variables caching?

2009-03-05 Thread John M
Well, given my example, i would think it does. I put the generic's in the URL.PY file and it's not performing as planned, I'm not sure how I would keep the generic view inside the URL and get what I want? Either way, doesn't matter, I'm going to put all 'view' code into views.py eitherway. J O

ImportError: Could not import settings '.settings'.

2009-03-05 Thread Ishwor Gurung
Hi I want to run this django app I wrote called wikinotes (its a modified version of note application to maintain user single user session [1]) for simple note taking. While the wikinotes works absolutely correctly using "python manage.py runserver", it fails to work if i use it with Apache and mod

Figuring out what has changed at save()

2009-03-05 Thread hanks...@gmail.com
Sorry for the unwieldy title, but nothing else strikes me at the moment. I have a blog app -- a version of basic.blog, actually. There's a field in the model called "status" with two options: "draft" and "public." What I want to do is trigger an action the first time (and /only/ the first time)

Re: formset initialization question

2009-03-05 Thread Margie
Ok - so one more day of working through this did the trick and I got through all of my issues and am successfully using modelformset, both when creating new objects and when editing existing ones. I thought I'd recap here in case anyone is searching for formset info, and also to give any develope

Re: manage.py test doesn't run tests

2009-03-05 Thread Malcolm Tredinnick
On Thu, 2009-03-05 at 19:46 -0800, saeb wrote: > In App1 > import pdb > import unittest > from django.test.client import Client > > class ShortTest(unittest.TestCase): > def add_test(self): > a = 1 > b = 1 > self.assertEqual(a,b) > > > This is my

Re: manage.py test doesn't run tests

2009-03-05 Thread saeb
In App1 import pdb import unittest from django.test.client import Client class ShortTest(unittest.TestCase): def add_test(self): a = 1 b = 1 self.assertEqual(a,b) This is my short test and I see the same issue ...manage.py test doesn't run

Re: GenericTabularInline always looking for "object_id"

2009-03-05 Thread b.degee...@f5.com
Looks like the trick is to use the correct variable. ct_fk_name is bad. ct_fk_field is good. :) On Mar 5, 7:13 am, "sixarm...@gmail.com" wrote: > I've been able to successfully setup the tagging.models.TaggedItem as > aGenericTabularInlinefor my django admin interface. > > When I try to do th

Re: Django Resource Usage

2009-03-05 Thread Graham Dumpleton
On Mar 6, 1:24 pm, Malcolm Tredinnick wrote: > On Thu, 2009-03-05 at 18:08 -0800, Paulo wrote: > > Hi > > > I want to install Django on my webserver, but i would like to know > > from you if django has an intense resource usage (memory, cpu) or it's > > not a concern? > > As always, it depends

Re: Cherrypy and view variables caching?

2009-03-05 Thread Malcolm Tredinnick
On Thu, 2009-03-05 at 18:32 -0800, John M wrote: > Malcolm, thanks for the reply and I figured that was my issue. > > Which leads me to another question, does everyone put all view code > into views.py even though a simple generic view is all that's used? That question doesn't really make sense.

Re: Cherrypy and view variables caching?

2009-03-05 Thread John M
Malcolm, thanks for the reply and I figured that was my issue. Which leads me to another question, does everyone put all view code into views.py even though a simple generic view is all that's used? THanks again John On Mar 5, 4:05 pm, Malcolm Tredinnick wrote: > On Thu, 2009-03-05 at 14:54 -

Re: Django Resource Usage

2009-03-05 Thread Malcolm Tredinnick
On Thu, 2009-03-05 at 18:08 -0800, Paulo wrote: > Hi > > I want to install Django on my webserver, but i would like to know > from you if django has an intense resource usage (memory, cpu) or it's > not a concern? As always, it depends on what you're doing. There simply *cannot* be any general a

Django Resource Usage

2009-03-05 Thread Paulo
Hi I want to install Django on my webserver, but i would like to know from you if django has an intense resource usage (memory, cpu) or it's not a concern? I'm planning to install it on some shared web servers and need to know this information, because i don't want to slow down performance on th

Re: Overriding the HTML id in ModelForm

2009-03-05 Thread Eric Abrahamsen
On Mar 5, 2009, at 11:14 AM, Alex Gaynor wrote: > > On 3/4/09, Eric Abrahamsen wrote: >> >> >> On Mar 5, 2009, at 8:05 AM, Romain wrote: >> >>> >>> Hello, >>> >>> On the same page I have 2 ModelForm that happen to have an attribute >>> with the same name. Is it possible to choose the name of th

Re: Django Pluggable application for invoicing / accounts?

2009-03-05 Thread Malcolm Tredinnick
On Thu, 2009-03-05 at 16:23 -0800, John Boxall wrote: > Hey everyone, > > I'm building a Django app that charges users monthly and one time > fees. I need to generate invoices and keep track of orders and I most > definitely don't want to write this non-core code myself :) Someone > else must hav

Re: Optimizing my ORM query

2009-03-05 Thread Malcolm Tredinnick
On Thu, 2009-03-05 at 18:48 -0500, Jeff Gentry wrote: > Suppose I have three models (in pseudocode): > > class Foo: >asdf = models.CharField() > > class Blah: >qwerty = models.CharField() > > class Bob: >foo = models.ForeignKey(Foo) >blah = models.ForeignKey(Blah) > > Given a F

Django Pluggable application for invoicing / accounts?

2009-03-05 Thread John Boxall
Hey everyone, I'm building a Django app that charges users monthly and one time fees. I need to generate invoices and keep track of orders and I most definitely don't want to write this non-core code myself :) Someone else must have done it (or something like it!) I've tried searching in the usu

Re: relative url to media dir

2009-03-05 Thread Malcolm Tredinnick
On Thu, 2009-03-05 at 15:04 -0800, neri...@gmail.com wrote: > Hello, > > How do I keep a relative url to my media directory? The problems with relative URLs is that they have to be relative to *something*. So you could use a relative URL from, say, /foo/bar to /media/ by writing it as ../../med

Re: Custom filter() operators

2009-03-05 Thread Malcolm Tredinnick
On Fri, 2009-03-06 at 08:00 +0900, Russell Keith-Magee wrote: [...] > However, I agree that this would be a useful feature to add (or > improve). This isn't something we want to be trivial to accomplish, > but it should be a lot easier for people who are adding fields that > have unusual operator

Re: Cherrypy and view variables caching?

2009-03-05 Thread Malcolm Tredinnick
On Thu, 2009-03-05 at 14:54 -0800, John M wrote: > I'm having a strange problem with running django on a Cherrypy > server. > > in my views.py, I setup a variable called oneweekago, and set it to > today() - (days=7) (it's obviously a date type variable), then in my > query, I ask for all record

Re: opposite of icontains

2009-03-05 Thread Malcolm Tredinnick
On Thu, 2009-03-05 at 12:54 -0800, Jeff FW wrote: > Well, then, that is quite a strange use case :-) Nevermind my simple > methods. Malcom's suggestion of an extension for postgres seems like > a good idea--writing functions in various languages (like Python!) is > _really_ easy in postgres. >

Re: Why django checks whether settings.DATABASE_NAME db actually exists for running testcases?

2009-03-05 Thread Malcolm Tredinnick
On Thu, 2009-03-05 at 12:54 -0800, madhav wrote: > I will be frequently running testcases for my django project. But one > fine day it occured to me that django actually checks the > settings.DATABASE_NAME db actual existence while running testcases. It happens that the normal startup procedure f

Re: Oracle connection without tnsnames.ora

2009-03-05 Thread Ian Kelly
On Mar 5, 2:29 pm, "robertmalik...@googlemail.com" wrote: > Edit settings.py and; > DATABASE_NAME = '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=db_hostname) > (Port=1521))(CONNECT_DATA=(SID=db_sid)))' > > Replace the db_sid with your database sid and db_hostname the database > hostname or IP. You

Re: how reverse works

2009-03-05 Thread Malcolm Tredinnick
On Thu, 2009-03-05 at 10:56 -0800, adrian wrote: > > I've had some problems with reverse and have some questions and > thoughts: > > 1. When I add a view and a corresponding entry in urls,py, sometimes I > get a reverse error until I stop the dev server and restart it, even > though nothing is w

Optimizing my ORM query

2009-03-05 Thread Jeff Gentry
Suppose I have three models (in pseudocode): class Foo: asdf = models.CharField() class Blah: qwerty = models.CharField() class Bob: foo = models.ForeignKey(Foo) blah = models.ForeignKey(Blah) Given a Foo and a list of Blahs (where the length of the list might be very small (0-10)

Re: manage.py test doesn't run tests

2009-03-05 Thread Malcolm Tredinnick
On Thu, 2009-03-05 at 09:05 -0800, saeb wrote: > My project is divided into 3 apps, and all 3 apps have a "tests.py" > file. When I run manage.py test, none of the tests run. But if I run > manage.py test app1.TestCase1.test1 , it runs fine. For some reason > django is unable to find app tests. I

Re: Is a Complex filter with __in and __exact possible?

2009-03-05 Thread Malcolm Tredinnick
On Thu, 2009-03-05 at 07:13 -0800, Daniel Hepper wrote: > Yes, this does obviously not work as expected. Sorry for the > misinformation. > > But would it work if every condition was encapsulated in a Q-object? > > Book.objects.filter(Q(categories=1), Q(categories=2), Q(categories=3)) Not if you

Re: confused about a domain only request

2009-03-05 Thread Malcolm Tredinnick
On Thu, 2009-03-05 at 13:35 +0100, Dries Desmet wrote: > Hi all, > > I want to start a very simple tree-structure cms django app. Reading > about django all day yesterday, my plan is to have the urlconf capture > every and all urls by: > (r'', 'pages.views.index') > > and use the request.url obj

relative url to media dir

2009-03-05 Thread neri...@gmail.com
Hello, How do I keep a relative url to my media directory? When I go to any other view besides the index view i.e., example.com/studio/, example.com/services/, etc, the images defined in my base.html template are missing. I have a "media" symlink in my document root that points to my media direct

Re: Why django checks whether settings.DATABASE_NAME db actually exists for running testcases?

2009-03-05 Thread Russell Keith-Magee
On Fri, Mar 6, 2009 at 5:54 AM, madhav wrote: > > I will be frequently running testcases for my django project. But one > fine day it occured to me that django actually checks the > settings.DATABASE_NAME db actual existence while running testcases. > Why is this so. All I thought was django will

Re: Custom filter() operators

2009-03-05 Thread Russell Keith-Magee
On Fri, Mar 6, 2009 at 5:51 AM, Jay Deiman wrote: > > I'm currently trying to create a custom Field subclass for the Postgres > specific "inet" and "cidr" types.  I have been able to create the > classes and use them without issue so far.  The problem I am running > into is that I would like to a

Cherrypy and view variables caching?

2009-03-05 Thread John M
I'm having a strange problem with running django on a Cherrypy server. in my views.py, I setup a variable called oneweekago, and set it to today() - (days=7) (it's obviously a date type variable), then in my query, I ask for all records that are __LTE=oneweekago. This code works perfect the day

Re: append_slash and mod_wsgi problem when Django lives in subdirectory

2009-03-05 Thread Graham Dumpleton
On Mar 6, 5:14 am, Benedykt wrote: > Dear sirs, > I have configured my web server sohttp://localhost/wsgipoints to > Django connected with WSGI: > WSGIScriptAlias /wsgi /var/www/django.wsgi > > Now I can see that when I request URL "http://localhost/wsgi/myapp/ > test/", Django sees URL "myapp/

Re: Three Physical Tiers

2009-03-05 Thread Kevin Teague
On Mar 4, 12:21 pm, ruffeo wrote: > Does anyone know how to develop a complex django project in a 3 tiered > network environment, still using the MCV architecture? > > I.E. Web Server (view and control code), App Server (model code), and > Database Server You have to distinguish between "archi

Re: Oracle connection without tnsnames.ora

2009-03-05 Thread hugoto
Thank you! That works! On 5 mar, 18:29, "robertmalik...@googlemail.com" wrote: > Edit settings.py and; > DATABASE_NAME = '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=db_hostname) > (Port=1521))(CONNECT_DATA=(SID=db_sid)))' > > Replace the db_sid with your database sid and db_hostname the database

Re: ManyToOne : cannot form a proper query :(

2009-03-05 Thread creecode
You can always perform raw SQL queries < http://docs.djangoproject.com/en/dev/topics/db/sql/ > if needed. On Mar 5, 4:25 am, "[CPR]-AL.exe" wrote: > So, it seems, that there is no way to do what i want? --~--~-~--~~~---~--~~ You received this message because you

Re: Creating a Symbolic Link using Windows

2009-03-05 Thread snaggz03
OK, so I've gone back to the beginner tutorial from http://docs.djangoproject.com/en/dev/intro/tutorial01/#intro-tutorial01 . Now whenever I try to use "python manage.py runserver" I get these errors Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/django/core/manageme

Re: Oracle connection without tnsnames.ora

2009-03-05 Thread robertmalik...@googlemail.com
Edit settings.py and; DATABASE_NAME = '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=db_hostname) (Port=1521))(CONNECT_DATA=(SID=db_sid)))' Replace the db_sid with your database sid and db_hostname the database hostname or IP. HTH Robert On Mar 5, 1:03 pm, hugoto wrote: > Hi all, I have a django p

Re: dynamic search forms

2009-03-05 Thread Milan Andric
On Thu, Mar 5, 2009 at 6:56 AM, Christoph Pingel wrote: > > Hello, > > this is my first post to the list. Great to work with such a well- > designed framework! > > My question - is there an 'official' way to build dynamic search > forms where users can add/remove search criteria? > And if not: Ho

Oracle connection without tnsnames.ora

2009-03-05 Thread hugoto
Hi all, I have a django project using oracle as database engine. In my local machine this works ok with my local tnsnames.ora, but in the server I don't have the permission to write in the oracle client directory, so I cant create the tnsnames.ora. In the docs I've read that setting both the datab

Re: Why serializing to JSON doesn't work?

2009-03-05 Thread Jeff FW
You know what's weird? I've used simplejson.dumps() plenty of times in my own code... not sure why that one just slipped out of my memory. I should just stop responding to things :-) Anyway, since you're serializing a model, you *should* be using your originally posted method. Use the way Mare

Re: opposite of icontains

2009-03-05 Thread Jeff FW
Well, then, that is quite a strange use case :-) Nevermind my simple methods. Malcom's suggestion of an extension for postgres seems like a good idea--writing functions in various languages (like Python!) is _really_ easy in postgres. Just out of curiosity (for either of you,) what is a search

Why django checks whether settings.DATABASE_NAME db actually exists for running testcases?

2009-03-05 Thread madhav
I will be frequently running testcases for my django project. But one fine day it occured to me that django actually checks the settings.DATABASE_NAME db actual existence while running testcases. Why is this so. All I thought was django will be taking the settings.DATABASE_NAME and creates a test

Custom filter() operators

2009-03-05 Thread Jay Deiman
I'm currently trying to create a custom Field subclass for the Postgres specific "inet" and "cidr" types. I have been able to create the classes and use them without issue so far. The problem I am running into is that I would like to add some custom query filters for use with the filter() me

Logging in a production environment / fcgi

2009-03-05 Thread oyiptong
Hello, I've implemented a couple of applications using django and i was wondering if there was (or if there are plans to be) some sort of logging for the application server. I am running my django applications using FCGI and I was looking into something that would do access, and error logs includ

Previous form in form wizard

2009-03-05 Thread Nate Soares
Is there an easy way to add a "previous step" button to a form wizard page? Thanks, -Nate --~--~-~--~~~---~--~~ 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@googl

Re: newbie with django-tagging problem

2009-03-05 Thread Alex Gaynor
On Thu, Mar 5, 2009 at 3:26 PM, kkaste wrote: > > I am working through the webmonkey tutorial on Django (http:// > www.webmonkey.com/tutorial/Get_Started_With_Django). I am a newcomer > to Django. The instructions want you to download an application called > django-tagging. I did this on my Windo

newbie with django-tagging problem

2009-03-05 Thread kkaste
I am working through the webmonkey tutorial on Django (http:// www.webmonkey.com/tutorial/Get_Started_With_Django). I am a newcomer to Django. The instructions want you to download an application called django-tagging. I did this on my Windows PC by downloading and running the .exe file. When that

Re: Self Join using QuerySet

2009-03-05 Thread Alex Gaynor
On Thu, Mar 5, 2009 at 2:10 PM, AJ wrote: > > I'm not sure if/how this is done in django version prior to 1.1, but > if you are using the 1.1 alpha or working from the trunk you can use > the F() expression: > > http://docs.djangoproject.com/en/dev/topics/db/queries/#filters-can-reference-fields-

Re: Module not found

2009-03-05 Thread neridaj
thanks Jacob. On Mar 5, 11:47 am, Jacob Kaplan-Moss wrote: > On Thu, Mar 5, 2009 at 2:44 PM, neri...@gmail.com wrote: > >    (r'^$', include('dzopastudio.views.current_datetime')), > > There's the bug. ``include()`` does what the name suggests: it > includes another urlconf. Drop the include an

Re: Module not found

2009-03-05 Thread Jacob Kaplan-Moss
On Thu, Mar 5, 2009 at 2:44 PM, neri...@gmail.com wrote: >    (r'^$', include('dzopastudio.views.current_datetime')), There's the bug. ``include()`` does what the name suggests: it includes another urlconf. Drop the include and it should work. Jacob --~--~-~--~~~---

Module not found

2009-03-05 Thread neri...@gmail.com
Hello, I'm trying to map a simple url to a view but keep getting: "No module named current_datetime" when the view is defined in the views.py file. Here is urls.py: from django.conf.urls.defaults import * # Uncomment the next two lines to enable the admin: from django.contrib import admin adm

Re: Self Join using QuerySet

2009-03-05 Thread AJ
I'm not sure if/how this is done in django version prior to 1.1, but if you are using the 1.1 alpha or working from the trunk you can use the F() expression: http://docs.djangoproject.com/en/dev/topics/db/queries/#filters-can-reference-fields-on-the-model On Mar 5, 1:46 pm, Adam Nelson wrote: >

Re: how reverse works

2009-03-05 Thread Milan Andric
On Mar 5, 12:56 pm, adrian wrote: > I've had some problems with reverse and have some questions and > thoughts: > > 1. When I add a view and a corresponding entry in urls,py, sometimes I > get a reverse error until I stop the dev server and restart it, even > though nothing is wrong with either

how reverse works

2009-03-05 Thread adrian
I've had some problems with reverse and have some questions and thoughts: 1. When I add a view and a corresponding entry in urls,py, sometimes I get a reverse error until I stop the dev server and restart it, even though nothing is wrong with either file. Is there an order in which those chang

Self Join using QuerySet

2009-03-05 Thread Adam Nelson
Is it possible to do a self join using QuerySet? I'm looking to simulate a query like this: SELECT b.created_on, SUM(a.vote) FROM votes a JOIN votes b ON a.created_on <= b.created_on WHERE a.object_id = 1 GROUP BY 1 Which finds the sums for votes before the datetime of each vote. --~--~

Re: simple model problem

2009-03-05 Thread AmanKow
On Mar 4, 8:57 pm, Malcolm Tredinnick wrote: > On Wed, 2009-03-04 at 10:43 -0800, arbi wrote: > > Hello, > > I am new to Django and programming... > > I have a model similar to this one : > > > class myModel : > >   attribute 1 = models.ForeignKey(myModel2, primary_key = True) > >   attribute 2 =

Combining Model Forms

2009-03-05 Thread Andy Wilson
all, I'd like to find a way to combine two model forms (ie., modelForm subclasses). I understand that there's no way I can do this so that the resulting form is somehow bound to both models at the same time - all i need is that the resulting HTML form contains input fields corresponding to al

Re: unindent does not match any outer indentation level

2009-03-05 Thread emonk
nevermind, is a tabulation error duuh! On Thu, Mar 5, 2009 at 12:05 PM, emonk wrote: > the line 178 is -> importeMaximoCuotaSugerida = forms.IntegerField( > > > On Thu, Mar 5, 2009 at 12:04 PM, emonk wrote: > >> HI, >> I have a form model, and i cant find any error in syntax, however the >> bro

Re: unindent does not match any outer indentation level

2009-03-05 Thread emonk
the line 178 is -> importeMaximoCuotaSugerida = forms.IntegerField( On Thu, Mar 5, 2009 at 12:04 PM, emonk wrote: > HI, > I have a form model, and i cant find any error in syntax, however the > browser report this execption > "IndentationError at /brou/ > > unindent does not match any outer inde

unindent does not match any outer indentation level

2009-03-05 Thread emonk
HI, I have a form model, and i cant find any error in syntax, however the browser report this execption "IndentationError at /brou/ unindent does not match any outer indentation level (forms.py, line 178) Request Method: GET Request URL: http://localhost/brou/ Exception Type: IndentationError

append_slash and mod_wsgi problem when Django lives in subdirectory

2009-03-05 Thread Benedykt
Dear sirs, I have configured my web server so http://localhost/wsgi points to Django connected with WSGI: WSGIScriptAlias /wsgi /var/www/django.wsgi Now I can see that when I request URL "http://localhost/wsgi/myapp/ test/", Django sees URL "myapp/test/". It is nice when I write url rules - they

Re: manage.py test doesn't run tests

2009-03-05 Thread saeb
yes, it does. But few of the models.py are empty. whats weird is if I try to run the tests individually, they run fine, but I can't run then with manage.py test thanks for replying. On Mar 5, 11:52 am, Alex Gaynor wrote: > On Thu, Mar 5, 2009 at 12:17 PM, saeb wrote: > > > Sorry for multipl

Re: manage.py test doesn't run tests

2009-03-05 Thread Alex Gaynor
On Thu, Mar 5, 2009 at 12:17 PM, saeb wrote: > > Sorry for multiple posts > > > > On Mar 5, 11:16 am, saeb wrote: > > My project is divided into 3 apps, and all 3 apps have a "tests.py" > > file. When I run manage.py test, none of the tests run. But if I run > > manage.py test app1.TestCase1.tes

Re: Does Django get the height/width data of ImageField from height_field?

2009-03-05 Thread Rajesh D
On Mar 5, 1:17 am, liangent wrote: > I created a ImageField img_field with height_field parameter in a > model, > added an image, then get it from database. > > If I try to access obj.img_field.height and obj.img_field.width, > where do django get this data from? > > Cached data when SELECTed fro

django-multilingual issues

2009-03-05 Thread phred78
Hi, I'm using django-multilingual to get some models translated, but I found two errors. class Translation(multilingual.Translation): title = models.CharField(max_length=120, blank=True) introduction = models.TextField(blank=True) body = models.TextField(blank=True)

Getting information from more that one model (ManyToMany but different)?

2009-03-05 Thread phred78
Hi, I'm sorry to bother you guys with this but I hit the wall on this one. I'm creating a website for a tourist board and they have several associates (like hotels, golf, spa, etc). When I initially created the "Associates" application, instead of creating a general "Associate" model and make ev

Re: manage.py test doesn't run tests

2009-03-05 Thread saeb
Sorry for multiple posts On Mar 5, 11:16 am, saeb wrote: > My project is divided into 3 apps, and all 3 apps have a "tests.py" > file. When I run manage.py test, none of the tests run. But if I run > manage.py test app1.TestCase1.test1 , it runs fine. For some reason > django is unable to find

manage.py test doesn't run tests

2009-03-05 Thread saeb
My project is divided into 3 apps, and all 3 apps have a "tests.py" file. When I run manage.py test, none of the tests run. But if I run manage.py test app1.TestCase1.test1 , it runs fine. For some reason django is unable to find app tests. I have all the apps in INSTALLED_APPS. What am I missing?

manage.py test doesn't run tests

2009-03-05 Thread saeb
My project is divided into 3 apps, and all 3 apps have a "tests.py" file. When I run manage.py test, none of the tests run. But if I run manage.py test app1.TestCase1.test1 , it runs fine. For some reason django is unable to find app tests. I have all the apps in INSTALLED_APPS. What am I missing?

manage.py test doesn't run tests

2009-03-05 Thread saeb
My project is divided into 3 apps, and all 3 apps have a "tests.py" file. When I run manage.py test, none of the tests run. But if I run manage.py test app1.TestCase1.test1 , it runs fine. For some reason django is unable to find app tests. I have all the apps in INSTALLED_APPS. What am I missing?

Re: Port Number for Flatpages Sites

2009-03-05 Thread Kyle Hayes
Never mind. Things are working fine. There was something wrong with my default.html template. On Mar 5, 8:10 am, Kyle Hayes wrote: > Does it matter if I specify a port number for the site domain in Sites > from the Admin panel for my flatpages to work? I'm really having a > tough time getting th

Port Number for Flatpages Sites

2009-03-05 Thread Kyle Hayes
Does it matter if I specify a port number for the site domain in Sites from the Admin panel for my flatpages to work? I'm really having a tough time getting these flatpages to display. Thanks, Kyle --~--~-~--~~~---~--~~ You received this message because you are sub

Re: ModelAdmin get_urls w/ invalid literal for int() with base 10

2009-03-05 Thread Brian Neal
On Mar 4, 10:06 pm, Brian Neal wrote: > On Mar 4, 9:11 pm, Brian Neal wrote: > > > I'd like to make my own custom view. In the past I did this by > > following the django book and added a URL to my main urlpatterns above > > the '^admin/(.*)' pattern. But I noticed a new get_urls function on > >

Re: Has anyone used the django database as a backend for openldap?

2009-03-05 Thread CLIFFORD ILKAY
Eric Chamberlain wrote: > Hi, > > We have various servers and tools that can use LDAP for users, groups, > and authentication. The users and groups information we would like to > use is in django. > > Has anyone used the django database as a slapd backend? Enabling > OpenLDAP to serve up

Re: FileField - Forms - upload to not available

2009-03-05 Thread Francis
Did you found any solution? Because I have the same problem, but on opposite side (works on mac but not on linux). I think that you need a trailing "/" to your upload_to path though. Francis On Mar 1, 8:21 pm, tom wrote: > here is some more information, maybe that helps. These are just > dif

Re: models: blank, null and oracle

2009-03-05 Thread Evgeniy Ivanov
Sorry, posted it here occasionally: it should be in dev list. --~--~-~--~~~---~--~~ 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 fro

models: blank, null and oracle

2009-03-05 Thread Evgeniy Ivanov
Hi! I have such code: "name = models.CharField(max_length=32)". Thus "blank=False and null=False" should be applied. But in DB this attr is nullable, and since oracle stores empty strings as null attribute created wrongly (' "NAME " NVARCHAR2 (32) , '). Should I file a bug? --~--~-~--~

create a google account

2009-03-05 Thread Manuel Ignacio
hi, anyone knows if is possible create an google account for an user from django code? 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@go

GenericTabularInline always looking for "object_id"

2009-03-05 Thread sixarm...@gmail.com
I've been able to successfully setup the tagging.models.TaggedItem as a GenericTabularInline for my django admin interface. When I try to do the same for contrib.comments, it always seems to look for 'object_id'. Looks like the comment model was change in the past year. Has anyone successfully

Re: Is a Complex filter with __in and __exact possible?

2009-03-05 Thread Daniel Hepper
Yes, this does obviously not work as expected. Sorry for the misinformation. But would it work if every condition was encapsulated in a Q-object? Book.objects.filter(Q(categories=1), Q(categories=2), Q(categories=3)) -- Daniel On Mar 5, 4:14 am, Malcolm Tredinnick wrote: > On Wed, 2009-03-04

Re: translating app name ... again

2009-03-05 Thread patrickk
well, I tried some things within the last couple of hours (like changing upper/lowercase), but it still doesn´t work. although automatic extraction of app-names would be perfect, translating the names manually is totally fine for me (if it works). it just want to get rid of that language-mix (eve

Re: Dynamic Form?[Newbie]

2009-03-05 Thread andrew
Hi Matias & Malcolm Thank you sugguestion all .:) BestRegards On 3月5日, 下午8时17分, Matias Surdi wrote: > Hi Andrews, > > Look at this: > > http://www.b-list.org/weblog/2008/nov/09/dynamic-forms/ > > This helped me a lot a couple months ago when I had to do some dynamic > forms. Those forms whe

confused about a domain only request

2009-03-05 Thread Dries Desmet
Hi all, I want to start a very simple tree-structure cms django app. Reading about django all day yesterday, my plan is to have the urlconf capture every and all urls by: (r'', 'pages.views.index') and use the request.url object to differentiate between the pages by checking them against a .url a

Re: Has anyone used the django database as a backend for openldap?

2009-03-05 Thread Mike Dong
We hope that django is able to access LDAP Server as models,but we have not found a good method. We wrote our ldap modules based on python-ldap. If you have some examples about how to integrate into django.db.models, please told me. MikeDong 2009/2/24 Eric Chamberlain : > > Hi, > > We have var

dynamic search forms

2009-03-05 Thread Christoph Pingel
Hello, this is my first post to the list. Great to work with such a well- designed framework! My question - is there an 'official' way to build dynamic search forms where users can add/remove search criteria? And if not: How would I best deal with search param names that are not initially k

Re: how to display and update the same form? wait online

2009-03-05 Thread Alex Gaynor
On 3/5/09, Chr1s wrote: > > hi folks, > > I have a customized form, I want to it can be displayed, if user > made a change, it can be submitted and saved. what should I do? the > form was made from 2 different models. > > > here is my code: > =forms.py=== > cla

Re: ManyToOne : cannot form a proper query :(

2009-03-05 Thread [CPR]-AL.exe
So, it seems, that there is no way to do what i want? On 3 мар, 19:17, Alex Gaynor wrote: > On Tue, Mar 3, 2009 at 11:13 AM, [CPR]-AL.exe wrote: > > > for example, i have this models: > > (like here:http://www.djangoproject.com/documentation/models/many_to_one/ > > ) > > > -

Re: Dynamic Form?[Newbie]

2009-03-05 Thread Matias Surdi
Hi Andrews, Look at this: http://www.b-list.org/weblog/2008/nov/09/dynamic-forms/ This helped me a lot a couple months ago when I had to do some dynamic forms. Those forms where generated from data entered by the user in a previous step. It can be a bit "messy" if you don't take care, but w

Re: Why serializing to JSON doesn't work?

2009-03-05 Thread Marek Wawrzyczek
Thomas Guettler wrote: > > Jeff FW schrieb: > >> The serializers are for serializing querysets/models. I'm surprised >> you're not getting an error message there--are you catching all >> exceptions? >> >> What you want is in django.utils.simplejson: >> >> from django.utils.simplejson import en

how to display and update the same form? wait online

2009-03-05 Thread Chr1s
hi folks, I have a customized form, I want to it can be displayed, if user made a change, it can be submitted and saved. what should I do? the form was made from 2 different models. here is my code: =forms.py=== class ChangePersonalInfo(forms.Form): email

Re: Dynamic Form?[Newbie]

2009-03-05 Thread Malcolm Tredinnick
On Thu, 2009-03-05 at 01:57 -0800, andrew wrote: > Hi Malcolm > >I had read your link ,but I still can't find solution :( . So start slowly. Learn how to create simple forms and then move up. There are lots of code examples in the forms documentation -- which part of those didn't you underst

Re: Does Django get the height/width data of ImageField from height_field?

2009-03-05 Thread Malcolm Tredinnick
On Wed, 2009-03-04 at 22:17 -0800, liangent wrote: > I created a ImageField img_field with height_field parameter in a > model, > added an image, then get it from database. > > If I try to access obj.img_field.height and obj.img_field.width, > where do django get this data from? > > Cached data

Re: Dynamic Form?[Newbie]

2009-03-05 Thread andrew
Hi Malcolm I had read your link ,but I still can't find solution :( . May be I didn't explain sufficiently. In table "Product": --- Name Type --- productA 1 productB 1 productC 3 productD 3 I want to display a form like this sample: --

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

2009-03-05 Thread sdhays
Occasionally, I get this error in my email: Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/django/core/handlers/ base.py", line 86, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/usr/lib/python2.6/site-packages/django/co

Does Django get the height/width data of ImageField from height_field?

2009-03-05 Thread liangent
I created a ImageField img_field with height_field parameter in a model, added an image, then get it from database. If I try to access obj.img_field.height and obj.img_field.width, where do django get this data from? Cached data when SELECTed from db? Or get size with PIL then cache it? Thanks.

Re: Dynamic Form?[Newbie]

2009-03-05 Thread Malcolm Tredinnick
On Thu, 2009-03-05 at 00:13 -0800, andrew wrote: > Hi , Dear all: > > I had searched this forum but with limit information about dynamic > forms . > >Model: > - > class Product(models.Model): > name = models.CharField(max_length=30)

Re: translating app name ... again

2009-03-05 Thread Malcolm Tredinnick
On Wed, 2009-03-04 at 23:30 -0800, patrickk wrote: > great - a gleam of hope ... but what do you mean with "put each of > your app names into a file ..."? what file? where? Any file. It doesn't matter. Some file that "makemessages" will pick up and read, so best make it a .py file. It could be an

Re: formset initialization question

2009-03-05 Thread Malcolm Tredinnick
On Wed, 2009-03-04 at 22:17 -0800, Margie wrote: > Here's a "book" analogy to what I am doing. I am sending out a bunch > of forms to the user. Each form contains the title of a book (my > "tile") and an input field where the user is being asked to input the > author of the book. When the view.

Dynamic Form?[Newbie]

2009-03-05 Thread andrew
Hi , Dear all: I had searched this forum but with limit information about dynamic forms . Model: - class Product(models.Model): name = models.CharField(max_length=30) # Product Name type = models.IntegerField(max_length=3

  1   2   >