Re: Custom management command

2008-05-15 Thread J . Pablo Fernández
It actually looks like a bug, If nobody did it, I'll try to reproduce it this afternoon and report the bug. On May 15, 7:52 am, J. Pablo Fernández <[EMAIL PROTECTED]> wrote: > Ok, debuging showed me a problem. > > ImportError: 'No module named bonvortaro' > > In the process of getting the command

Re: Custom management command

2008-05-15 Thread Alex Morega
On May 15, 2008, at 09:52 , J. Pablo Fernández wrote: > ImportError: 'No module named bonvortaro' > > In the process of getting the commands, it tries to import the package > and it fails. I could try setting up the pythonpath or something like > that, but that would be only a workaround. There

Re: Search Result Pagination

2008-05-15 Thread Adi J. Sieker
Michael Ellis wrote: >> What does the search funtion return? >> A django queryset or a xapian result and are you sure that >> the Paginator can handle the returned value? > > Hmmm. Great question. > > I believe it's returning a xapian result set. > > In my template, I'm looping through the pagi

Re: where does this caching come?

2008-05-15 Thread Alex Morega
On May 15, 2008, at 02:24 , David Zhou wrote: > > On May 14, 2008, at 7:06 PM, Viktor Nagy wrote: > >> one of my functions follows, here it doesn't matter if I uncomment >> the >> raide exception line, it never gets raised. On the other hand I am >> sent to the authorization page. The getDocum

getting thread errors in a file

2008-05-15 Thread octobre
Hello, I'm running a separate process to manage mail sender. The thread is created by the django request. But sometimes the thread fails. How can I get errors (in a file for example) from the thread ? --~--~-~--~~~---~--~~ You received this message because you ar

Re: capturing keyword and non-keyword arguments from urls

2008-05-15 Thread Berco Beute
Right! Thanks! I somehow totally missed that section of the documentation. 2B On May 14, 5:40 pm, "Scott Moonen" <[EMAIL PROTECTED]> wrote: > Berco, named and unnamed arguments shouldn't be mixed.  See: > > http://www.djangoproject.com/documentation/url_dispatch/#the-matching... > > What the sec

Re: Django learning management application

2008-05-15 Thread Berco Beute
Sounds interesting. It would be great if you could share some details on how you combined Django and Moodle. 2B On May 15, 4:35 am, "Ariel Mauricio Nunez Gomez" <[EMAIL PROTECTED]> wrote: > Moodle and Django can coexist happily (Using same database and writing > django models for some of the tab

LatestFreeCommentsFeed

2008-05-15 Thread Matt Davies
Hello peeps I've got a news applications that is accepting comments on the posts. I need to build a feed of the comments so I can monitor them and answer any questions asked in the comments. So, in my main URLS file I'm doing this from django.contrib.comments.feeds import LatestFreeCommentsFeed

Cusom SQL in test

2008-05-15 Thread Vitaliy
Hi I created model called 'IPBlock' I created file 'sql/IPBlock.slq' with some sql inserts when I run '$python manage.py syncdb' - it works fine IPBlock's table filled with data but when i run tests '$python manage.py test' - IPBlock's table is empty (self.assertTrue(IPBlock.objects.all().count >

Re: Cusom SQL in test

2008-05-15 Thread Vitaliy
On May 15, 12:08 pm, Alex Morega <[EMAIL PROTECTED]> wrote: > IPBlock.objects.all().count() Yea, I know it's just a typo... The table is realy empty, I checked it by all() and I looked directly into db. --~--~-~--~~~---~--~~ You received this message because you a

Re: Cusom SQL in test

2008-05-15 Thread Alex Morega
On May 15, 2008, at 11:56 , Vitaliy wrote: > but when i run tests '$python manage.py test' - IPBlock's table is > empty (self.assertTrue(IPBlock.objects.all().count > 0) - failed) "count" is a method - you need to write smth like IPBlock.objects.all().count() You can also skip the .all() part

Re: IntegerField - SQL type changed?

2008-05-15 Thread James Bennett
On Thu, May 15, 2008 at 5:34 AM, Amit Ramon <[EMAIL PROTECTED]> wrote: > Was there any change in django in the recent months that could explain this? > Namely, could it be that a couple of months ago django would indeed generate > a varchar(20) for this field, and now it generates int(11)? I'll

all about softwere

2008-05-15 Thread candra
www.candraheryani.blogspot.com --~--~-~--~~~---~--~~ 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 [EM

Re: custom tag error related to import

2008-05-15 Thread Jonathan Lukens
I *was* importing from datababy.utils.photologue. (datababy is the project package.) Anything I imported from anywhere in the project path would cause a similar error. Eventually I went through the entire project and made every single import absolute -- there were a few that were relative -- an

IntegerField - SQL type changed?

2008-05-15 Thread Amit Ramon
Hello, A couple of months ago I created a custom field class which inherited models.IntegerField: class PhoneNumberField(models.IntegerField) What this class does is simply verifying a correct format for its data. Today I tried to use it in a new model, and I noticed that the database column

Re: IntegerField - SQL type changed?

2008-05-15 Thread Marty Alchin
On Thu, May 15, 2008 at 6:45 AM, James Bennett <[EMAIL PROTECTED]> wrote: > On Thu, May 15, 2008 at 5:34 AM, Amit Ramon <[EMAIL PROTECTED]> wrote: >> Was there any change in django in the recent months that could explain this? >> Namely, could it be that a couple of months ago django would indeed

I18N: date (Python + HTML + Javascript)

2008-05-15 Thread Tourneur Henry-Nicolas
Hi, I would like to be able to do a clean I18N with date format. The problem is that the date format (dd/mm/) is used in javascript (for a date picker), in html (with the template tag now, for its format too) and in python, to parse a date and transform it into Python date using python-dateut

Formwizard and dynamic initial data

2008-05-15 Thread Hanne Moa
Is Formwizard designed for new content only, or is it possible to use it for changing existing content? I haven't been able to find an obvious way to pass in run-time determined initial data anywhere, nor how to pass in an instance (for ModelForms). Have anyone found a way to pass in run-time ini

Re: Strange New Forms Issue

2008-05-15 Thread Chris
Could someone help me out with this error or Warning as it states in the exception? On May 14, 6:14 pm, Chris <[EMAIL PROTECTED]> wrote: > Hello I created a new forms form and I am having uses with this > statement: > > year_of_birth = forms.ChoiceField(required=False, > choices=YEAR_OF_BIRTH

Re: Help with custom validator - please, please, please

2008-05-15 Thread Pigletto
On 15 Maj, 03:43, Brandon Taylor <[EMAIL PROTECTED]> wrote: > I saw this example in the > documentation:http://www.djangoproject.com/documentation/forms/#validators > > But where does this code live? Does this go into my models.py as a > subclass of my Model, or is it a separate file? Link you've

partially edit an object

2008-05-15 Thread Robin Becker
I have a colleague who wishes to restrict the editability of fields dynamically. I can see how this arises by considering a Person object. The supervisor role might be allowed to edit more than the individual concerned. We looked in vain for an 'easy' way to do this using old forms, newforms,

Re: Strange New Forms Issue

2008-05-15 Thread Karen Tracey
On Wed, May 14, 2008 at 6:14 PM, Chris <[EMAIL PROTECTED]> wrote: > > Hello I created a new forms form and I am having uses with this > statement: > >year_of_birth = forms.ChoiceField(required=False, > choices=YEAR_OF_BIRTH) > > and tuple looks like so: >year_of_birth = ((1990, '1990'), (1

Re: LatestFreeCommentsFeed

2008-05-15 Thread Matt Davies
Ok, I remember now that in order to output different things in feeds you specify what to output in the corresponding template in the feeds folder. I'm guessing that the freecomments is using the tite and description.html files in the templates/feeds folder. Can anyone confirm this? Also, is ther

Re: Help with custom validator - please, please, please

2008-05-15 Thread Brandon Taylor
Hi Maciej, Yes, I've looked at the validator-list code before, but I don't understand how to implement it. The example code is: from django.core import validators from django import forms class ContactManipulator(forms.Manipulator): def __init__(self): self.fields = ( #

Re: where does this caching come?

2008-05-15 Thread Norman Harman
Alex Morega wrote: > On May 15, 2008, at 02:24 , David Zhou wrote: >> Are you restarting the server between module changes? > > By default Django does no caching of responses. It's probably what > Viktor says: the server (mod_python, mod_wsgi, whatever) won't > automatically reload the python

Re: IntegerField - SQL type changed?

2008-05-15 Thread Amit Ramon
* Marty Alchin <[EMAIL PROTECTED]> [2008-05-15 07:15 -0400]: > > On Thu, May 15, 2008 at 6:45 AM, James Bennett <[EMAIL PROTECTED]> wrote: > > On Thu, May 15, 2008 at 5:34 AM, Amit Ramon <[EMAIL PROTECTED]> wrote: > >> Was there any change in django in the recent months that could explain > >> t

Re: IntegerField - SQL type changed?

2008-05-15 Thread Marty Alchin
On Thu, May 15, 2008 at 10:25 AM, Amit Ramon <[EMAIL PROTECTED]> wrote: > Now, if I subclass an existing field and I want to define the database type > myself, how do I do that? Is there a place to add mapping between a name > returned by get_internal_type and a database type, like in creation.p

Re: Search Result Pagination

2008-05-15 Thread Michael Ellis
Adi. That got the pagination working on the first page! Thank you! I'm getting no results on page 2, however. I know this is in the way I'm handling GET requests (see the 'else' statement). I'm just not sure how this should be handled. I'll be reading some docs and searching around for a solution

File Upload Issues - ModelForm

2008-05-15 Thread mikelostcause
I have been searching and unable to find out why my script is not working correctly If i take the required = False off of the image, the error "This field is required" get's thrown, else the 'image' field seems to not exist in the data as I now get 'No Data in Cleaned Data' error from the clean_

Python 3000 support, any plans?

2008-05-15 Thread mardenet
Hello, I am new to Python and Django, I am a ASP.NET C# programmer actually tired of following Microsoft's unnatural and crazy page model that tries to hide the page from you as much as possible.. seriously how did they came up with that?! I am very interested in Python and Django for a future pr

which python version?

2008-05-15 Thread bcurtu
Which python version do you use with your django project? Any special issue with anyone? Cheers. --~--~-~--~~~---~--~~ 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

Re: which python version?

2008-05-15 Thread Valts Mazurs
Latest stable Python version. Currently it is Python 2.5.2 Regards, Valts. On Thu, May 15, 2008 at 6:03 PM, bcurtu <[EMAIL PROTECTED]> wrote: > > Which python version do you use with your django project? Any special > issue with anyone? > > Cheers. > > > --~--~-~--~~~---

Re: Python 3000 support, any plans?

2008-05-15 Thread David Zhou
On May 15, 2008, at 10:57 AM, mardenet wrote: > I am very interested in Python and Django for a future project but I > am noticing this is a period of big changes in this community. Python > 3000 and Django 1.0 will really be a major change. They will be big changes, but don't really align in t

Re: File Upload Issues - ModelForm

2008-05-15 Thread Karen Tracey
On Thu, May 15, 2008 at 10:53 AM, mikelostcause <[EMAIL PROTECTED]> wrote: > > I have been searching and unable to find out why my script is not > working correctly > > If i take the required = False off of the image, the error "This field > is required" get's thrown, else the 'image' field seems

newforms-admin: {{ original.exemplar_text }} Object Error

2008-05-15 Thread mbdtsmh
Hi all, I'm using the newforms-admin branch and have come across this annoyance. When I am trying to add a custom form value to the form text; i.e., {{ original.exemplar_text }} it gives me an Object expected error. This causes certain javascript elements that are also on the page not to disp

Re: Python 3000 support, any plans?

2008-05-15 Thread Quentin Gallet-Gilles
On Thu, May 15, 2008 at 5:16 PM, David Zhou <[EMAIL PROTECTED]> wrote: > > On May 15, 2008, at 10:57 AM, mardenet wrote: > > > I am very interested in Python and Django for a future project but I > > am noticing this is a period of big changes in this community. Python > > 3000 and Django 1.0 wil

encrypting form data

2008-05-15 Thread Mike Chambers
I have a commenting app that requires that the item id, and content type id be passed through the form. This works fine, but i would like to encrypt that data to make it a little more difficult for people to programatically submit the form. Does anyone have any info on how to encrypted form da

Displaying a many to many relationship using checkboxes...

2008-05-15 Thread Gabriel
Hi all I have a model called Task and a model called User. Between them is a many to many relationship to simulate assigning tasks to users. Basically I want to list all tasks in an HTML page. Each task will then have a set of checkboxes representing every user, if that particular user is alread

Re: Strange New Forms Issue

2008-05-15 Thread Chris
Hi Karen, I have a form with first_name, last_name and email and once the user presses submit, it will then save the 3 required fields to the database and send the data to another form containing additional fields suchas year_of_birth, phone_number, address,city, state, etc... The 3 required fiel

Strange cookie problem

2008-05-15 Thread Chris Farley
My Django app needs to read a cookie that is written by a JavaScript script in another part of my website. The JavaScript code that generates the cookie is something like this: document.cookie='ShoppingCart=[7008|2][7120|3]; path=/; domain=mydomain.com'; I can see the cookie and its content from

Re: File Upload Issues - ModelForm

2008-05-15 Thread Michael Pryfogle
Thanks for the pointer, I swear I had tried that quite a few times; but it started me in the right direction. I had a few issues with my __init__ declaration as well. I'll clean it up and post it on django snippets. On May 15, 11:18 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Thu, May 15,

Re: IntegerField - SQL type changed?

2008-05-15 Thread Amit Ramon
* Marty Alchin <[EMAIL PROTECTED]> [2008-05-15 10:45 -0400]: > > On Thu, May 15, 2008 at 10:25 AM, Amit Ramon <[EMAIL PROTECTED]> wrote: > > Now, if I subclass an existing field and I want to define the database type > > myself, how do I do that? Is there a place to add mapping between a name >

an atomicity in django?

2008-05-15 Thread mintuk
Hi, I have a resource (an Experiment, for instance), that requires an exact number of Players to play, 5 say. The idea is that the Experiment resource sits there accepting requests from Players to play until it has the correct number of Players - no more and no less. I've implemented this as fo

Re: encrypting form data

2008-05-15 Thread Richard Dahl
I am not sure what you mean by 'passed through the form', are you reffering to some sort of hidden form-field? I am not sure exactly how encryption of these two fields is going to help you. If the form processing view is publicly available, and these two values are availble to a user (or script)

MySQL Boolean vs. PostgresQL Boolean

2008-05-15 Thread Szaijan
Hi, I developed my first Django app on my mapbook using PostgreSQL and have recently moved it to a production site which uses MySQL. PostgreSQL stores boolean values and True and False, just like Python and JS, while MySQL uses 1 and 0. Is there some automated way to get the models to understand

Boolean Values: PostgreSQL vs. MySQL

2008-05-15 Thread Szaijan
Hi, I developed my first Django app on my Macbook Pro using PostgreSQL and have recently moved it to a production site which uses MySQL. PostgreSQL stores boolean values as True and False, just like Python and JS, while MySQL uses 1 and 0. Is there some automated way to get the models to understa

Re: encrypting form data

2008-05-15 Thread Mike Chambers
Sorry for not being more specific. I am talking about data in hidden fields: I would like to encrypt the value. I could hash it using md5 or sha1 and a secret key, and then on the server, loop through the values in the DB to find the match. But that does not seem very performant. I could a

Re: error with custom sql

2008-05-15 Thread msoulier
On May 14, 10:27 pm, msoulier <[EMAIL PROTECTED]> wrote: > This seems to work in production with postgreSQL, but on my laptop > with sqlite I'm seeing an issue. Actually, it fails in the Django shell, and there only, regardless of the db backend. Can anyone think of why? Mike --~--~-~--

Re: Strange cookie problem

2008-05-15 Thread Marty Alchin
On Thu, May 15, 2008 at 12:29 PM, Chris Farley <[EMAIL PROTECTED]> wrote: > My Django app needs to read a cookie that is written by a JavaScript > script in another part of my website. The JavaScript code that > generates the cookie is something like this: > > document.cookie='ShoppingCart=[7008|2

Re: error with custom sql

2008-05-15 Thread msoulier
On May 15, 2:13 pm, msoulier <[EMAIL PROTECTED]> wrote: > Actually, it fails in the Django shell, and there only, regardless of > the db backend. Oh, scratch that. I just got it to fail consistently in a simple script that runs only that code. So, custom SQL in Django can't include a LIKE statem

Re: MySQL Boolean vs. PostgresQL Boolean

2008-05-15 Thread Scott Moonen
You should find that Django's BooleanField understands the difference between the databases and does the right thing. -- Scott On Thu, May 15, 2008 at 1:57 PM, Szaijan <[EMAIL PROTECTED]> wrote: > > Hi, I developed my first Django app on my mapbook using PostgreSQL and > have recently moved it

Re: Getting back to the same page after completing a task in another page

2008-05-15 Thread M.Ganesh
Adi Jörg Sieker wrote: > > On 13.05.2008, at 16:18, phillc wrote: > >> >> "I am new to web programming" >> "I am trying to use my own loginpage " >> >> is there a reason that contrib.auth doesnt meet your needs? >> > Good question. :) > > adi > Yes, I do agree, these two statements put next to eac

Re: encrypting form data

2008-05-15 Thread jonknee
On May 15, 2:02 pm, Mike Chambers <[EMAIL PROTECTED]> wrote: > Sorry for not being more specific. > > I am talking about data in hidden fields: > > > > I would like to encrypt the value. > > I could hash it using md5 or sha1 and a secret key, and then on the > server, loop through the values in

passing a string to model.objects.filter() method

2008-05-15 Thread M.Ganesh
Hi All #my function code def object_list(request, object, filter_string = None): if filter: object_list = object.objects.filter(filter_string) else: object_list = object.objects.all() return render_to_response(object.__name__ + '_list.html',

Re: encrypting form data

2008-05-15 Thread Mike Chambers
The value is encrypted in the form. The secret key, used to either decrypt or hash the value, is on the server, and not in the form. My application does not have the concept of logged in users. mike jonknee wrote: > > How would that help if the "secret" value was in the form already? > Bots

Re: Custom management command

2008-05-15 Thread J . Pablo Fernández
I would have thought Django did it by itself, or actually, manage.py. After all, when I do manage.py shell, the pythonpath seems to be correct for me to do import bonvortaro. On May 15, 8:20 am, Alex Morega <[EMAIL PROTECTED]> wrote: > On May 15, 2008, at 09:52 , J. Pablo Fernández wrote: > > > I

Re: encrypting form data

2008-05-15 Thread Norman Harman
Mike Chambers wrote: > I have a commenting app that requires that the item id, and content type > id be passed through the form. > > This works fine, but i would like to encrypt that data to make it a > little more difficult for people to programatically submit the form. > > Does anyone have a

Re: loaddata .. columns app_label, model are not unique

2008-05-15 Thread Carl Karsten
Russell Keith-Magee wrote: > On Wed, May 14, 2008 at 1:20 PM, Carl Karsten <[EMAIL PROTECTED]> wrote: >> Russell Keith-Magee wrote: >>> On Wed, May 14, 2008 at 1:09 AM, Carl Karsten <[EMAIL PROTECTED]> wrote: >> What are the chances of getting a dumpdata hack to exclude certain apps? >> >> I know

Re: MySQL Boolean vs. PostgresQL Boolean

2008-05-15 Thread Carl Karsten
Szaijan wrote: > Hi, I developed my first Django app on my mapbook using PostgreSQL and > have recently moved it to a production site which uses MySQL. > PostgreSQL stores boolean values and True and False, just like Python > and JS, while MySQL uses 1 and 0. Where are you seeing this? I think y

Re: Code works with Django's server, but not with Apache+mod_python?

2008-05-15 Thread mw
Yeah I'm still at a loss on this bug. I ran the code provided in the thread. Django's django /Library/Python/2.5/site-packages/django/__init__.pyc pil /Library/Python/2.5/site-packages/PIL/__init__.pyc And then Apache's is django /Library/Python/2.5/site-packages/django/__init__.pyc pil /Library

Multi-user blog creation system

2008-05-15 Thread Arckam
Hey guys, I need to support a custom blog creation system. Each user would have the possibility to create his own blog (like what Blogger does) and to post on it. In return there would be an integration of the blog events (i.e. posting a new entry) in the global app. Since I don't feel like r

Re: encrypting form data

2008-05-15 Thread Richard Dahl
Mike, I concur with jonknee, the attribute 'hidden' on a form field simply tells a browser that is following the standards not to display it. The form field and all of the data within it is still sent via http. Any script or proxy (i.e. webscarab) or other mechanism such as a sniffer can get at th

Re: How to determine server?

2008-05-15 Thread Chad Parker
found this in the djangoproject.com source and it works well for me: (goes in settings.py; change webfaction.com to whatever you get from your server) # Far too clever trick to know if we're running on the deployment server. import platform DEVELOPMENT_MODE = (platform.node() != "web22.webfaction

Re: encrypting form data

2008-05-15 Thread Richard Dahl
The CSRF middleware probably would not provide a solution for this problem. It sets a hidden field with a value that is derived from hashing the session id with a secret, but I do not believe it sets a unique key per form. As long as the session was valid (assuming the app in question is using s

Re: encrypting form data

2008-05-15 Thread Mike Chambers
I am not concerned if they can send the hash back. I dont want them to be able to access the underling value that the hash is based on. I am also not concerned about spam, but rather just dont want to expose raw database ids to the public. mike Richard Dahl wrote: > Mike, > I concur with jonk

Re: encrypting form data

2008-05-15 Thread Richard Dahl
Why don't you want to expose raw database ids to the public? -richard On 5/15/08, Mike Chambers <[EMAIL PROTECTED]> wrote: > > I am not concerned if they can send the hash back. I dont want them to > be able to access the underling value that the hash is based on. > > I am also not concerned abo

Re: Getting back to the same page after completing a task in another page

2008-05-15 Thread Adi J. Sieker
M.Ganesh wrote: > 6. The login page that comes with contrib.auth is too colourful compared > to other pages, and also exposes the admin page to the users unnecessarily. The login page doesn't have anything todo with the admin page and if it's colorful or not is up to you. The admin has a login

Re: Multi-user blog creation system

2008-05-15 Thread k0001
On Thu, May 15, 2008 at 4:57 PM, Arckam <[EMAIL PROTECTED]> wrote: > > Hey guys, Hey! I need to support a custom blog creation system. Each user would have > the possibility to create his own blog (like what Blogger does) and to > post on it. In return there would be an integration of the blog

Re: encrypting form data

2008-05-15 Thread Gabriel
Mike Chambers gmail.com> writes: > > > I am not concerned if they can send the hash back. I dont want them to > be able to access the underling value that the hash is based on. > > I am also not concerned about spam, but rather just dont want to expose > raw database ids to the public. >

Re: encrypting form data

2008-05-15 Thread Mike Chambers
Thanks for the input. I was considering doing this, but my only concern was if the key changed for some reason, I would have to regenerate the hashes. I might try it out though, and see how well it works. Of course, Im not sure why the key would get reset. Thanks for all of the input and sugge

Invalid block tag: 'include_admin_script' in newforms admin?

2008-05-15 Thread Brandon Taylor
Anyone else receiving this error: Invalid block tag: 'include_admin_script' when loading the change form in newforms-admin? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group

how to avoid uploading .py source files to shared hosting server

2008-05-15 Thread ydjango
Hi, I am developing on python 2.4.4 and django svn branch. I want to upload to webfaction which if I ssh and run python is python 2.4.3. Application installed is Django trunk/mod python 3.3.1/ python 2.5 I want to upload only .pyc and no source files. Whats the best way to make sure my .pyc wor

Re: encrypting form data

2008-05-15 Thread Norman Harman
Richard Dahl wrote: > Mike, > I concur with jonknee, the attribute 'hidden' on a form field simply > tells a browser that is following the standards not to display it. > The form field and all of the data within it is still sent via http. > Any script or proxy (i.e. webscarab) or other mechanism s

Re: encrypting form data

2008-05-15 Thread Gabriel
Mike Chambers gmail.com> writes: > > > Thanks for the input. I was considering doing this, but my only concern > was if the key changed for some reason, I would have to regenerate the > hashes. I might try it out though, and see how well it works. > > Of course, Im not sure why the key woul

Re: Strange New Forms Issue

2008-05-15 Thread Chris
Cool I resolved the error. So when you have a drop down list for an IntegerField that is an optional IntegerField in the database, you must set some sort of validation to tell this optional field to be None (for the obvious reasons). What I didn't realize is when I had a choices list set in the Ch

Re: encrypting form data

2008-05-15 Thread Norman Harman
Gabriel wrote: > Mike Chambers gmail.com> writes: > >> >> I am not concerned if they can send the hash back. I dont want them to >> be able to access the underling value that the hash is based on. >> >> I am also not concerned about spam, but rather just dont want to expose >> raw database ids

Re: encrypting form data

2008-05-15 Thread Richard Dahl
Norman, Thanks for your clarification, however, comments inline... > You check that the hash sent back is correct by (re)hashing the id, duh. Of course the hash will be correct, the bot will simply return what it recieved. The point is that this does not prevent anyone from being able to submit

Re: where does this caching come?

2008-05-15 Thread V
Actually, I use the built-in server (as I am still developing). My guess was the pyc files are not rebuilt, but even when I delete them, I still get the same behaviour. Just a minute ago, I've tried to switch off browser caching, before I just Ctrl+R-ed the page. This seems to work. :) Thanks f

Re: encrypting form data

2008-05-15 Thread Norman Harman
Gabriel wrote: > Mike Chambers gmail.com> writes: > >> >> I am not concerned if they can send the hash back. I dont want them to >> be able to access the underling value that the hash is based on. >> >> I am also not concerned about spam, but rather just dont want to expose >> raw database ids

Re: where does this caching come?

2008-05-15 Thread Graham Dumpleton
On May 16, 12:21 am, "Norman Harman" <[EMAIL PROTECTED]> wrote: > Alex Morega wrote: > > On May 15, 2008, at 02:24 , David Zhou wrote: > >> Are you restarting the server between module changes? > > > By default Django does no caching of responses. It's probably what   > > Viktor says: the server (

Re: encrypting form data

2008-05-15 Thread Richard Dahl
Forgive my feeble mind, but I am trying to understand, what is the point of substituting 'walewadu' for 1 or 2 or 3855? What security does this provide? -richard On 5/15/08, Norman Harman <[EMAIL PROTECTED]> wrote: > > > Gabriel wrote: > > Mike Chambers gmail.com> writes: > > > >> > >> I am no

Re: encrypting form data

2008-05-15 Thread jonknee
> I am not concerned if they can send the hash back. I dont want them to > be able to access the underling value that the hash is based on. > > I am also not concerned about spam, but rather just dont want to expose > raw database ids to the public. Gotcha, I mis-understood your original questio

Re: Python 3000 support, any plans?

2008-05-15 Thread mardenet
> I'd posit with fair confidence that Django 1.0 will come long, long > before Python 3000 reaches a non-alpha state. Wow that's a strong statement... the "long long" seems a bit exagerated since if Python 3000 sticks to schedule it would release Beta in a month or so. Anyway I like strong statem

Re: Help with custom validator - please, please, please

2008-05-15 Thread Brian Rosner
On May 14, 2008, at 5:28 PM, Brandon Taylor wrote: > > Hi everyone, Hi :) Okay, let first begin by explaining some fundamental basics about Django itself. The admin in trunk uses oldforms. To use custom validation there you would write a validator that would go in validator_list on the m

Re: how to avoid uploading .py source files to shared hosting server

2008-05-15 Thread jonknee
> I want to upload only .pyc and no source files. Whats the best way to > make sure my .pyc works there. Your best bet is to probably upload the .py files, run the app and then delete the .py files. That way you're sure that the .pyc files are compatible. But unless you really need to get rid of

Re: loaddata .. columns app_label, model are not unique

2008-05-15 Thread Carl Karsten
Carl Karsten wrote: > Russell Keith-Magee wrote: >> On Wed, May 14, 2008 at 1:20 PM, Carl Karsten <[EMAIL PROTECTED]> wrote: >>> Russell Keith-Magee wrote: On Wed, May 14, 2008 at 1:09 AM, Carl Karsten <[EMAIL PROTECTED]> wrote: >>> What are the chances of getting a dumpdata hack to exclude c

Re: Help with custom validator - please, please, please

2008-05-15 Thread Brian Rosner
> I would highly recommend you read the newforms documentation [1] if you have > never used newforms before. Opps, forgot the link http://www.djangoproject.com/documentation/newforms/ and while I am here check out http://www.djangoproject.com/documentation/modelforms/ too. > def clean_name(se

Printing out HTML that doesn't get converted to

2008-05-15 Thread Alex
I'm working on my first Django project and I can't seem to get information printed out as I would like it. I'm trying to print out quotes to a page with the newlines turned into HTML tags (similar to PHP's nl2br function). So far I've been able to do this using the __str__ function for the Quote

Re: where does this caching come?

2008-05-15 Thread Norman Harman
Graham Dumpleton wrote: > On May 16, 12:21 am, "Norman Harman" <[EMAIL PROTECTED]> wrote: >> Alex Morega wrote: >>> On May 15, 2008, at 02:24 , David Zhou wrote: Are you restarting the server between module changes? >>> By default Django does no caching of responses. It's probably what >>>

Getting error after installing on webfaction? - need help

2008-05-15 Thread ydjango
I installed my app to webfaction I am getting this error on many of my pages, these pages are data entry pages with dropdowns with ModelChoiceFields. Any clue how can I find what is causing this error. I added data to all the tables which are linked to ModelChoiceFields. My database in settings

Re: Printing out HTML that doesn't get converted to

2008-05-15 Thread jonknee
On May 15, 6:17 pm, Alex <[EMAIL PROTECTED]> wrote: > I'm working on my first Django project and I can't seem to get > information printed out as I would like it. I'm trying to print out > quotes to a page with the newlines turned into HTML tags (similar > to PHP's nl2br function). You're lookin

Re: Printing out HTML that doesn't get converted to

2008-05-15 Thread Alex
Wow, that was incredibly simple. Thanks for the help! I have a strong feeling I'm not going back to PHP... --Alex On May 15, 4:47 pm, jonknee <[EMAIL PROTECTED]> wrote: > On May 15, 6:17 pm, Alex <[EMAIL PROTECTED]> wrote: > > > I'm working on my first Django project and I can't seem to get > >

Re: MySQL Boolean vs. PostgresQL Boolean

2008-05-15 Thread Szaijan
I see it in my views. When I return the set and saved values for a model, I get True or False from my app on the MacBook (Postgres) and 1 or 0 from the exact same code on my Slicehost site (MySQL.) So, if I add something like: m = Model.objects.get(id=id) print m.boolean_field_name I get True/

Re: where does this caching come?

2008-05-15 Thread Graham Dumpleton
On May 16, 8:44 am, "Norman Harman" <[EMAIL PROTECTED]> wrote: > Graham Dumpleton wrote: > > On May 16, 12:21 am, "Norman Harman" <[EMAIL PROTECTED]> wrote: > >> Alex Morega wrote: > >>> On May 15, 2008, at 02:24 , David Zhou wrote: > Are you restarting the server between module changes? >

Re: Code works with Django's server, but not with Apache+mod_python?

2008-05-15 Thread Graham Dumpleton
On May 16, 5:56 am, mw <[EMAIL PROTECTED]> wrote: > Yeah I'm still at a loss on this bug. > > I ran the code provided in the thread. > Django's > django > /Library/Python/2.5/site-packages/django/__init__.pyc > pil > /Library/Python/2.5/site-packages/PIL/__init__.pyc > > And then Apache's is > dja

Secure file access with contrib.auth

2008-05-15 Thread Julien
Hi, I'm building a website where users can create projects and upload files for their projects. I already have a system in place so that only members of a project can access the project related pages. Now, I'd like it to be more secure by only giving access to the files of a project to its member

Re: Python 3000 support, any plans?

2008-05-15 Thread Russell Keith-Magee
On Thu, May 15, 2008 at 10:57 PM, mardenet <[EMAIL PROTECTED]> wrote: > > Hello, > I am new to Python and Django, I am a ASP.NET C# programmer actually > tired of following Microsoft's unnatural and crazy page model that > tries to hide the page from you as much as possible.. seriously how > did t

Re: loaddata .. columns app_label, model are not unique

2008-05-15 Thread Russell Keith-Magee
On Fri, May 16, 2008 at 5:58 AM, Carl Karsten <[EMAIL PROTECTED]> wrote: > > Carl Karsten wrote: >> Russell Keith-Magee wrote: >>> On Wed, May 14, 2008 at 1:20 PM, Carl Karsten <[EMAIL PROTECTED]> wrote: Russell Keith-Magee wrote: > On Wed, May 14, 2008 at 1:09 AM, Carl Karsten <[EMAIL PR

Re: loaddata .. columns app_label, model are not unique

2008-05-15 Thread Russell Keith-Magee
On Fri, May 16, 2008 at 3:47 AM, Carl Karsten <[EMAIL PROTECTED]> wrote: > > Russell Keith-Magee wrote: >> On Wed, May 14, 2008 at 1:20 PM, Carl Karsten <[EMAIL PROTECTED]> wrote: >>> Russell Keith-Magee wrote: On Wed, May 14, 2008 at 1:09 AM, Carl Karsten <[EMAIL PROTECTED]> wrote: >>> What a

Re: loaddata .. columns app_label, model are not unique

2008-05-15 Thread Carl Karsten
Just saving someone the trouble of telling me to spell multiple correctly. > make_option('-e', '--exclude', dest='exclude', action='append', > help='App to exclude (use mutiple --exclude to exclude mutiple apps).'), help='App to exclude (use multiple --exclude to exclude multiple apps).'),

  1   2   >