Re: CRUD - grid? Is Django suitable for this?

2007-05-10 Thread Matt Dennewitz
see: extjs.com grid On May 10, 2007, at 9:54 PM, walterbyrd wrote: > > > How about a grid where data is not editable inline, but it still > sortable by clicking on column headers? > > On May 10, 2:50 pm, [EMAIL PROTECTED] wrote: >> Django is good for providing the backend, but most of your

Re: CRUD - grid? Is Django suitable for this?

2007-05-10 Thread walterbyrd
How about a grid where data is not editable inline, but it still sortable by clicking on column headers? On May 10, 2:50 pm, [EMAIL PROTECTED] wrote: > Django is good for providing the backend, but most of your > functionality is probably going to be provided by ajax/javascript > which django

Re: TypeError: expected string or buffer on django.utils.functional.__proxy__

2007-05-10 Thread Malcolm Tredinnick
On Thu, 2007-05-10 at 14:52 +0200, Sandro Dentella wrote: > > > Thanks a lot for your answer that explained what I was underevaluating. > > My example was not the real one and while trying to strip it as simple as > possible I missed to say that I used 'smart_unicode' to get unicode >

Re: TypeError: save_file() got an unexpected keyword argument 'save'

2007-05-10 Thread Malcolm Tredinnick
On Thu, 2007-05-10 at 23:46 +0200, Baurzhan Ismagulov wrote: > Hello, > > I've upgraded r3709 to 0.96 and started getting the following error: > > Traceback (most recent call last): > > File "/var/lib/python-support/python2.4/django/core/handlers/base.py", line > 77, in get_response >

Re: fastCGI

2007-05-10 Thread Malcolm Tredinnick
On Thu, 2007-05-10 at 09:00 -0700, Robert wrote: > Hi all, > > I have the distinct non-pleasure of setting up Django with fastCGI > where I have no shell access and no ftp access below public_html.. > The techs at my hosting provider are nice enough to send along the > fastCGI error output. > >

Alternative ForeignKey selection interface in admin

2007-05-10 Thread orestis
Hello, I've searched and I didn't find any good answers on this: When you use the admin interface to specify a foreign key on a model, you get a nice little drop-down with a cool plus button to add more. This is manageable for about 10-20 entries. For more, there are issues: a) Usability goes

Re: Can managers take parameters? Or can you chain a filter in get_object_or_404?

2007-05-10 Thread Malcolm Tredinnick
On Thu, 2007-05-10 at 13:52 +, AndyB wrote: > This could quite easily be another dumb question but here goes :( > > Can a model have a manager that either takes a parameter or can access > the current logged in user? > > I simply want to filter any query sets returned from a table called >

Re: Users creating subdomains with a django project

2007-05-10 Thread [EMAIL PROTECTED]
I'm no expert - but I picked up on this as you linked to my website and my subdomains article. Since writing that snippet I've moved the subdomain code out into some nifty Middleware that sets a few 'request' variables so they're always available in my views & templates. In another example where

Re: Abstract class mapped to tables in postgres

2007-05-10 Thread Russell Keith-Magee
On 5/10/07, Diego <[EMAIL PROTECTED]> wrote: > > In my model I have an abstract class ServAbstract and ahother subclass > ServA and ServB derived from ServAbstract. > In the databse It might generate three tables: > > table_ServAbstract > table_ServA > table_ServB > > , and when by the admin

Re: test.client: where are context & template?

2007-05-10 Thread Russell Keith-Magee
On 5/11/07, sandro dentella <[EMAIL PROTECTED]> wrote: > > > I'm trying to use test.client to test some pages that are login > protected. > > 1. the docs say that syntax is: >""" >c = Client() >c.login(username='fred', password='secret') ># Now you can access a login protected

Re: how do I get new record PK after save()?

2007-05-10 Thread Russell Keith-Magee
On 5/11/07, Bob Dively <[EMAIL PROTECTED]> wrote: > > On May 10, 5:12 pm, "[EMAIL PROTECTED]" > <[EMAIL PROTECTED]> wrote: > > You have to change it to: > > > > Foo_ID = models.AutoField(primary_key=True, editable=False) > > Ah, ok, so even though the db (MySQL) is taking care of incrementing >

Re: How can I get the admin interface to not ignore newlines in a text field?

2007-05-10 Thread Michael Lake
Alexander Pugachev wrote: > Newlines characters do not break lines in HTML. You need in strings to > show text in few lines in list view. Ah :-) Obvious now why it wasn't rendering the text as text with newlines.. Thanks. -- Michael Lake Computational Research Support Unit Science Faculty,

test.client: where are context & template?

2007-05-10 Thread sandro dentella
I'm trying to use test.client to test some pages that are login protected. 1. the docs say that syntax is: """ c = Client() c.login(username='fred', password='secret') # Now you can access a login protected view """ while the signature is: def login(self, path, username,

TypeError: save_file() got an unexpected keyword argument 'save'

2007-05-10 Thread Baurzhan Ismagulov
Hello, I've upgraded r3709 to 0.96 and started getting the following error: Traceback (most recent call last): File "/var/lib/python-support/python2.4/django/core/handlers/base.py", line 77, in get_response response = callback(request, *callback_args, **callback_kwargs) File

Re: how do I get new record PK after save()?

2007-05-10 Thread Bob Dively
On May 10, 5:12 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > You have to change it to: > > Foo_ID = models.AutoField(primary_key=True, editable=False) Ah, ok, so even though the db (MySQL) is taking care of incrementing the column value on insert, the model has to know that the DB is

Re: how do I get new record PK after save()?

2007-05-10 Thread [EMAIL PROTECTED]
You have to change it to: Foo_ID = models.AutoField(primary_key=True, editable=False) On May 10, 5:06 pm, Bob Dively <[EMAIL PROTECTED]> wrote: > Another n00b question: How do I get a new record's PK after save()? > > If I have: > > class Foo(models.Model): > Foo_ID =

how do I get new record PK after save()?

2007-05-10 Thread Bob Dively
Another n00b question: How do I get a new record's PK after save()? If I have: class Foo(models.Model): Foo_ID = models.IntegerField(primary_key=True, editable=False) Foo_Text = models.CharField(blank=True, maxlength=150) And I have a view that contains something like: if

Re: CRUD - grid? Is Django suitable for this?

2007-05-10 Thread Matt Dennewitz
Check out: http://extjs.com/deploy/ext/docs/index.html Under "Grid" is the best open source grid that youll find today. AJAX- enabled with beautiful inline editing and more. Free for open source projects, cheap to purchase for commercial use. I use it for just about everything! Matt On

Re: CRUD - grid? Is Django suitable for this?

2007-05-10 Thread dballanc
Django is good for providing the backend, but most of your functionality is probably going to be provided by ajax/javascript which django will happily communicate with, but does not provide. You might take a look at: http://developer.yahoo.com/yui/examples/datatable/inlineediting.html

CRUD - grid? Is Django suitable for this?

2007-05-10 Thread walterbyrd
I assume Django is good for this type of thing: A grid that can be sorted by icons on the top of each column. So if I click on the icon on the 3rd row of the grid, the entire grid will be sorted by that field. Also, I would like to be edit the fields like a spreadsheet, if possible.

Re: Scalability / Traffic-Volume Numbers

2007-05-10 Thread David Cancel
We use Django for all our Compete.com websites, performance is great, We've been DUGG and Slashdot'd several times. We are averaging 200-300k users / per month and about 25k django-powered pageviews per day. Cheers, David --~--~-~--~~~---~--~~ You received this

Re: Translation of class names

2007-05-10 Thread Aidas Bendoraitis
Maybe you are calling make-messages from the wrong directory, or Russian is not in the LANGUAGES? Regards, Aidas Bendoraitis aka Archatas On 5/8/07, Pashka R. <[EMAIL PROTECTED]> wrote: > 2007/5/7, Konstantin Pavlovsky <[EMAIL PROTECTED]>: > > > > up! > > nobody used i18n things? > > [offtopic]

Indian share market information

2007-05-10 Thread Ram
Dear members Good morning You can view daily market analysis report at http://www.bcozindia.com/IP_MAR.asp (daily updated after 8 am) You can view daily intraday calls given to the registered members at http://www.bcozindia.com/intraday%20calls.asp (daily updated after 5 pm) Market this week

Indian share market information

2007-05-10 Thread Ram
Dear members Good morning You can view daily market analysis report at http://www.bcozindia.com/IP_MAR.asp (daily updated after 8 am) You can view daily intraday calls given to the registered members at http://www.bcozindia.com/intraday%20calls.asp (daily updated after 5 pm) Market this week

Re: Komodo and Django - code completion / code intellisensing

2007-05-10 Thread oliver
Thanks, for both comments but still no luck. I tried multiple various but it still gives me the same error. my projects are in c:\django-projects\Project1.. I installed the latest beta of komodo, but has the same thing. Python2.5 is installed in c:/python25 and is in my path (from the CMD i can

Re: Validating dynamically generated forms

2007-05-10 Thread dballanc
The problem appears to be because you are using a numeric key as field name. change this: field_id = t['id'] to field_id = str(t['id']) , or use a real string as the name. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

connection mysqldb : wait timeout exceeded

2007-05-10 Thread [EMAIL PROTECTED]
Hello, I have a problem concerning my requests on a basis mysql. All my files are in UTF-8. I have put my data base in UTF-8 and since this moment nothing does not function. None of my requests sql functions. I have the error message: (1205, ' Lock wait timeout exceeded; try restarting

*single* django instance, multiple sites/domains

2007-05-10 Thread Florian Apolloner
Fredrik Lundh described a fine way to serve multiple hosts from a single django instance. As somebody else already asked in the comments, I would like to vary the SITE_ID according to the host (maybe a db lookup). Otherwise I would loose functionality of flatpages/etc., or am I mistaken? Any

Re: Saving Objects from Models??

2007-05-10 Thread anders conbere
Paper_UserReg(request.POST['username'],request.POST['password'],request.POST['name_of_author'],request.POST['email_of_author'],request.POST['college_name'],int(request.P OST['phone_of_author']),None) That is NOT sanitized data, and if you think that putting them in hidden fields in some way

Re: Saving Objects from Models??

2007-05-10 Thread theju
The data is sanitized (taken from a form,cleaned and put in hidden fields, confirmed by the user and then saved to a model...its just that i've not showed all the code) and only then am I posting it to the model. Anyways thanks for the idea on the super __init__ function. Will check it up...

Re: Comments

2007-05-10 Thread cornelius bolten
levi, the following website has a good example online http://www.b-list.org/weblog/2006/07/16/django-tips-hacking-freecomment cornelius Levi McCallum schrieb: > Hi, > > I have been looking into building my first Django project, and I guess > a blog was the most simplest thing I could think of

Re: Named URL problem

2007-05-10 Thread Olivier Guilyardi
[EMAIL PROTECTED] wrote: > I'd suggest trying {% url telemeta-collection-detail object.id %} Thanks that fixed it ! It's not object.id, it's p.id, but it wasn't defined at this point in the template. It put the statement back in the loop where p.id is defined and it works great :) -- Olivier

Comments

2007-05-10 Thread Levi McCallum
Hi, I have been looking into building my first Django project, and I guess a blog was the most simplest thing I could think of for this moment. Now, I come from a PHP background, and Django is very new to me and Python is amazing, yet I do not know it all, so things are a little slow in the

Re: Curious error with Session Variables

2007-05-10 Thread Diego pylorca
Thanks Graham :) it works!! On 5/9/07, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > > > Try reenabling PHP, but delve into the PHP setup and disable the > loading of the PHP mhash module first. > > There have been cases where the PHP mhash module has clashed in some > way with the

fastCGI

2007-05-10 Thread Robert
Hi all, I have the distinct non-pleasure of setting up Django with fastCGI where I have no shell access and no ftp access below public_html.. The techs at my hosting provider are nice enough to send along the fastCGI error output. I am getting a very long set of errors from that.. .. a partial

loaddata and foreignKey: manage.py silently failing

2007-05-10 Thread sandro dentella
hi, I'm trying to play with initial_data fixture. I dumpdata (json format) and reload it cleanly if there are no foreign key contraints on the table. If the tables i'm dumping have foreign keys (in my case holydays/ nation bith in the same fixture), I get an error from the db that

Re: Validating dynamically generated forms

2007-05-10 Thread [EMAIL PROTECTED]
I didn't examine your code but I suggest using form_for_instance or form_for_model to generate a dynamic form from a django app model. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post

Re: Named URL problem

2007-05-10 Thread [EMAIL PROTECTED]
I'd suggest trying {% url telemeta-collection-detail object.id %} --~--~-~--~~~---~--~~ 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

Extending generic views and pagination

2007-05-10 Thread ilDave
Hi all! I'm a new python and django user, and this is my first post in this group! I'm writing a small app that shows a list of objects after a successfull login. I made a custom view to handle authentication and at the same time to keep the semplicity of the generic view

Re: Komodo and Django - code completion / code intellisensing

2007-05-10 Thread Ceph
Hello, Go to Edit > Preferences. Expand the "Languages" group by clicking the [+] symbol. Click "Python". Click the little "Add..." button under "Additional Python Import Directories". Add the directory ABOVE your project and you should have intellisense enabled. On May 9, 12:01 pm, oliver

Named URL problem

2007-05-10 Thread Olivier Guilyardi
Hi, Named URLs don't work for me so far. I'm using rev 5180. In my site's urls.py I have: (r'^', include('telemeta.urls')), In telemeta/urls.py: url(r'^collections/(?P[0-9A-Z._-]+)/?$', 'django.views.generic.list_detail.object_detail', dict(all_collections,

Can managers take parameters? Or can you chain a filter in get_object_or_404?

2007-05-10 Thread AndyB
This could quite easily be another dumb question but here goes :( Can a model have a manager that either takes a parameter or can access the current logged in user? I simply want to filter any query sets returned from a table called Properties depending on the current user without having to

Abstract class mapped to tables in postgres

2007-05-10 Thread Diego
In my model I have an abstract class ServAbstract and ahother subclass ServA and ServB derived from ServAbstract. In the databse It might generate three tables: table_ServAbstract table_ServA table_ServB , and when by the admin interface I add a new ServA, table_ServAbstract y table_ServA might

Saving Objects from Models??

2007-05-10 Thread theju
I have a class in a model(shown below). class Paper_UserReg(models.Model): def __init__(self,username,password,name_of_author,email_of_author,college_name,unique_id=None): self.username = username

Re: TypeError: expected string or buffer on django.utils.functional.__proxy__

2007-05-10 Thread Sandro Dentella
Thanks a lot for your answer that explained what I was underevaluating. My example was not the real one and while trying to strip it as simple as possible I missed to say that I used 'smart_unicode' to get unicode object... and smart_unicode changed in r4904 to "respect deferred evaluation".

Re: assertRedirects

2007-05-10 Thread Russell Keith-Magee
On 5/10/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > On 5/10/07, Jiri Barton <[EMAIL PROTECTED]> wrote: > > > > Why does assertRedirects of TestCase succeeds only if the response > > code is 302? One would think any 3xx should do - they are *redirects* > > at all. At least, I would think

Re: Komodo and Django - code completion / code intellisensing

2007-05-10 Thread Paul Childs
I'm just guessing here but do you have your project in your pythonpath? If not, try this... To put the project on the sys.path you can do it two ways: 1. import sys and then write a line of code sys.path.append("path/to/ project/parent/directory") for example: if the project is located

14 year guy takes on Myspace

2007-05-10 Thread Rico
14 year guy takes on Myspace http://www.uncov.com/2007/5/10/web-2-0-so-easy-a-14-year-old-can-do-it --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: How can I get the admin interface to not ignore newlines in a text field?

2007-05-10 Thread Alexander Pugachev
Newlines characters do not break lines in HTML. You need in strings to show text in few lines in list view. 2007/5/10, Michael Lake <[EMAIL PROTECTED]>: > > > Michael Lake wrote: > > Alexander Pugachev wrote: > >>What is the type of the field? It should be TextField? > > > > Yes it is: > >

Re: widgets.py And unicode

2007-05-10 Thread Thomas Rabaix
Malcolm Tredinnick wrote: > On Thu, 2007-05-10 at 01:45 +0200, Thomas Rabaix wrote: >> Hello, >> >> I have a newform object which I prepopulate some fields : >> >> form = MenuForm() >> >> tu = () >> for m in Menu.objects.all(): >> tu += ((m.id,m),) >>

Re: Feed Displaying Odd Dates

2007-05-10 Thread Malcolm Tredinnick
On Thu, 2007-05-10 at 00:05 -0700, Bryan Veloso wrote: > > The secret is to look in the syndication documentation and search for > > the word "pubdate". There, it talks about the item_pubdate() method that > > can be used to generate the date for a single item. > > I tried that, it'd be... > >

Re: How well should I know Python before using Django?

2007-05-10 Thread Bryan Veloso
> To use Django, a developer should have an exceptionally strong > knowledge of the following area(s) of Python: __ > > dictionaries Amen. Those things still baffle me a bit. Other than that, I'd say #1. --~--~-~--~~~---~--~~ You received

Re: Feed Displaying Odd Dates

2007-05-10 Thread Bryan Veloso
> The secret is to look in the syndication documentation and search for > the word "pubdate". There, it talks about the item_pubdate() method that > can be used to generate the date for a single item. I tried that, it'd be... def item_pubdate(self) return Entry.pub_date But it'd give me