Access records from two tables

2009-01-06 Thread Praveen
Models.py class Listing(models.Model): name = models.CharField(max_length=20) description = models.TextField(max_length = 100) website = models.URLField() category = models.ForeignKey(Category) class Category(models.Model): category_code = models.CharField(max_length = 50,

Re: Making changes to models

2009-01-06 Thread Karen Tracey
On Wed, Jan 7, 2009 at 12:48 AM, Travis Veazey wrote: > So now we get to the question: As I can't even begin to conceive of myself > being the only person in this boat, I have to believe there's one or more > generally-accepted and "good" ways of dealing with updating

Making changes to models

2009-01-06 Thread Travis Veazey
Hi all. Still feeling my way through Django development, working on my first app still, and I've hit what looks to be a huge hurdle: Django has no in-built mechanism for dealing with making changes to the structure of models. Okay, fine, I can understand the reasons for that, and while I think it

Re: Could not import settings

2009-01-06 Thread Karen Tracey
On Tue, Jan 6, 2009 at 2:49 PM, Bradley wrote: > > I move an existing website running django onto a shared webhost via > FastCGI. > > No matter what I do, I get the following error: > > ImportError: Could not import settings 'seymourherald.settings' (Is it > on sys.path?

Base Class and Multiple SubClasses

2009-01-06 Thread Mathieu Steele
I'm trying to find the right way to make an instance of a subclass of a model also an instance of a different subclass in the model, like so: class Person(models.Model): ... class Customer(Person): ... class Employee(Person): ... If I have an instance of Employee that I want to

Re: Your IDE of choice

2009-01-06 Thread Kenneth Gonsalves
On Tuesday 06 Jan 2009 5:18:57 pm HB wrote: > What is your favorite IDE for coding Django projects? geany -- regards KG http://lawgon.livejournal.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: wondering how to do something similar to save_model for inline.

2009-01-06 Thread Karen Tracey
On Tue, Jan 6, 2009 at 10:10 PM, Timboy wrote: > > Still no solution to this. It has been confirmed by another user. Is > it a bug? > (Where was it confirmed by another user? I don't see that.) The doc list "save_formset" under "ModelAdmin methods" yet you seem to have

what type of data structure should I use?

2009-01-06 Thread backdoc
I have a list of links (say ~200) that I want to display in several different orders, all on one page. The first question is am I better off to hit the database for every different order? Then, when I click a link, I am changing many of the attributes about that link (like hit count, last

Re: ModelForm Default Value for Foreign Key

2009-01-06 Thread Karen Tracey
On Tue, Jan 6, 2009 at 10:08 PM, Chris wrote: > > I've created a ModelForm from a model containing a foreign key field > (called user) linked to my User class. When the form is saved, I want > this value to be set to the current authenticated user. What's the > best way to

Re: Your IDE of choice

2009-01-06 Thread backdoc
screen + vim is very powerful. That's what I use, too. Too bad the learning curve is so steep. On Jan 6, 6:52 am, Tim Chase wrote: > > What is your favorite IDE for coding Django projects? > > screen + vim + pdb + bash > [+ lynx/dillo/firefox/epiphany for

Re: Speeding up the tests, what am I missing?

2009-01-06 Thread Karen Tracey
On Tue, Jan 6, 2009 at 9:25 PM, Todd O'Bryan wrote: > > On Tue, Jan 6, 2009 at 6:23 PM, Russell Keith-Magee > wrote: > > There are some plans in place to speed up test cases using > > transactions; I'm hoping to be able to look at this once I put

Re: How to: Inverted ForeignKey usage - Using admin a little backwards?

2009-01-06 Thread Karen Tracey
On Tue, Jan 6, 2009 at 8:01 PM, ZebZiggle wrote: > > Hi all, > > Sorry for the cryptic subject line, but I don't know how else to > describe it. > > I have two tables: > > class Opportunity(models.Model): > ... > > class Deal(models.Model): > opp =

Re: Django: creating formset is very slow

2009-01-06 Thread Jeff FW
Post the code for DataForm--I'll bet it's hitting the database a number of times. That would be the only reason I can think of that it would take that long. I just created a formset containing simple forms, and it instantiated almost instantly--even with 2000 forms. -Jeff On Jan 6, 3:21 pm,

could not import settings error, FastCGI

2009-01-06 Thread Bradley
I'm having a strange problem in that I can make any change that I want to the .fcgi file, short of deleting it and I get the same django error about seymourherald.settings not found. I can delete the entire contents of the file so all it has in it is #!/path/to/python and it still gives me this

Re: Your IDE of choice

2009-01-06 Thread bedros
I'm very happy with Komodo Edit 5.0 for editing python SyncroSVN client for subversion; not free, but it's cheap and worth the money; very happy with it. http://www.syncrosvnclient.com/ multi-platform and intuitive interface On Jan 6, 12:32 pm, Ovnicraft wrote: >

Re: wondering how to do something similar to save_model for inline.

2009-01-06 Thread Timboy
Still no solution to this. It has been confirmed by another user. Is it a bug? On Dec 29 2008, 2:33 pm, Timboy wrote: > DB is sqlite3. Deleted DB file syncd and still same traceback. > here is proper traceback paste:http://dpaste.com/103517/ > > On Dec 28, 9:10 pm, Praveen

ModelForm Default Value for Foreign Key

2009-01-06 Thread Chris
I've created a ModelForm from a model containing a foreign key field (called user) linked to my User class. When the form is saved, I want this value to be set to the current authenticated user. What's the best way to do this? My form's save method takes the current user as an argument. I've

Re: Speeding up the tests, what am I missing?

2009-01-06 Thread Todd O'Bryan
On Tue, Jan 6, 2009 at 6:23 PM, Russell Keith-Magee wrote: > > On Wed, Jan 7, 2009 at 4:51 AM, Todd O'Bryan wrote: >> >> So, I've been trying to speed up tests. Surprise. I came across a >> fairly easy solution, so I'm sure I must be missing

Re: Speeding up the tests, what am I missing?

2009-01-06 Thread Todd O'Bryan
On Tue, Jan 6, 2009 at 6:05 PM, Malcolm Tredinnick wrote: > > On Tue, 2009-01-06 at 14:51 -0500, Todd O'Bryan wrote: > [...] > >> So, what am I missing? I know this doesn't deal with doctests--the db >> gets cleaned for all of those, but does anyone see when this is

Re: Your IDE of choice

2009-01-06 Thread elithrar
I primarily use TextMate on OS X - before that, I used Coda but it didn't have a plugin architecture back then (for Django templates). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: ? Import Error for admin djangobook

2009-01-06 Thread elithrar
As you're using a recent (last couple of months) checkout and/or Django 1.0, you'll find that there have been some changes to the way the admin application works. See here: http://docs.djangoproject.com/en/dev/ref/contrib/admin/ - this should set you on the right path to learning about these

Re: Import models from CSV files?

2009-01-06 Thread Victor Hooi
heya, Whoops...forgot. I'm also confused on the recommended way to deal with duplicates? (not duplicate .csv files, but duplicate entries, perhaps in two different ones.). Just do a plain search for each entry? Or is there a better way? On Jan 7, 11:55 am, Victor Hooi

How to: Inverted ForeignKey usage - Using admin a little backwards?

2009-01-06 Thread ZebZiggle
Hi all, Sorry for the cryptic subject line, but I don't know how else to describe it. I have two tables: class Opportunity(models.Model): ... class Deal(models.Model): opp = models.ForeignKey(Opportunity) ... However, in the admin, I want the user to enter the data for the Opportunity

Re: Import models from CSV files?

2009-01-06 Thread Victor Hooi
heya, Valts, thanks for the reply - that looks interesting, and is similar in some ways to what I want - definitely going to check out the code. Basically, I just wanted a simple file-upload form, for the user to upload the two .CSV files. Then, there's quite a bit of processing to do on the two

Re: OperationalError at /swenglish/ , no such table: swenglish_entry

2009-01-06 Thread Malcolm Tredinnick
On Tue, 2009-01-06 at 16:07 -0800, rabbi wrote: > i was actually already reading that page... but it's 1:00am and maybe > i glazed over it without registering :) > > i've now temporarily fixed my admin page problem by just copying all > files to the apache document root, but later i will need to

Re: OperationalError at /swenglish/ , no such table: swenglish_entry

2009-01-06 Thread rabbi
i was actually already reading that page... but it's 1:00am and maybe i glazed over it without registering :) i've now temporarily fixed my admin page problem by just copying all files to the apache document root, but later i will need to learn what a "symbolic link" is as it sounds like a nicer

Re: OperationalError at /swenglish/ , no such table: swenglish_entry

2009-01-06 Thread Malcolm Tredinnick
On Tue, 2009-01-06 at 15:33 -0800, rabbi wrote: > thanks a lot malcom, that's great advice. > for the record, initially i had "DATABASE_NAME = 'vocab'" > > i have another question; after changing from runserver to apache the > django admin page now looks very ugly... it's lost all formatting etc

Re: OperationalError at /swenglish/ , no such table: swenglish_entry

2009-01-06 Thread rabbi
thanks a lot malcom, that's great advice. for the record, initially i had "DATABASE_NAME = 'vocab'" i have another question; after changing from runserver to apache the django admin page now looks very ugly... it's lost all formatting etc is this normal or is it a problem i can repair. maybe

Re: OperationalError at /swenglish/ , no such table: swenglish_entry

2009-01-06 Thread Malcolm Tredinnick
On Tue, 2009-01-06 at 15:12 -0800, rabbi wrote: [...] > i've now got it running on apache/mod_python too, but i had to > hardcode the entire path to the db file in settings.py: >"DATABASE_NAME = 'C:/Documents and Settings/Rabbi/Desktop/Django > Code/mysite/vocab'" > > is this really

Re: Speeding up the tests, what am I missing?

2009-01-06 Thread Russell Keith-Magee
On Wed, Jan 7, 2009 at 4:51 AM, Todd O'Bryan wrote: > > So, I've been trying to speed up tests. Surprise. I came across a > fairly easy solution, so I'm sure I must be missing something. If > someone could tell me what I'm missing, I'd really appreciate it. ... >

Re: File upload failing occasionally

2009-01-06 Thread Graham Dumpleton
On Jan 6, 10:31 pm, ppdo wrote: > To Karen: yes, I meant TCP RST, sorry. > > Update: > > Using mod_wsgi made the problem go away for Firefox. > > Limiting my research to an interaction problem between Apache and > Safari, I stumbled upon this bug report for Apache >

Re: OperationalError at /swenglish/ , no such table: swenglish_entry

2009-01-06 Thread rabbi
>>I've gone through the Django tutorial and it worked fine when using >>the default development server that is provided with Django (python >>manage.py runserver) yeh, like I said. it works fine with the django-provided development server i've now got it running on apache/mod_python too, but i

Re: OperationalError at /swenglish/ , no such table: swenglish_entry

2009-01-06 Thread Malcolm Tredinnick
On Tue, 2009-01-06 at 11:59 -0800, rabbi wrote: [...] > I want to deploy my little test site though, so I've been trying to > get it running on Apache and I keep getting this error: > "OperationalError at /swenglish/ > no such table: swenglish_entry" > > The error seems to be happening on this

Re: Speeding up the tests, what am I missing?

2009-01-06 Thread Malcolm Tredinnick
On Tue, 2009-01-06 at 14:51 -0500, Todd O'Bryan wrote: [...] > So, what am I missing? I know this doesn't deal with doctests--the db > gets cleaned for all of those, but does anyone see when this is just > going to blow up in my face? For that to work reliably, you would need to deeply know the

Re: Newbie: Help to understand string handling

2009-01-06 Thread phoebebright
Thanks for that clarification. I am finding that a lot of assumptions are made in the documentation about previous knowledge. The documentation can appear very confusing until you understand the background, then it magically becomes blindingly obvious and helpful! I must write down more of

Re: Shouldn't blank=True imply null=True?

2009-01-06 Thread Malinka Rellikwodahs
On Tue, Jan 6, 2009 at 17:47, Malcolm Tredinnick wrote: > This thread is about whether blank=True, null=False (the fourth > possibility) ever makes sense for non-text fields. not sure if django supports binary data or any form of arrays but in those cases it could

Re: Circular imports between managers and models

2009-01-06 Thread Malcolm Tredinnick
On Tue, 2009-01-06 at 04:42 -0800, Polat Tuzla wrote: > Hi, > Suppose I have two classes in "models.py", namely A and B. And there > is the manager for B as BManager in "managers.py". BManager makes use > of clas A. > > This situation leads to circular imports between "managers.py" and >

Re: OperationalError at /swenglish/ , no such table: swenglish_entry

2009-01-06 Thread Daniel Roseman
On Jan 6, 2:59 pm, rabbi wrote: > Hi everyone, > I've gone through the Django tutorial and it worked fine when using > the default development server that is provided with Django (python > manage.py runserver) > > I want to deploy my little test site though, so I've been

Re: Shouldn't blank=True imply null=True?

2009-01-06 Thread Malcolm Tredinnick
On Tue, 2009-01-06 at 08:03 -0800, dchandek wrote: [...] > The only gotcha I've encountered here is that practically speaking > null=True requires blank=True. That isn't always valid and it's not the direction that's being proposed in this thread. One of the design goals of Django is to work

Re: Django vs. WObject...

2009-01-06 Thread Petite Abeille
On Jan 6, 2009, at 8:55 PM, MA wrote: > Django vs. WObject(s). WObject? Do you mean NeXT/Apple's WebObjects? http://en.wikipedia.org/wiki/WebObjects Cheers, -- PA. http://alt.textdrive.com/nanoki/ --~--~-~--~~~---~--~~ You received this message because you

Re: OperationalError at /swenglish/ , no such table: swenglish_entry

2009-01-06 Thread rabbi
I forgot to mention, I'm using SQLite3 On Jan 6, 8:59 pm, rabbi wrote: > Hi everyone, > I've gone through the Django tutorial and it worked fine when using > the default development server that is provided with Django (python > manage.py runserver) > > I want to deploy

Re: IOError: request data read error

2009-01-06 Thread Graham Dumpleton
On Jan 7, 4:04 am, Chunlei Wu wrote: > Thanks a lot Graham. I will upgrade my modwsgi to v2.3. Looking > forward to the v3.0 to see if the fix on issue #29 will fix my problem > as well. Actually, my reference to issue #29 is a bit wrong. That issue relates to connection

Solved: admin import fails

2009-01-06 Thread pcsnow
The url below has information in "Part2" has a revised urls.py and also discussion of admin.py http://docs.djangoproject.com/en/dev/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post

? Import Error for admin djangobook

2009-01-06 Thread Paul Campbell
Working examples in djangobook /1.0 chapter06 Can not get the Admin Interface to display using suggested urls.py / settings.py #urls from django.conf.urls.defaults import * urlpatterns = patterns('', (r'^admin/', include('django.contrib.admin.urls')), ) #settings.py - # snip ROOT_URLCONF

Django vs. WObject...

2009-01-06 Thread MA
Hi, Since our management team is trying to select the platform for further development, I'm in process to prepare the case ( presentation) Django vs. WObject(s). Though both frameworks seems to be very similar in the goals, they are obviously quite different in their internals. I'm wondering

OperationalError at /swenglish/ , no such table: swenglish_entry

2009-01-06 Thread rabbi
Hi everyone, I've gone through the Django tutorial and it worked fine when using the default development server that is provided with Django (python manage.py runserver) I want to deploy my little test site though, so I've been trying to get it running on Apache and I keep getting this error:

Could not import settings

2009-01-06 Thread Bradley
I move an existing website running django onto a shared webhost via FastCGI. No matter what I do, I get the following error: ImportError: Could not import settings 'seymourherald.settings' (Is it on sys.path? Does it have syntax errors?): No module named seymourherald.settings my

Re: Newbie: Help to understand string handling

2009-01-06 Thread Malinka Rellikwodahs
On Tue, Jan 6, 2009 at 16:49, Jeff Anderson wrote: > phoebebright wrote: >> Thanks for your response. Do you think a working knowledge of python >> is essential for django then? And do I import modules the same in >> django and python? Are there any python things you

Re: Newbie: Help to understand string handling

2009-01-06 Thread Jeff Anderson
phoebebright wrote: > Thanks for your response. Do you think a working knowledge of python > is essential for django then? And do I import modules the same in > django and python? Are there any python things you can't do in > django? > Django *is* Python. In fact, Django is only a Python

Re: Newbie: Help to understand string handling

2009-01-06 Thread phoebebright
Thanks for your response. Do you think a working knowledge of python is essential for django then? And do I import modules the same in django and python? Are there any python things you can't do in django? On Jan 6, 8:18 pm, "Alex Koshelev" wrote: > Yes. Django is just

Re: is it possible to provide initial data for a model with a foreign key to User model?

2009-01-06 Thread adrian
Many thanks. I am using MySQL with InnoDB, as a matter of fact. When I installed MySQL that's what it recommended. Your suggestion works fine. I was trying Person as a subclass of User, and couldn't get that to initialize. On Jan 3, 4:55 am, "Russell Keith-Magee"

Re: Your IDE of choice

2009-01-06 Thread Ovnicraft
2009/1/6 Berco Beute > > On Jan 6, 2:35 pm, Pigletto wrote: > > > So, Netbeans is currently my IDE of choice. Good svn integration, > > faster than eclipse and komodo, stable, nice markup highlighting. > > +1 > I'm using SciTe and emacs for simple, single

Re: Your IDE of choice

2009-01-06 Thread Berco Beute
On Jan 6, 2:35 pm, Pigletto wrote: > So, Netbeans is currently my IDE of choice. Good svn integration, > faster than eclipse and komodo, stable, nice markup highlighting. +1 I'm using SciTe and emacs for simple, single file editing. I've used pydev for a while but eclipse's

Re: Django: creating formset is very slow

2009-01-06 Thread Kottiyath Nair
I tried with 500 forms instead of 25. Now the time is becoming appaling.--- 117 seconds. Second time it hung. 2009-01-07 01:42:13,812 INFO Start - 4.46984183744e-006 2009-01-07 01:42:13,812 INFO Formset Class created- 0.000422958783868 2009-01-07 01:44:11,703 INFO Created new formset-

Re: Your IDE of choice

2009-01-06 Thread Vitaly Babiy
Bernard does komodo have a open files function (open file in project based on file name search) like there is text mate or gedit with plugin (gedit-openfiles). Vitaly Babiy On Tue, Jan 6, 2009 at 3:10 PM, Bernard wrote: > > I use Komodo IDE 5 everyday for every

Re: Newbie: Help to understand string handling

2009-01-06 Thread Alex Koshelev
Yes. Django is just Python On Tue, Jan 6, 2009 at 11:14 PM, phoebebright wrote: > > As a newbie to both python and django (ex PHP) I am not clear on when > I can use python functions and when I can't. > > I want to do some simple string handling in a view, search and

Newbie: Help to understand string handling

2009-01-06 Thread phoebebright
As a newbie to both python and django (ex PHP) I am not clear on when I can use python functions and when I can't. I want to do some simple string handling in a view, search and replace for example, but can't find anything in the documentation. I assume this means that I can use python string

Re: Your IDE of choice

2009-01-06 Thread Bernard
I use Komodo IDE 5 everyday for every Python/Django/PHP/Drupal projects at work and damn it works well. What I love about it: * Key bindings(shortcuts) for almost everything * Simple subversion integration so I don't have to switch to another window to commit something. * Search & Replace ,

Speeding up the tests, what am I missing?

2009-01-06 Thread Todd O'Bryan
So, I've been trying to speed up tests. Surprise. I came across a fairly easy solution, so I'm sure I must be missing something. If someone could tell me what I'm missing, I'd really appreciate it. So, first I created my own subclass of django.test.TestCase: class

Re: Circular imports between managers and models

2009-01-06 Thread bruno desthuilliers
On 6 jan, 19:45, Ben Eliott wrote: > Not that pretty/efficient but you could use contenttype contrib > temporarily. > IF ClassB has a ForeignKey to Class A could you extract the Class A > model from a foreign key via Class B's .meta? > Or the Class B could have a

Re: Comments Framework and Authentication

2009-01-06 Thread Tim
OK - this was more or less resolved by following the advice here: http://tinyurl.com/63rd76 This allowed me to essentially check for valid comment deletion permissions before forwarding to the main comment delete view. The only difference was my wrapper view; I checked if the currently-logged-in

Issues with setting attrs and Media when creating my own widget

2009-01-06 Thread Adam Stein
I'm trying to subclass the Select widget, so that I can create an editable scrolling list (done via JavaScript code that I found). My entire class is as follows: --Code-- from django import forms class ComboBox(forms.Select): class Media: js = ("/js/wise/comboBox.js",) def

Django: creating formset is very slow

2009-01-06 Thread Kottiyath Nair
Hi all, My web application sends a medium size data grid (20 elements). I was using formsets for the same. The issue I am facing is that the formset instantiation is very very slow. I timed it and it is taking ~4-7 seconds for it to instantiate. Is there someway the speed can be

Re: Recipe 534109: XML to Python data structure

2009-01-06 Thread Rock
Elementtree is now part of the python distribution. I am using it in a Django app I created for a client to extract data from XML provided by a web service. It works well but the documentation could be clearer. On Jan 6, 9:27 am, "shi shaozhong" wrote: > I am reading in

Re: Circular imports between managers and models

2009-01-06 Thread Ben Eliott
Not that pretty/efficient but you could use contenttype contrib temporarily. IF ClassB has a ForeignKey to Class A could you extract the Class A model from a foreign key via Class B's .meta? Or the Class B could have a callable method which returned the instance of the model you want...

Re: Your IDE of choice

2009-01-06 Thread Vitaly Babiy
Brain do you find it a little slow? Vitaly Babiy On Tue, Jan 6, 2009 at 12:00 PM, Brian wrote: > > For Python/Django I tend to like Komodo's Editor, as I am a fan of > auto-complete and $free. > > > --~--~-~--~~~---~--~~ You received this

strip_tags in django admin issues

2009-01-06 Thread ChrisL
Hi everyone, Been bashing against this one for a while now and am keen for suggestions. I'm trying to apply custom validation to forms within Django's default admin. First up, I want to strip out all html from a Title field. Following the official documentation I have developed this:

Re: Recipe 534109: XML to Python data structure

2009-01-06 Thread Ben Eliott
Perhaps try: http://www.crummy.com/software/BeautifulSoup/ is awesome and has good documentation On 6 Jan 2009, at 15:27, shi shaozhong wrote: > > I am reading in a xml from a web service. I wish to find a Python > script to turn the xml into a Python data array for further > manipulation and

Re: autodiscover not being called? why?

2009-01-06 Thread bongo
> In your application directory, the one created by manage.py startapp, same > as where models.py is. Thanks. Thats what I thought I should put it. This is getting weirder though. Even though I got autodiscover working it still couldn't find it. I then decided to go with the manual method of

Re: strip_tags in django admin issues

2009-01-06 Thread Karen Tracey
On Tue, Jan 6, 2009 at 12:14 PM, ChrisL <1angryc...@googlemail.com>wrote: > > Hi everyone, > > Been bashing against this one for a while now and am keen for > suggestions. I'm trying to apply custom validation to forms within > Django's default admin. First up, I want to strip out all html

Re: Changing tutorial radio button to drop down

2009-01-06 Thread Max
Thanks!! It works now! Max --~--~-~--~~~---~--~~ 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: strip_tags in django admin issues

2009-01-06 Thread Alex Koshelev
Form class really doesn't have `strip_tags` method. I think you are interested in `strip_tags` functon from `django.utils.html`(and your comment says the same). So your method may look like this: def clean_title(self): from django.utils.html import strip_tags

Re: Changing tutorial radio button to drop down

2009-01-06 Thread Daniel Roseman
On Jan 6, 12:20 pm, Max wrote: > Hello, > > Using the tutorial for detail.view, I changed the radio button to a > drop down.  I kept the view the same as the tutorial.   > Seehttp://dpaste.com/106018/ > > When I select the choice on the drop down, I receive the error saying >

Re: Changing tutorial radio button to drop down

2009-01-06 Thread Karen Tracey
On Tue, Jan 6, 2009 at 12:20 PM, Max wrote: > > Hello, > > Using the tutorial for detail.view, I changed the radio button to a > drop down. I kept the view the same as the tutorial. See > http://dpaste.com/106018/ > > When I select the choice on the drop down, I receive the

Changing tutorial radio button to drop down

2009-01-06 Thread Max
Hello, Using the tutorial for detail.view, I changed the radio button to a drop down. I kept the view the same as the tutorial. See http://dpaste.com/106018/ When I select the choice on the drop down, I receive the error saying I didn't make a choice. I have a mistake in either the drop

Re: Performance of include tag

2009-01-06 Thread Michał Moroz
On 2 Sty, 16:12, Rajesh Dhawan wrote: > Here's another way to solve this: Add a rendered_version field to your > Message model and populate it at the time that the message is saved > (perhaps by overriding the Message.save method). This way, you would > just need to

Re: autodiscover not being called? why?

2009-01-06 Thread Karen Tracey
On Tue, Jan 6, 2009 at 9:43 AM, bongo wrote: > > Thanks. It is still not working but probably for another reason (maybe > I have put the admin.py in wrong directory or something). > > Your tip of deleting all the pyc files now results in "Discovered!" > being printed so I

Re: Installing Django 1.0.2...

2009-01-06 Thread Karen Tracey
On Tue, Jan 6, 2009 at 7:16 AM, Jay wrote: > > Karen, thanks for your comments, you are right. > However, it turns out that the file "...\Django-1.0.2-final\django > \utils\__init__.py" has size 0, and it seems when using winzip ( I > just realized why 7-zip may have been

Re: IOError: request data read error

2009-01-06 Thread Chunlei Wu
Thanks a lot Graham. I will upgrade my modwsgi to v2.3. Looking forward to the v3.0 to see if the fix on issue #29 will fix my problem as well. Chunlei On Jan 5, 3:40 pm, Graham Dumpleton wrote: > On Jan 6, 4:41 am, Chunlei  Wu wrote: > > > Hi,

Re: Unable to login (cookies not enabled?)

2009-01-06 Thread Deniz Dogan
On 5 Jan, 11:41, Deniz Dogan wrote: > On 5 Jan, 10:47, Deniz Dogan wrote: > > > > > Hi > > > I'm having trouble when using the AuthenticationForm in Django. It > > tells me that I haven't enabled cookies, even though I'm completely > > sure

Re: Your IDE of choice

2009-01-06 Thread Brian
For Python/Django I tend to like Komodo's Editor, as I am a fan of auto-complete and $free. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Your IDE of choice

2009-01-06 Thread Vitaly Babiy
I use Gedit in gnome and some plugins Works well. Vitaly Babiy On Tue, Jan 6, 2009 at 11:45 AM, Santiago wrote: > > i recently switched to screen + vim with omnicomplete for python and > html... > > komodo edit its pretty good too > > 2009/1/7 martyn

Re: Your IDE of choice

2009-01-06 Thread Santiago
i recently switched to screen + vim with omnicomplete for python and html... komodo edit its pretty good too 2009/1/7 martyn : > > Hi > > http://pyrox.utp.edu.co/ > > Regards > > Bye. > > On Jan 6, 9:34 am, roberto wrote: >> I

django-tagging help

2009-01-06 Thread nbv4
I have django-tagging installed and working fine. I have a model called Plane, which has a few hundred objects in the database, almost all of them with at least one tag. The tagging_tag, and the tagging_taggeditem table in my database looks fine. All the tags are listed there correctly. When I

Re: Shouldn't blank=True imply null=True?

2009-01-06 Thread tofergus
On 06.01-08:03, dchandek wrote: > [ ... ] But shouldn't this be addressed in the > validation code? ps: no, the validation code would exist as it currently does. i am only suggesting a change in convention, not the actual options or their meanings.

Re: Shouldn't blank=True imply null=True?

2009-01-06 Thread tofergus
On 06.01-08:03, dchandek wrote: [ ... ] >> i would be against unifying the options as i can imagine a more complex >> environment (i.e. a database trigger or complex type not known to >> django) where there may be a distinction and i believe the current >> distinction is a clear one.  it may be

autodiscover does not find my admin.py

2009-01-06 Thread bongo
After upgrading old django 0.96 app to 1.0.2 and now using the new admin method I cannot get autodiscover to actually discover my new admin.py I have put print statements in my admin.py to check whether its getting called. What could be going on? I can't see anything I am doing that differs

Re: Circular imports between managers and models

2009-01-06 Thread bruno desthuilliers
on 6 jan, 14:54, Polat Tuzla wrote: (snip) > The reason why I need to separate models and managers into different > files is that they have simply grown to thousands of lines. > It's indeed a very compelling reason !-) But (simple suggestion - I know nothing about your

Re: Shouldn't blank=True imply null=True?

2009-01-06 Thread dchandek
> i would be against unifying the options as i can imagine a more complex > environment (i.e. a database trigger or complex type not known to > django) where there may be a distinction and i believe the current > distinction is a clear one.  it may be worthwile to imply that setting > 'null=True'

Re: Your IDE of choice

2009-01-06 Thread martyn
Hi http://pyrox.utp.edu.co/ Regards Bye. On Jan 6, 9:34 am, roberto wrote: > I tried them all (almost ... I think... at least the free ones). > - Pyscripter is really nice but it is true, it is only for windows. > (If it is developed with python it should be

Recipe 534109: XML to Python data structure

2009-01-06 Thread shi shaozhong
I am reading in a xml from a web service. I wish to find a Python script to turn the xml into a Python data array for further manipulation and to be saved in a .dbf file. Has anyone tried the following script? http://code.activestate.com/recipes/534109/ How do I use it? Regards. David

Re: Shouldn't blank=True imply null=True?

2009-01-06 Thread tofergus
On 06.01-07:38, Lee Braiden wrote: [ ... ] > On Tue, 2009-01-06 at 00:05 -0700, Jeff Anderson wrote: > > Malcolm Tredinnick wrote: > > > I don't think we'd want to get too subtle here. Either it makes > > > sense for all non-text fields, or it doesn't. > > Agreed I simply haven't spent any time

Re: Newb needs help with tracking variables in Templates

2009-01-06 Thread junker37
Yep, reading the documentation helps ;). But here's how your code should look: {% for art in my_art_list %} {% cycle '' '' '' %} {% cylce '' '' '' %} {% empty %}

Re: autodiscover not being called? why?

2009-01-06 Thread bongo
Thanks. It is still not working but probably for another reason (maybe I have put the admin.py in wrong directory or something). Your tip of deleting all the pyc files now results in "Discovered!" being printed so I think autodiscover is actually being run now. Its strange but I thought

Re: Your IDE of choice

2009-01-06 Thread roberto
I tried them all (almost ... I think... at least the free ones). - Pyscripter is really nice but it is true, it is only for windows. (If it is developed with python it should be platform-independent, shouldn' be ?) (no support for sql queries I think) - Eclipse + PyDev (no good support for sql

Re: Distinct users ordered by remote field

2009-01-06 Thread coan
On Jan 6, 12:22 am, Malcolm Tredinnick wrote: > Right now, with trunk or Django 1.0, it's not particularly easy without > using custom SQL or extra(). Ok! Thanks for clearing that up for me, I'll filter it manually.

Re: autodiscover not being called? why?

2009-01-06 Thread Valts Mazurs
1. Check your settings.py if it uses the correct urls.py file. Actually at first check if the correct settings.py is being used 2. Remove .pyc and pyo files from your project's directory to be sure that python interpreter really takes into account changes in source files. Regards, -- Valts On

autodiscover not being called? why?

2009-01-06 Thread bongo
I am in the process of upgrading an old django 0.96 application to 1.0.2 final. I am having real trouble getting the admin app to run with my models included with the new method. After some trial an error it seems that autodiscover is never being called at all in my urls.py. However, the url

Re: Installing Django 1.0.2...

2009-01-06 Thread Jay
Karen, thanks for your comments, you are right. However, it turns out that the file "...\Django-1.0.2-final\django \utils\__init__.py" has size 0, and it seems when using winzip ( I just realized why 7-zip may have been required for unzipping), the 0 size file is *not* written out. In fact

Re: Circular imports between managers and models

2009-01-06 Thread Polat Tuzla
Yes, indeed! It's the models.Manager I'm talking about. I tried to keep my example short and easily comprehensible without code snippets, but i think I've achieved the opposite. Sorry for any inconvenience. Polat Tuzla On Jan 6, 3:37 pm, bruno desthuilliers

  1   2   >