Adrian Holovaty wrote:
On 1/30/06, Jan Rademaker <[EMAIL PROTECTED]> wrote:
Would it make sense to implement such a thing? An alternative would be
to figure out at what date a week starts and ends and just use
pub_date__range, but that's not really the point. I'm just curious how
easy/hard it
I've done this with the latter approach. I made a person model that
had more person-specific information and made the user field a foreign
key and added the edit_inline option to have the information right
there in the user interface:
user = meta.ForeignKey(auth.User, edit_inline=meta.STACKED,
That did it. Thanks.
I've seen a couple of approaches on this mailing list for adding
application specific fields to the User class. The first involves
extending auth.User but this seems a little complex, and was
specifically labeled an "advanced" method. It doesn't seem like you
should have to break out deep black
Ah excellent - I think it's natural to presume after fixing a bunch of
errors and updating paths after restoring from backup to a new dir that
the fault is more than likely on your end than with product.
For anyone who follows, 'ordering' should be a list and look like:
class META:
You could pickle (as in, serialize) the data and save on the
database. Then just unpickle when you need to view it.
On 1/30/06, Oliver Rutherfurd <[EMAIL PROTECTED]> wrote:
> Thanks for the suggestion, but saving to the db after every page is a
> requirement of the app. If someone fills out
Hi Amit,
On 1/30/06, Amit Upadhyay <[EMAIL PROTECTED]> wrote:
> On 1/31/06, Oliver Rutherfurd <[EMAIL PROTECTED]> wrote:
> > The use case for this is a long registration process, where different
> > data points from individual models are split across multiple pages.
> > The application needs to
On 1/31/06, Rudolph <[EMAIL PROTECTED]> wrote:
Hi,I'm using the development version of Django (trunk) and I've got twosimple classes. The Language class should contain the two letterlanguage abbreviations and the full name of the language in English.
The LanguageTranslation class should contain
On 1/31/06, Oliver Rutherfurd <[EMAIL PROTECTED]> wrote:
The use case for this is a long registration process, where differentdata points from individual models are split across multiple pages.The application needs to save data collected after every step, so theuser doesn't have to start from
Adrian,
Thank you for your reply. I still have problems with template
inheritance
Can you please help me with the following?
I have the Index1.html
##Index1.html#
{% extends "board/test" %}
{% block title %}Tittle from Index.html {% endblock %}
This is a text from
On the Django site it lists the currently implemented databases and say
"more to come soon".
Is Oracle on that list? And relatively speaking, how "soon" is soon?
Robert
A bit of code would have clarified my problem. This is what I tried the
first time:
return "Testing %s %s %.2f" % (self.someForeignKey.someThing(),
self.somedate.strftime("%d-%m-%Y"), self.someFloat)
There were 2 problems, basically. First, I tried to access an object
instance directly and not
Waylan Limberg wrote:
I envision a simple script that intercepts the
upload submit, checks the actual file size against the specified limit
(perhaps in a hidden field or hard coded in script or even via an ajax
request (but why?)) and either returns an error message or submits the
upload.
No,
On 1/30/06, Jan Rademaker <[EMAIL PROTECTED]> wrote:
> What is save to use __repr__ ?
>
> I've found out that I shoud use self.get_someForeignKey().someThing()
> instead of self.someForeignKey.someThing(), but what about date fields
> and such?
>
> Because, when I use self.someDateField in
I ran into the same thing in a model with a ForeignKey to an auth.User
object. In my __repr__ function I had:
self.get_user()
which would crash Django. In this instance, I wanted the username
specifically, so I resorted to using:
self.get_user().username
I didn't try, but I think this would
On 1/30/06, Amit Upadhyay <[EMAIL PROTECTED]> wrote:
> On 1/30/06, Maniac <[EMAIL PROTECTED]> wrote:
> >
> > Amit Upadhyay wrote:
> >
> > > It would be good to have a general django wide setting specifying the
> > > maximum length allowed for POST data, if underlying server allowed it.
> >
> >
Tim TerlegÄrd wrote:
To get a non-editable field you can do field = meta.CharField(editable =
False). This is meant for hiding the field, right? Not to make it
readonly in code?
It means (as far as I know) that default manipulators will skip it and
won't complain about their invalidity. So
To be complete, this is the Error page I get:
TypeError at /admin/reg/languages/2/
'bool' object is not callable
Request Method: GET
Request URL:http://localhost:8000/admin/reg/languages/2/
Exception Type: TypeError
Exception Value:'bool' object is not callable
On 1/30/06, Jan Rademaker <[EMAIL PROTECTED]> wrote:
> Would it make sense to implement such a thing? An alternative would be
> to figure out at what date a week starts and ends and just use
> pub_date__range, but that's not really the point. I'm just curious how
> easy/hard it would be to
To get a non-editable field you can do field = meta.CharField(editable =
False). This is meant for hiding the field, right? Not to make it
readonly in code?
To me hidden is more intuitive than editable. I thought that when so
much was renamed anyway... :)
Tim
What is save to use __repr__ ?
I've found out that I shoud use self.get_someForeignKey().someThing()
instead of self.someForeignKey.someThing(), but what about date fields
and such?
Because, when I use self.someDateField in __repr__ django crashes the
moment _add_ a new object (using admin).
Amit Upadhyay wrote:
No time for investigating it right now, but existence of those
projects imply its doable, even if its a hack, atleast on some servers.
Hm... Yes, they do it with some patched FCGI code.
I think that this is doable, but need to be implemented by an Apache
Hook/Handler.
I've done some searches now for something related with mod_python, but
not found anything, just a link with this same problem but using Perl.
http://www.experts-exchange.com/Web/Web_Languages/CGI/Q_20862752.html
Hello,
As far is I know it's not possible to query date fields for a cerain
week number, eg.
# Select all polls from week 5, 2006
polls.get_list(
pub_date__year=2006,
pub_date__week=5
)
Would it make sense to implement such a thing? An alternative would be
to figure out at what date a
On 1/30/06, Maniac <[EMAIL PROTECTED]> wrote:
Amit Upadhyay wrote:> It would be good to have a general django wide setting specifying the> maximum length allowed for POST data, if underlying server allowed it.Django just doesn't control these things. Read my answer in this very
thread, it's
Amit Upadhyay wrote:
It would be good to have a general django wide setting specifying the
maximum length allowed for POST data, if underlying server allowed it.
Django just doesn't control these things. Read my answer in this very
thread, it's http-server and browser that don't let it
Luke Skibinski Holt wrote:
my hd failed the other day taking my db with it. I'm trying to restore
my project now, but I'm getting this error in the admin app:
ERROR: missing FROM-clause entry for table "auth_users" SELECT
Adrian,thank you for your reply.
Yes, they both are in the same (board) directory.
So, what shall I try to find out the reason why it doesn't work?
Thank you
Regards,
L.
On Sunday 29 January 2006 20:29, arthur debert wrote:
> is there a way to check for this BEFORE the file
> is uploaded?
On Monday 30 January 2006 08:15, Adrian Holovaty wrote:
> On 1/30/06, tonemcd <[EMAIL PROTECTED]> wrote:
> > So does this happen *before* the file is uploaded - I mean when the
Cheers Adrian, that's very handy to know..
Tone
I have two text input fields in a form. At least one of them is
required. My question is, how can I check for this?
class MyManipulator = (formfields.Manipulator):
def __init__(self, request=None):
self.fields = [
formfields.TextField(
On 1/30/06, treelife <[EMAIL PROTECTED]> wrote:
> Firstly, Debian 3.1 does not have a python2.4 version of the software
> for Apache2.0 and when I install the 2.3 version Apache is giving me
> some ".. Segmentation fault (11)".
Try disabling the PHP Apache module. There are some known issues
On 1/30/06, tonemcd <[EMAIL PROTECTED]> wrote:
> So does this happen *before* the file is uploaded - I mean when the
> submit button is pressed? It seems that Django will be getting
> information from the browser about the length of the data to be
> uploaded - and that's something I've always
Bryan,
If you can handle Zope PageTemplates, the plugin from Stefan might be
useful: http://www.zope.org/Members/shh/DjangoPageTemplates
That allows for variable creation, but of course you don't get the
django templates...
Cheers,
Tone
Amit,
I think that's more a progress 'barber pole' widget than something
which will detect the length of a file and drop the connection if it's
over a certain size (although it's hard to tell...)
Cheers,
Tone
Adrian Holovaty wrote:
def isSmallFile(self, field_data, all_data):
if len(field_data["content"] > 1: # 10,000 bytes
raise validators.ValidationError, "Please enter a smaller file."
The trick here is to operate on field_data['content'] instead of
field_data.
thank you mary !
MEDIA_ROOT = '/home/greg/Projects/woot/'
with 'postimgs' as the path in imagefield allow editing without error.
my hd failed the other day taking my db with it. I'm trying to restore
my project now, but I'm getting this error in the admin app:
ERROR: missing FROM-clause entry for table "auth_users" SELECT
Many people seem to have some difficulties configuring apache
mod_python, at least initially to work with Django. I have also had
these initial configuration difficulties, but have successfully
configured it on my local box, which runs Suse 9.3.
However, I am having real difficulties just
u have to check your media_root that is in settings.py
cause i think the problem is that he can't find the right path for your
media files
and the right path had to be media_root path+ the path of upload_to
[EMAIL PROTECTED] wrote:
> It doesn't solve the problem, i can't still override the image
40 matches
Mail list logo