Re: WebFaction warning

2009-11-27 Thread Prashanth
Hi Kennath, On Sat, Nov 28, 2009 at 11:14 AM, Kenneth Gonsalves wrote: > > Please refrain from spreading FUD from one instance. what do you mean? He is not spreading FUD, service is what we all pay for, if it happens it is, let that be one or multiple instances. He is just

Re: inspectdb throws "_mysql_exceptions.Warning: Can't read dir of './test/' (errno: 13)"

2009-11-27 Thread NicoEchániz
I started a new thread because google groups does not let me reply this old post, but I'm sending this just in case someone else stumbles upon this issue. On Jan 30, 2:32 pm, "dick...@gmail.com" wrote: > pretty basic database i created using the "polls" tutorial, and now >

Re: Restrict admin to superusers only

2009-11-27 Thread Mike Dewhirst
chefsmart wrote: > Is there a way to allow only superusers to login to and use the admin > section? Users with is_staff = True do exist and that can't be changed > because this app is in use and makes use of is_staff in some other > way. I believe so. Create a group (say no_admin?) with no

Re: WebFaction warning

2009-11-27 Thread Kenneth Gonsalves
On Saturday 28 Nov 2009 10:58:27 am digicase wrote: > A warning to anyone using or about to purchase WebFaction hosting. Our > shared server (web44) went down on Thursday and it is only now, 40 > hours later that they have been able to restore the server to anything > near working order. > these

WebFaction warning

2009-11-27 Thread digicase
A warning to anyone using or about to purchase WebFaction hosting. Our shared server (web44) went down on Thursday and it is only now, 40 hours later that they have been able to restore the server to anything near working order. I am sad to report this, as up until now I had complete faith and

Restrict admin to superusers only

2009-11-27 Thread chefsmart
Is there a way to allow only superusers to login to and use the admin section? Users with is_staff = True do exist and that can't be changed because this app is in use and makes use of is_staff in some other way. Can this be achieved without changing the code in contrib.admin or contrib.auth? --

Re: django on jython

2009-11-27 Thread Prashanth
On Sat, Nov 28, 2009 at 6:20 AM, Xbiton wrote: > by setting the DATABASE_ENGINE = 'doj.backends.zxjdbc.mysql' and > starting You just say the engine as mysql \> Error was: No module named mysql > \ Its clearly the issue "No module name mysql" install

django on jython

2009-11-27 Thread Xbiton
Hi, I've installed djando on jython, which seems to work nice. I've only a problem using the django-jython sql package which I installed and by making some tests, seems to work properly. by setting the DATABASE_ENGINE = 'doj.backends.zxjdbc.mysql' and starting jython manage.py runserver I recive

Re: Save as new and files

2009-11-27 Thread Tim Valenta
Does the newly created model lack a path entirely, or does it have a path that points to a false location? In other words, is the right path making it to the database, yet not to the filesystem to copy the file? Also, since you didn't mention anything about it, I would remind you that a proper

Retrieving a subclass instance when all you have is its parent class instance

2009-11-27 Thread Rodrigo Cea
I have a parent Class "ComponentBase", with abstract=False, that many other classes extend. The parent Class has a ForeignKey relation to another class, "Band". It is convenient to be able to get a list of all of a band's components without having to explicitly list each component class. I am

Re: Cannot assign None, does not allow null values

2009-11-27 Thread Tim Valenta
You've got a lot of models in that file. Which one are you trying to save when it throws the error? By the way, I notice that your "ItemWithMedia" class is probably creating a database table.. if you never need to manipulate it direct (ie, you only make subclasses of it), I might suggest putting

Re: Save as new and files

2009-11-27 Thread Pawel Pilitowski
Hey, Mainly I would like to know what the intended behavior of "save as new" is supposed to be, if it is supposed to copy the files, I will look further into why its not working for me. I was assuming that it would, and didn't find anything in the documentation to the contrary. If it is

Re: Cannot assign None, does not allow null values

2009-11-27 Thread onoxo
btw. here is a full code: models.py http://snipt.net/vedran/django-models-cannot-assign-none?key=ba151d53cbe8e7c6fd8cfd7993c72897 admin.py http://snipt.net/vedran/django-admin-cannot-assign-none?key=53222b89cf415d0a0a7750f1510ab8a1 so... when i go to create new Actual item i get this error:

style guide/autoformatter/linter for Django templates?

2009-11-27 Thread Steve Howell
I am wondering if there is a style guide anywhere for writing Django templates. Also, are there programs to automatically format your templates...to indent block tags, for example? I know there are autoformatters for HTML, but I am not aware of any tools that handle Django tags. Also, it would

Cannot assign None, does not allow null values

2009-11-27 Thread onoxo
i get this error when i try to create new item in admin site. here is my models.py import datetime from django.db import models from tinymce import models as tinymce_models from filebrowser.fields import FileBrowseField class ItemWithMedia(models.Model): created =

Re: Setting a fontName in a style

2009-11-27 Thread Karen Tracey
On Fri, Nov 27, 2009 at 2:53 AM, adelaide_mike wrote: > One final question if I may (well I hope its the last). > > In my standard report generating view I need to use Arial font (for > example). > > I have studied the reportlab docs (Paragraphs chapter) for hours

Re: Installation Problem on Mac OS Leopard

2009-11-27 Thread Christophe Pettus
On Nov 27, 2009, at 1:01 PM, Eric wrote: > Why doesn't > Mac have an easy way to install stuff. I think we'll need a bit more information about the problem you're having; installing Django 1.1 on my Leopard MacBook Pro was entirely painless. What errors are you getting at which steps? --

Re: better error handling in templatetags?

2009-11-27 Thread KONTRA, Gergely
Thanks. With a one-line patch now I can debug templatetags :))) Oh dear, target milestone is 1.2 I don't know why is it so slow. Gergo +-[ Gergely Kontra  ]--+ |   | | Mobile:(+36 20)356 9656 

Installation Problem on Mac OS Leopard

2009-11-27 Thread Eric
I'm trying to get Django installed and I can't figure out why its not working. I purchased the book Djang 1.0 web site development and the install instructions in the book are identical to instructions on the Django site. It seems simple enough but for some reason I always catch hell when it comes

Re: Issue when saving a model form

2009-11-27 Thread jul
thank you. Excluding city from the ModelForm seems to work as well... class AddRestaurantForm(ModelForm): rating = forms.IntegerField(widget=forms.Select(choices = RATING_CHOICE), required=False) city = forms.CharField(max_length=100) class Meta: model = Restaurant

Re: Issue when saving a model form

2009-11-27 Thread Steve Howell
I am not fully tracking to the problem here, but when it comes to overriding save() behavior on forms, I find the following helper to be handy: def build_instance_from_form(model_form): instance = model_form.save(commit=False) return instance Then in your view code do something like

Re: admin for "regular" users - still a bad idea?

2009-11-27 Thread Count László de Almásy
On Nov 27, 12:30 am, Skylar Saveland wrote: > ha, reading lists on mobile ... I didn't even see that you said that > each user has their own table (still hard to see exactly how this is > efficient/possible/done though).   what do you mean? i just meant that in my

Re: Issue when saving a model form

2009-11-27 Thread jul
The problem is that city name is not unique. Can I pass the city instance in the overrided AddRestaurantForm's save method? thank you On Nov 27, 5:12 pm, Tim Valenta wrote: > Try overriding your AddRestaurantForm's "save" method: > >     def save(self, commit=True): >

Re: CSRF gone haywire

2009-11-27 Thread Tim Valenta
Okay... so here's the problem. I've been using a template override for change_form.html to always check the object-tools block and add things in there. I tried to be more modular about it, but it never seemed to work out quite right. So I'm overriding the entire template on my own, and I must

Re: mixed Case Field names in the database columns

2009-11-27 Thread Tim Langeman
Thanks! Don't know how I missed it in the docs. -Tim On Nov 27, 11:28 am, Karen Tracey wrote: > On Fri, Nov 27, 2009 at 9:26 AM, Tim Langeman wrote: > > > I know that there is a setting to configure the db_table in django, > > but I haven't found

Re: CSRF gone haywire

2009-11-27 Thread Tim Valenta
> AFAIK admin uses CSRF by default in SVN version. I'm sorry, but I have no idea what that means. What is "AFAIK"? I've read that page you've linked to, and I fail to see what I've done wrong (since I didn't explicitly *do* anything). Tim On Nov 27, 10:18 am, rebus_

Re: CSRF gone haywire

2009-11-27 Thread rebus_
2009/11/27 Tim Valenta : > Has anybody else experienced a senseless failure of the dev trunk's > CSRF verification?  Very suddenly this morning, Django won't let me > change anything in my admin sites.  I didn't update my copy of the SVN > trunk, but as soon as I took

CSRF gone haywire

2009-11-27 Thread Tim Valenta
Has anybody else experienced a senseless failure of the dev trunk's CSRF verification? Very suddenly this morning, Django won't let me change anything in my admin sites. I didn't update my copy of the SVN trunk, but as soon as I took myself off of the admin-ui branch, it flipped out. Step by

Re: Django + Cherokee Web Server

2009-11-27 Thread hcarvalhoalves
On Nov 27, 5:56 am, Jarek Zgoda wrote: > Wiadomo¶æ napisana w dniu 2009-11-27, o godz. 00:31, przez   > hcarvalhoalves: > > > I'm able to configure Cherokee to run my Django project correctly, > > using the included wizard. The problem is, if an exception is thrown, > >

Re: Newbie: is it possible to re-render a tag/filter after adding it to the web page as string

2009-11-27 Thread Andy McKay
On 09-11-27 4:41 AM, Allen wrote: > Dear Bruno > > Great to hear that there are other ZOPE users among us. More than you might think ;) > When I work with ZOPE I code with dtml. I only found out about ZPT > when I quiz ZOPE and never got familiar with it afterwords. The first > thing they teach

Re: mixed Case Field names in the database columns

2009-11-27 Thread Karen Tracey
On Fri, Nov 27, 2009 at 9:26 AM, Tim Langeman wrote: > I know that there is a setting to configure the db_table in django, > but I haven't found any similar setting for the field names. > There is one: http://docs.djangoproject.com/en/dev/ref/models/fields/#db-column

Re: Best UI for letting users select an item from a large selection of records?

2009-11-27 Thread David De La Harpe Golden
Stodge wrote: > Thanks. I have the DataTables plugin working so I can filter my > records. Now I just need to work out how to select specific ones from > the table and work with them. > Well, that depends a bit on what you want. if you, say, used javascript to directly populate a field in a

Re: better error handling in templatetags?

2009-11-27 Thread Karen Tracey
On Fri, Nov 27, 2009 at 5:58 AM, KONTRA, Gergely wrote: > Seems like you built your own project, and not using my zip. > Yes, because just cut and pasting the template tag into my existing working test project seemed easier than downloading a zip file. But even after

Re: Issue when saving a model form

2009-11-27 Thread Tim Valenta
Try overriding your AddRestaurantForm's "save" method: def save(self, commit=True): self.instance.city = get_object_or_404(City, name=self.instance.city) # Finish by passing control back to the normal Django flow: super(AddRestaurantForm, self).save(commit) I think

Re: add permission by name instead of number

2009-11-27 Thread Tim Valenta
You can expand your .add() statement slightly, by passing it an object instead of an id: request.user.user_permissions.add(Permission.objects.get(name='some permission name')) You could alternatively do a lookup with the "codename='some_name'" instead of the human-readable name. The codename is

Re: distinct related objects

2009-11-27 Thread Tim Valenta
It looks like the problem is that you're trying to group by Technology, but your queryset is in Projects. You could experiment with the "regroup" template tag ( http://docs.djangoproject.com/en/dev/ref/templates/builtins/#regroup ) It's a little hard to understand at first, but I think it's

Issue when saving a model form

2009-11-27 Thread jul
Previous post wasn't finished. Wrong key :( Here's the complete one: Hi, I've got the ModelForm and Model shown below. I'm overriding the 'city' field to get a CharField instead of a City foreign key. When saving the Restaurant instance, it returns ""Restaurant.city" must be a "City" instance".

Re: How can I change the values of select options created by a ModelForm?

2009-11-27 Thread Tim Valenta
You could tell Django to designate the 'code' field as the primary key, which will automatically make it unique. Any forms will then be forced to identify by the code, rather than some numeric id: class Country(models.Model): code = models.CharField(max_length=5, primary_key=True)

Issue when saving a model form

2009-11-27 Thread jul
Hi, I've got the ModelForm and Model shown below. I'm overriding the 'city' field to get a CharField instead of a City foreign key. def addRestaurant(request): if request.user.is_authenticated(): if request.method == 'POST': form = AddRestaurantForm(request.POST)

Re: better error handling in templatetags?

2009-11-27 Thread Tim Valenta
spite* us all. Sorry :) On Nov 27, 8:27 am, Tim Valenta wrote: > Django is forced to catch your errors, and then bubble them back up to > you.  If you notice, none of the traceback lines are even in your > code-- it's all in Python libs or an Django code.  The issue

Re: better error handling in templatetags?

2009-11-27 Thread Tim Valenta
Django is forced to catch your errors, and then bubble them back up to you. If you notice, none of the traceback lines are even in your code-- it's all in Python libs or an Django code. The issue is that you're not seeing raw exceptions, but instead you're seeing reproduced exceptions. I agree

mixed Case Field names in the database columns

2009-11-27 Thread Tim Langeman
I'm trying to query my Postgres database through an ODBC data source in Windows (Excel & Access). I've found that Excel does not like mixed case field names and the recommendation for linked SQL servers is to use all lower case names. I assume this also applies to other types of connections with

RuntimeError: class.__dict__ not accessible in restricted mode

2009-11-27 Thread Gabriel Rossetti
Hello everyone, I keep on getting this error with mod_python: *RuntimeError: class.__dict__ not accessible in restricted mode *I read that I have to set : PythonInterpreter main_interpreter in my httpd.conf, but this doesn't seam to work. Here is my httpd.conf : ServerName

Re: applying a patch

2009-11-27 Thread paulh
Thanks to everybody who replied, in the end I downloaded git, cloned the django repository with with git clone and applied the patch with git apply and it all worked well. Paul Hide On 26 Nov, 12:26, Tim Chase wrote: > rebus_ wrote: > >> diff --git

Re: Best UI for letting users select an item from a large selection of records?

2009-11-27 Thread Margie Roginski
After much struggling on this same topic, I found that autocomplete was by far better than a dropdown or a set of chained dropdowns. I looked at a variety of jquery autocomplete packages, and eventually settled on this one, which has worked very well for me:

Re: Best UI for letting users select an item from a large selection of records?

2009-11-27 Thread Stodge
Thanks. I have the DataTables plugin working so I can filter my records. Now I just need to work out how to select specific ones from the table and work with them. On Nov 26, 9:31 am, David De La Harpe Golden wrote: > Stodge wrote: > > Offering the user a drop >

extend queryset field lookups for time

2009-11-27 Thread Hinnack
Hi, how would I extend the field lookup to get somethnng like this: SELECT ... WHERE EXTRACT('hour' FROM pub_date) > 20 what is for MYSQL: SELECT ... WHERE HOUR(pub_date) > 20 to get all entries where the timepart of pub_date is grater then 8pm and how would I change the existing of YEAR,

[no subject]

2009-11-27 Thread Nadae Ivar BADIO
Morning I'm novice in django and i want to install my apllication on my server production whos on ubuntu i mean install my aplli on apache and i have this error: MOD_PYTHON ERROR ProcessId: 3230 Interpreter:'127.0.1.1' ServerName: '127.0.1.1' DocumentRoot: '/var/www' URI:

Re: Newbie: is it possible to re-render a tag/filter after adding it to the web page as string

2009-11-27 Thread Allen
Dear Bruno Great to hear that there are other ZOPE users among us. When I work with ZOPE I code with dtml. I only found out about ZPT when I quiz ZOPE and never got familiar with it afterwords. The first thing they teach you when working with ZOPE is to combine segment of web pages with . With

Re: Newbie: is it possible to re-render a tag/filter after adding it to the web page as string

2009-11-27 Thread Allen
Dear Bruno Great to hear that there are other ZOPE users among us. When I work with ZOPE I code with dtml. I only found out about ZPT when I quiz ZOPE and never got familiar with it afterwords. The first thing they teach you when working with ZOPE is to combine segment of web pages with . With

Re: Newbie: is it possible to re-render a tag/filter after adding it to the web page as string

2009-11-27 Thread Allen
Dear Bruno Great to hear that there are other ZOPE users among us. When I work with ZOPE I code with dtml. I only found out about ZPT when I quiz ZOPE and never got familiar with it afterwords. The first thing they teach you when working with ZOPE is to combine segment of web pages with . With

Handling IntegrityError on transaction middleware commit

2009-11-27 Thread Ryan
I had an IntegrityError come up on transaction commit (using postgres) today on a production site -- trying to insert an invalid foreign key value (an admin deleted something she shouldn't have). The problem was that instead of emailing me the exception like usual, django logged the exception to

Re: better error handling in templatetags?

2009-11-27 Thread KONTRA, Gergely
Seems like you built your own project, and not using my zip. However, the result IS different. In my traceback I do not have any snippet referencing customtag.py. See my trace: http://dpaste.com/hold/125819/ thanks Gergo +-[ Gergely Kontra  ]--+ |   

Re: Newbie: is it possible to re-render a tag/filter after adding it to the web page as string

2009-11-27 Thread bruno desthuilliers
On 27 nov, 09:35, Allen wrote: > Dear Andy McKay > Thanks for the input and you're right, I shouldn't do it this way. > > I use to use ZOPE for a couple of years and it has to abilities to > integrate multiple static webpages just by write a tag with the static > webpage

Re: Ajax with jquery, 2 load in the same event, work not OK on apache2 server...strange because work ok with runserver, on localhost

2009-11-27 Thread Tom Evans
On Fri, Nov 27, 2009 at 8:08 AM, NMarcu wrote: > Hello all, > >I have something like this: > > $( '#operators_list_div' ).html( '' ).load( '{% url > add_save_view %}',{'action':'action',}); > $( '#address_list' ).html( '' ).load( '{% url add_save_view %}', >

database charset

2009-11-27 Thread Kresimir Tonkovic
Just an experience... I created a database in mysql not caring much for charsets, and run manage.py syncdb. All tables were created with the default charset (iso-8892-1 swedish). Later I noticed my croatian chars were not right, so I altered some tables and varchar fields to use utf8. This worked

Re: OT : SetHandler mod_python vs SetHandler python-program

2009-11-27 Thread Graham Dumpleton
On Nov 27, 8:21 pm, Gabriel Rossetti wrote: > Hello everyone, > > this is a bit off-topic, in my apache2 httpd.conf, I see some poeple use > "SetHandler mod_python" and others (as mentioned in the docs) use > "SetHandler python-program", what is the difference?

OT : SetHandler mod_python vs SetHandler python-program

2009-11-27 Thread Gabriel Rossetti
Hello everyone, this is a bit off-topic, in my apache2 httpd.conf, I see some poeple use "SetHandler mod_python" and others (as mentioned in the docs) use "SetHandler python-program", what is the difference? Thank you, Gabriel -- You received this message because you are subscribed to the

Re: Write debug error to file

2009-11-27 Thread Gabriel Rossetti
No, I thought that was just for administrative stuff. I'll give that a try, thanks! Gabriel akonsu wrote: > hello, > > if you set the admin email address and the necessary email parameters > in your config file then django will send an email with all the > details to the admin when an exception

Re: Write debug error to file

2009-11-27 Thread Gabriel Rossetti
Cool, I'll have a look, I was looking for something like that for when my site is in production, thanks! Gabriel Andy McKay wrote: > You should take a look at Arecibo which has been used by a few > Facebook apps for that very readson. It has full Django libraries and > if you don't use it a

Re: Django-1.1.1 builtin Development WebServer crashes with a core dump

2009-11-27 Thread lbockhold
Hi Tim, thanks for your respond, I am doing the tutorial that comes now to set up the admin page. The browser does not open the webpage: http://dexhh022.ham.de.eu.airbus.corp:1026/admin/ Browser: Respond : Server not found .. At the same time the Development server just quits Workaround:Is it

Re: Newbie: is it possible to re-render a tag/filter after adding it to the web page as string

2009-11-27 Thread Allen
Dear Andy McKay Thanks for the input and you're right, I shouldn't do it this way. I use to use ZOPE for a couple of years and it has to abilities to integrate multiple static webpages just by write a tag with the static webpage filename similar to the filter tag. But I just started django a

Ajax with jquery, 2 load in the same event, work not OK on apache2 server...strange because work ok with runserver, on localhost

2009-11-27 Thread NMarcu
Hello all, I have something like this: $( '#operators_list_div' ).html( '' ).load( '{% url add_save_view %}',{'action':'action',}); $( '#address_list' ).html( '' ).load( '{% url add_save_view %}', {'action':'address_list',}); In view I have like this, that don't work on: #list of availible