Re: unable to runser ?

2006-07-25 Thread Rajeshwar Singh Jenwar
I m using gcc4.0 with RH Fedora core 4. [EMAIL PROTECTED] ~]$ gcc -vUsing built-in specs.Target: i386-redhat-linuxConfigured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib

Re: Can I use an __init__ method on a model ?

2006-07-25 Thread HBTaylor
I came to this thread with what might be a similar need. For example, if I'm writing a time-tracking app, I might have an Entry model. Whenever I create instances of the model (via the DB API or in views), I would like to have the "start time" field default to now(), so a user entering a time

Re: unable to runser ?

2006-07-25 Thread Jeremy Dunck
On 7/25/06, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > What distribution and version? Did you compile mysqldb from source? > Are you sure the mysql-dev bits match up with the mysql bits? Also, from here: http://www.aspseek.org/faq.php " Can't load DB driver:

Re: unable to runser ?

2006-07-25 Thread Jeremy Dunck
What distribution and version? Did you compile mysqldb from source? Are you sure the mysql-dev bits match up with the mysql bits? This looks like a compilation problem with mysqldb not being linked correctly. from: http://archive.gingerall.cz/archives/public/sablot2003/msg00537.html try making

Re: unable to runser ?

2006-07-25 Thread Rajeshwar Singh Jenwar
Hi Bruno,   I m using mysql-standard-5.0.22-linux-i686 and MySQL-python-1.2.1_p2. Are they not compatible ? Please suggest something. All i want to setup djnago environment and start developing my website.   Thanks for your help.   RSJ  On 7/25/06, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote:

Re: Errors in following tutorial

2006-07-25 Thread Jacob Kaplan-Moss
On Jul 25, 2006, at 7:49 PM, Joe wrote: > However, I have a question: Rock Howard had posted a workaround, > Jacob > then closed the ticket indicating "Transaction management (now on > magic-removal) provides a fix for this problem. Use it. Love it." but > not explicitly describing how the fix

Re: Errors in following tutorial

2006-07-25 Thread Joe
No sooner had I hit the Send button than I found some posts in Google Groups about this (although a previous Google search had not found anything useful). To answer my post, this is ticket #852. However, I have a question: Rock Howard had posted a workaround, Jacob then closed the ticket

Errors in following tutorial

2006-07-25 Thread Joe
I've posted the following comment at http://www.djangoproject.com/documentation/tutorial1/ but thought perhaps it belongs here. n many instances, if you make a mistake following the tutorial, either accidentally or intentionally (e.g., if --to experiment-- you leave out the 'votes' parameter

Re: How many times my method returning dict is called in template?

2006-07-25 Thread Jeremy Dunck
On 7/25/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > which makes more sense to me as I'd prefer to decouple > business logic from template rendering. Ah, in that case, pass your computed dictionary to the template context. django.shortcuts.render_to_response('polls/index.html',

Re: Search Engine for Python and Django

2006-07-25 Thread Tom Dyson
I'm about to release a pure-Python full-text indexer and search engine called Dolphy. My main goals for Dolphy are query performance and convenient integration with Django and other Python web applications. The current feature set includes: * Stemming ('societies' matches 'society') * Multi-term

Re: Select Box filter

2006-07-25 Thread Seth Buntin
You know...after I posted the second reply...i thought a second and realized this would be the solution. Thanks. Seth --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: render_to_response equivalent in urls.py?

2006-07-25 Thread Sean
Could you be looking for something like direct-to-template? http://www.djangoproject.com/documentation/generic_views/#django-views-generic-simple-direct-to-template Guillermo Fernandez Castellanos wrote: > hi, > > I have an index.html file with django template language. > I could do a wrapper

Re: How many times my method returning dict is called in template?

2006-07-25 Thread dr . virago
I get the idea. My trouble is caused by going through a method then dict keys. Your example is the easiest for me I guess (without overhead development of template tags which I never played with... yet). I am thinking of an alternate way, where some 'init' method would stick the dict values as

render_to_response equivalent in urls.py?

2006-07-25 Thread Guillermo Fernandez Castellanos
hi, I have an index.html file with django template language. I could do a wrapper in a views.py to display it, in which i would simply make a render_to_response. But I was just wondering if there was a quicker way to do this directly in the urls.py file, something like (I'm inventing here):

Re: have urlpatterns in urls.py changed?

2006-07-25 Thread cyberco
Oh yeah, and the exception is: == * C:\Python24\lib\site-packages\django-0.95-py2.4.egg\django\core\handlers\base.py in get_response 58. for middleware_method in self._request_middleware: 59. response = middleware_method(request) 60. if response:

Re: Related objects in generic views

2006-07-25 Thread Malcolm Tredinnick
On Mon, 2006-07-24 at 06:30 -0700, sean wrote: > Thanks for the reply. > That solution would involve the object_detail view for the folder, > right? > I am currently using that one, but pagination would be nice to use on > the media list, so I would rather get the object_list working. In the

Re: have urlpatterns in urls.py changed?

2006-07-25 Thread cyberco
Anybody? What should go in urls.py if my project is called 'proj', my app 'app' and there is a method 'index' in views.py? I would say the following, but that doesn't work: (r'^proj/', include('proj.app.views.index)), Thanks any suggesting about what I'm doing wrong here?!

Rich text editor with code snippets

2006-07-25 Thread tomass
Hi Folks, I'm wondering which rich text editors people are using in their apps, and if any of them (that have been successfully integrated into the admin app) have the capability to display code snippets. Basically, what I'm looking for is a code block to render in fixed width font and with all

Re: Is MS SQL Server support coming anytime soon?

2006-07-25 Thread shredwheat
I know little about this, but oracle is found in the django db backends. It uses cx_Oracle, which I also know nothing about. http://code.djangoproject.com/browser/django/trunk/django/db/backends/oracle --~--~-~--~~~---~--~~ You received this message because you

edit in admin change list?

2006-07-25 Thread Tamara D. Snyder
Hi Folks, Sorry if this has been asked/answered before. I searched the docs and the old django-users messages and I didn't see it. I am wondering if there is a way to make changes from the admin change list, instead of only from the admin edit list. For example, I have a model called

Re: Select Box filter

2006-07-25 Thread Umbrae
I'm not sure how portable this code is, but this little test I just made will do it for you: window.onload = function() { document.getElementById('test').onchange = function() { alert('this is a test'); }; }; Hello Hello Again As you can see, you add a function to window.onload so that

How many times my method returning dict is called in template?

2006-07-25 Thread dr . virago
Hi, I would need clarifications on the processing of templates as I bumped into reality today: From a template, I call a model method that returns a dict (of statistics), i.e something like: {{ model.method.dict_key_A }} {{ model.method.dict_key_B }} {{ model.method.dict_key_C }} Today I

multiple django-installations

2006-07-25 Thread patrickk
we´re currently building 2 bigger websites on one dedicated server. my question is: should we use one or two django-installations? any pros/cons? more details: we have to share the users between the two sites, but that will be possible with having multiple databases. so, I guess that´s not a

Re: Search Engine for Python and Django

2006-07-25 Thread Kevin
On the recommendation that ljworld uses swish-e [1], I incorporated that into my django powered site. The Python interface I use is [2]. Here's the code my search view uses: handle = SwishE.new(SEARCH_INDEX_FILE) results = handle.query(terms) ids = [int(x.getproperty('swishdocpath')) for x in

Re: Can I use an __init__ method on a model ?

2006-07-25 Thread Ruben
It's simply that the model wants to hold data that are not DB fields. These additional data are calculated using DB data. Currently, the model creates these data lazily when requested first time. But calculating them with model-instance-creation would be simpler and result in smaller code. I

Re: Search Engine for Python and Django

2006-07-25 Thread Bill de hÓra
Wade Leftwich wrote: > Solr does look good. I'm checking it out along with NXLucene > (http://www.cps-project.org/sections/projects/nxlucene) , which is a > similar architecture (search server with an XML API), built with > pyLucene and Twisted. From A Zope World Perspective NXLucene looks good

one-many inline editting

2006-07-25 Thread Josh Trutwin
I'm trying to write a template similar to what the admin does for inline editing of one-many FK objects. But I'm wondering if there is a more dynamic way (Ajax?) to do this. My app is simple, create an entry form for a user to enter a new status report. The report can have many

Re: Lost in forms

2006-07-25 Thread Spider
toth anna wrote: > I have lost in form processing while learning django. > I need to create a simple object (say 'product') with some > basic validation (required fields, +minimal logic), but > after filling a form and submit it everything looks ok but > the object does not get saved and nothing

Re: Is MS SQL Server support coming anytime soon?

2006-07-25 Thread Jeremy Dunck
On 7/25/06, Ray <[EMAIL PROTECTED]> wrote: > > We're using Oracle and SQL Server at work--the lack of support for > those two is really a killer. > > What is involved in creating such a support for a DB--any doc/anything > to start? Maybe I can take a look at the SQL Server side. The short

Re: Lost in forms

2006-07-25 Thread Todd O'Bryan
On Jul 25, 2006, at 5:32 AM, toth anna wrote: > > Kenneth Gonsalves <[EMAIL PROTECTED]> írta: > >> look under 'forms and manipulators' in the docs > > You do not think seriously i didn't read it, do you? > It shows many not-so-good solution of one problem, and it is > a didactic misconception

Deploy Django into a subfolder/subdirectory

2006-07-25 Thread Chris H.
Hi, I'm trying to deploy Django into a subfolder of a domain, http://www.mydomain.com/projects/ I can call up http://www.mydomain.com/projects/admin/ and I get the login screen OK, but when I successfully log in I get sent to http://www.mydomain.com/admin/ -- which isn't correct. I should get

Re: Is possible to have ManyToMany relation....

2006-07-25 Thread PythonistL
Aidas, Thank you for your help. I checked http://www.djangoproject.com/documentation/models/m2m_and_m2o/ but I can not find if it works with 0.91 version, that I use. Do you know that? Thank you for the reply L, --~--~-~--~~~---~--~~ You received this message

Re: unable to runser ?

2006-07-25 Thread Bruno Desthuilliers
Rajeshwar Singh Jenwar wrote: > Hi All, > > I m new to django. > I m getiing problem with Tutorial-1. (snip) > line 3, in ? > from django.core import db > File "/usr/lib/python2.4/site-packages/django/core/db/__init__.py", > line 23, in ? > raise ImproperlyConfigured, "Could not load

Re: Simple: How do you organize your directories?

2006-07-25 Thread Sean Schertell
Thanks guys! Very helpful tips :-) Sean On Jul 25, 2006, at 6:03 PM, Ivan Sagalaev wrote: > > Sean Schertell wrote: >> In the tutorial, it says to not keep your app in the document root >> for security reasons. Okay that makes sense. But what *does* go in >> the document root? > > I keep all

Re: Lost in forms

2006-07-25 Thread Kenneth Gonsalves
On 25-Jul-06, at 3:02 PM, toth anna wrote: > You do not think seriously i didn't read it, do you? > It shows many not-so-good solution of one problem, and it is > a didactic misconception not to write at last a "the final > working version is..." paste what you tried to do somewhere and we can

Re: Is possible to have ManyToMany relation....

2006-07-25 Thread Aidas Bendoraitis
Yes, it is possible, but you will have to add related_name to each of the relationships to the same table. See here: http://www.djangoproject.com/documentation/models/m2m_and_m2o/ Also I would suggest you to rename "created" to "creator" and "access" to "accessors", although it is not a big

Re: Lost in forms

2006-07-25 Thread toth anna
Kenneth Gonsalves <[EMAIL PROTECTED]> írta: > look under 'forms and manipulators' in the docs You do not think seriously i didn't read it, do you? It shows many not-so-good solution of one problem, and it is a didactic misconception not to write at last a "the final working version is..." In my

OneToOneField: final clarifying

2006-07-25 Thread Aidas Bendoraitis
Hello Djangoers! What is the current status of OneToOneField? Many developers implement one-to-one relationship using ForeignKey's. So is OneToOneField deprecated? Is it because models are going to be inheritable and the model inheritance will be the substitute for OneToOneField? What about

Re: Lost in forms

2006-07-25 Thread Kenneth Gonsalves
On 25-Jul-06, at 2:27 PM, toth anna wrote: > Fromcommand line or in the admin site everything went right. > I have to write customized data entry forms, and need some > guidance to start. My models and custom views (listings) are > fine already. Unfortunately old cgi experience didn't >

Re: Simple: How do you organize your directories?

2006-07-25 Thread Ivan Sagalaev
Sean Schertell wrote: > In the tutorial, it says to not keep your app in the document root > for security reasons. Okay that makes sense. But what *does* go in > the document root? I keep all my code off the webroot including js and css (I have aliases for them to be visible from the web).

Re: Simple: How do you organize your directories?

2006-07-25 Thread Kenneth Gonsalves
On 25-Jul-06, at 1:35 PM, Sean Schertell wrote: > In the tutorial, it says to not keep your app in the document root > for security reasons. Okay that makes sense. But what *does* go in > the document root? nothing (ok, maybe favicon.ico) > > I generally like to do things like this this: > >

Re: Lost in forms

2006-07-25 Thread toth anna
Darryl Caldwell <[EMAIL PROTECTED]> írta: > did you try adding your object from the command line? Using the interactice session? Fromcommand line or in the admin site everything went right. I have to write customized data entry forms, and need some guidance to start. My models and custom views

Is possible to have ManyToMany relation....

2006-07-25 Thread PythonistL
Is possible to have ManyToMany and OneToMany relation like this? class User(meta.Model): Login=meta.CharField(maxlength=50,unique=True) Email=meta.EmailField(_('e-mail address'),blank=True) class Gallery(meta.Model): Title = meta.CharField(_("title"), maxlength=80) created

Simple: How do you organize your directories?

2006-07-25 Thread Sean Schertell
In the tutorial, it says to not keep your app in the document root for security reasons. Okay that makes sense. But what *does* go in the document root? I generally like to do things like this this: projects/ foo.com/ application/ public/ bar.com/

unable to runser ?

2006-07-25 Thread Rajeshwar Singh Jenwar
Hi All,   I m new to django. I m getiing problem with Tutorial-1. -- [[EMAIL PROTECTED] ttut]# python manage.py runserverValidating models...Unhandled