Re: Import models from CSV files?

2009-01-06 Thread Valts Mazurs
Hello, Maybe this app could be helpful for you: http://code.google.com/p/django-batchimport/ If you have to import lots of data I would suggest creating python script that reads the files and inserts the data in database either using Django ORM or plain SQL. In case of hundreds of thousands of ro

Re: Combine QuerySets from two different child models

2009-01-06 Thread klaasvanschel...@gmail.com
since this turns up first I thought I'd post my quick & dirty solution here for the copy-pasters of the interwebs: def children(self): class Union(object): def __init__(self, cmp_on, sources): self._sources = sources self._tops = [None] * le

Re: Views triggering twice

2009-01-06 Thread Fangzx
I have encountered the same problem, and after reading the content above, I solved the problem. It caused by the following line in my html template: I replaced with: Thanks for all. --~--~-~--~~~---~--~~ You received this message because you are subscrib

Re: inlineformset_factory KeyError after updating

2009-01-06 Thread Alistair Marshall
I have created a cut down version of my project and placed it on my website [1] The project was part of a pinax project, though I have ripped out the main app and made it stand alone. As a result there is no facility to login or manage accounts. I have commented out or removed all parts of permis

models problem

2009-01-06 Thread Vicky
Some datas in my database are missing when i view it using models.Am using MYSql db. The datas that are in database when viewing using querry browser where not seen when using model to access database. can anyone help --~--~-~--~~~---~--~~ You received this message

Re: models problem

2009-01-06 Thread Christian Joergensen
Vicky wrote: > Some datas in my database are missing when i view it using models.Am > using MYSql db. The datas that are in database when viewing using > querry browser where not seen when using model to access database. can > anyone help Does the ORM "calculated" SQL correspond to the SQL you ar

Re: Newb needs help with tracking variables in Templates

2009-01-06 Thread bruno desthuilliers
On 6 jan, 02:00, "django_fo...@codechimp.net" wrote: (snip) > First, let me take some Motrin for my very sore rear end. I have been > reading documentation. In fact, I started with the tutorials on the > site that walks you through writing the polling application, then > moved on to some doc

Re: Permissions: is something wrong with them?

2009-01-06 Thread Russell Keith-Magee
On Tue, Jan 6, 2009 at 4:26 AM, Artem Skvira wrote: > On Jan 2, 6:26 pm, Artem Skvira wrote: >> Would anyone be able to comment on the issues raised? > Can I get Russell's comment on that? I'm not entirely sure why I've been flagged personally on this. In addition, it's hard to comment, because

Re: Dynamic OR statements

2009-01-06 Thread Bluemilkshake
That looks great Alex, thanks a lot. Also being a Python noob I wasn't aware you could chain together operators in that way. (I assumed, like C# you could only use += or -=, but |= is very cool). Surrounded by geniuses...I love it! -M On Jan 5, 5:09 pm, "alex.gay...@gmail.com" wrote: > You need

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

2009-01-06 Thread Lee Braiden
Hi all, 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 thinking about this particular > problem in

Your IDE of choice

2009-01-06 Thread HB
Hey, What is your favorite IDE for coding Django projects? Any ideas about PyDev and ActiveState Komodo IDE? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send em

Re: Your IDE of choice

2009-01-06 Thread James Matthews
Netbeans or WingIDE for me. On Tue, Jan 6, 2009 at 1:48 PM, HB wrote: > > Hey, > What is your favorite IDE for coding Django projects? > Any ideas about PyDev and ActiveState Komodo IDE? > Thanks. > > > -- http://www.goldwatches.com/ http://www.jewelerslounge.com/ --~--~-~--~~--

Re: Your IDE of choice

2009-01-06 Thread HB
But Python support in NetBeans is still under development, right? On Jan 6, 1:50 pm, "James Matthews" wrote: > Netbeans or WingIDE for me. > > On Tue, Jan 6, 2009 at 1:48 PM, HB wrote: > > > Hey, > > What is your favorite IDE for coding Django projects? > > Any ideas about PyDev and ActiveState

Re: File upload failing occasionally

2009-01-06 Thread ppdo
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 https://bugs.webkit.org/show_bug.cgi?id=5760 that describes something very sim

Re: Your IDE of choice

2009-01-06 Thread Nikolay Panov
Emacs (23, +Rope, +auto-complete.el), indeed. Have a nice day, Nikolay. On Tue, Jan 6, 2009 at 14:48, HB wrote: > > Hey, > What is your favorite IDE for coding Django projects? > Any ideas about PyDev and ActiveState Komodo IDE? > Thanks. > > > --~--~-~--~~~---

Re: StringList Field Type

2009-01-06 Thread Tiago S.
Hello again Bruno! This solution is neat, thanks for that. I didn't know about getattr until now. Regards, Tiago On Jan 5, 9:05 pm, bruno desthuilliers wrote: > Well, then there's another simple denormalization: > > class Question(models.model): >     question = models.TextField(...) >     an

Re: inlineformset_factory KeyError after updating

2009-01-06 Thread john
On Jan 6, 2009, at 4:18 AM, Alistair Marshall wrote: > When creating a new feed unit the system works fine. However if you go > and edit an existing feed unit, an error gets thrown when saving the > form. The problem is this bit in main_form.html, around line 37: {% ifnotequal field.label

Circular imports between managers and models

2009-01-06 Thread Polat Tuzla
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 "models.py" for which I can't find a solution. Assuming that I need to sepa

Re: Your IDE of choice

2009-01-06 Thread James Matthews
Yes it is however i still find it to be very powerful and i really like it! On Tue, Jan 6, 2009 at 2:00 PM, Nikolay Panov wrote: > > Emacs (23, +Rope, +auto-complete.el), indeed. > > Have a nice day, >Nikolay. > > > > On Tue, Jan 6, 2009 at 14:48, HB wrote: > > > > Hey, > > What is your favo

Re: Your IDE of choice

2009-01-06 Thread Tim Chase
> What is your favorite IDE for coding Django projects? screen + vim + pdb + bash [+ lynx/dillo/firefox/epiphany for browsing] [+ sqlite3/mysql/psql for console database access] > Any ideas about PyDev and ActiveState Komodo IDE? Not tried either here. -tim --~--~-~--~~

Re: Extra attributes in model fields

2009-01-06 Thread sagi s
Any suggestion on how to decorate a model with extra attributes? On Jan 1, 9:39 am, sagi s wrote: > I'd like to store extra attributes in the model fields so I can > control the subsequent field-specific behavior from there. > > Let's say I have a model that stores metrics I then need to chart.

Re: Your IDE of choice

2009-01-06 Thread sagi s
Pydev works pretty well, including visual debugging of the test server + test suite On Jan 6, 1:48 pm, HB wrote: > Hey, > What is your favorite IDE for coding Django projects? > Any ideas about PyDev and ActiveState Komodo IDE? > Thanks. --~--~-~--~~~---~--~~ You

Re: Your IDE of choice

2009-01-06 Thread Nikolay Panov
You can try to read this one: http://code.djangoproject.com/wiki/Emacs Have a nice day, Nikolay. On Tue, Jan 6, 2009 at 15:59, HB wrote: > > Does it supports Django templates? or just Python code? editing? > > On Jan 6, 2:46 pm, "James Matthews" wrote: >> Yes it is however i still find it

Re: Your IDE of choice

2009-01-06 Thread David Marko
I really like PyScripter http://pyscripter.googlepages.com/ , its very fast and has many, many features. They even have a small readme for Django debugging, here http://pyscripter.googlepages.com/django David http://www.tcl-digitrade.com --~--~-~--~~~---~--~~ You

Re: Circular imports between managers and models

2009-01-06 Thread Lee Braiden
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 > "models.

Re: Circular imports between managers and models

2009-01-06 Thread bruno desthuilliers
On 6 jan, 13:42, 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 > "models.py" for which I ca

Re: Your IDE of choice

2009-01-06 Thread bruno desthuilliers
On 6 jan, 12:48, HB wrote: > Hey, > What is your favorite IDE for coding Django projects? emacs (+ecb + python-mode + nxhtml-mode + javascript-mode + quite a lot of other plugins) > Any ideas about PyDev and ActiveState Komodo IDE? No. --~--~-~--~~~---~--~~ Yo

Re: Permissions: is something wrong with them?

2009-01-06 Thread Artem Skvira
Hi Russ, Thanks for your reply. There was no particulary strong reason why I addressed the question to you, I guess the only reason I can think of is that I know of your existence :) On the question of assigning permissions to the model: as far as I understand, the described in [1] syntax is onl

Re: Your IDE of choice

2009-01-06 Thread Pigletto
> What is your favorite IDE for coding Django projects? Netbeans -> see http://wiki.netbeans.org/Python > Any ideas about PyDev and ActiveState Komodo IDE? PyDev uses Eclipse so you must be prepared for huge amount of hangups, strange exceptions, lost workspaces, unpredictable behaviour etc. (the

Re: Circular imports between managers and models

2009-01-06 Thread bruno desthuilliers
On 6 jan, 14:08, Lee Braiden wrote: > 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 circu

Re: Your IDE of choice

2009-01-06 Thread Pigletto
> I really like PyScripterhttp://pyscripter.googlepages.com/, its very > fast and has many, many features. Interesting but Windows only... -- Maciej Wisniowski --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: Your IDE of choice

2009-01-06 Thread Damien Hou
TextMate with Django and Django Templates bundles is pretty neat On Tue, Jan 6, 2009 at 7:48 PM, HB wrote: > > Hey, > What is your favorite IDE for coding Django projects? > Any ideas about PyDev and ActiveState Komodo IDE? > Thanks. > > > -- Best Regards, Damien --~--~-~--~~

db_index name clashes with table name

2009-01-06 Thread Thomas Guettler
Hi, sad,but true, the index name created by a database Field with db_index=True clashes with a table name. Is there any way to force a different name for the index as you can with table names? Looking at the docs I looks like you can't: http://docs.djangoproject.com/en/dev/ref/models/field

Re: inlineformset_factory KeyError after updating

2009-01-06 Thread Alistair Marshall
2009/1/6 : > The problem is this bit in main_form.html, around line 37: > > {% ifnotequal field.label "Id" %} > {{ field }} > {% endifnotequal %} > > The omitted ID is causing your KeyError; leave it in the form. > Excellent, It had been removed to neaten the form. Silly really. Th

Re: Your IDE of choice

2009-01-06 Thread HB
Does it supports Django templates? or just Python code? editing? On Jan 6, 2:46 pm, "James Matthews" wrote: > Yes it is however i still find it to be very powerful and i really like it! > > On Tue, Jan 6, 2009 at 2:00 PM, Nikolay Panov wrote: > > > > > > > Emacs (23, +Rope, +auto-complete.el), i

Re: Circular imports between managers and models

2009-01-06 Thread Polat Tuzla
Thank you very much for both of your responses. Local imports solved my problem. I had previously tried this without success, apparently there was another mistake in the code. Upon Bruno's suggestion I gave it another try, and it worked! The reason why I need to separate models and managers into

Re: Django forms usage with mutliple rows

2009-01-06 Thread Jeff FW
Yup, that's exactly what formsets are for. You essentially take the form you've already written, and pass it to formset_factory() to create a list of identical forms. http://docs.djangoproject.com/en/dev/topics/forms/formsets/#topics-forms-formsets -Jeff On Jan 6, 1:02 am, "Kottiyath Nair" wr

RE: Your IDE of choice

2009-01-06 Thread Trivedi, Apaar
I use Eclipse with PyDev and PyDev extensions. I really like it, but I prefer the eclipse sort of IDE's. From: django-users@googlegroups.com [mailto:django-us...@googlegroups.com] On Behalf Of Damien Hou Sent: Tuesday, January 06, 2009 8:43 AM To: django-user

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 wrote: > On 6 jan, 14:08, Lee Braiden

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 "viewi

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 mapp

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 Tu

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. --~--~-~--~~~---~--~~ You received this messa

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 que

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 modifying

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 %} You

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 th

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: 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 platform-independent, > shouldn' b

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: 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 project...) don't you see

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 from

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 wo

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. --~--~-~--~~

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 loo

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 tried them all (almost ... I think... at least the free ones). >

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 : > > > > Hi > > > > http://pyrox.utp.ed

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 django-users@googl

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 that I have. I get this error: > > > "Your Web browser

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, > > >        We have a web app running on Django

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 required for unzipping),

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 think autodiscover is ac

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 write {{ message.rendered_ve

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 down

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 error saying > I did

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 > I didn't make a choi

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 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 dja

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 fro

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 su

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 t

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 message because you ar

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... No

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 a xml from a web service.

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 increased?

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 __in

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 u

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 callable method which returned

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 MyTestCase(django.test.TestCase

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 , Rege

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 ha

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 replace > for example, but

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 Python/Django/PHP/Drupal > proje

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- 117.90750668

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 startup time is too

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 file editing. > I've used pydev for a wh

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" wrote: > On Sat, Jan 3, 200

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 Python > > On Tue, Jan

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 libra

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 can't do in >> django? yes

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 DJANGO_SETTING

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: "Op

? 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 =

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 t

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 being closed when try

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 my little test site though

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 ar

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 rel

  1   2   >