it is ok, need to import settings
On Nov 23, 3:50 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> i have file named dump.py at the root folder of django project,i want
> to connect database using django settings.py, so here is my code:
>
> from django.db import connection, transaction
> curs
oh, i see:
forms.CharField(widget=forms.TextInput(attrs={'class':'special'}))
Thanks!
On 11/23/07, James Bennett <[EMAIL PROTECTED]> wrote:
>
>
> On 11/23/07, Nicholas Ding <[EMAIL PROTECTED]> wrote:
> > Any ideas?
>
> http://www.djangoproject.com/documentation/newforms/#widgets
>
>
> --
> "Burea
I need to load different translations in one site. Exact language for
translations is the same, but there are differences between messages.
Structure of locale looks like that:
./locale
|-- en
| `-- LC_MESSAGES
| |-- django.mo
| |-- django.po
| `-- django.po~
|-- en_gb_rentals
On 11/23/07, Nicholas Ding <[EMAIL PROTECTED]> wrote:
> Any ideas?
http://www.djangoproject.com/documentation/newforms/#widgets
--
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."
--~--~-~--~~~---~--~~
You received this message beca
***Free sex and vids. downloads
http://Earnfre.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 unsu
This question is related to this one I asked a couple of months ago:
http://decenturl.com/groups.google/djangomultipleforms
I'd like to use something similar to the "edit_inline" option, but in
a view. My test models look like this:
class Person(models.Model):
person_name = models.CharField
I don't know whether this would be better done by replacing the
INTERNAL_IPS functionality, or adding a second similar means, but
for my app, it's helpful to know if the user is "internal" or
"external" as defined by several netmasks/CIDR addresses. Rather
than adding every address in the network
Hi,
I am running django svn, and have created a fixture called
initial_data.json, it was working just fine. Lately I added a new
model, after the new model addition every time I run syncdb I get this
error:
Problem installing fixture 'initial_data.json': (1062, "Duplicate
entry 'pw-application' f
Hi! Django 0.96.1 doesn't install on my XP machine. Here is what
happens when the setup.py file is run:
C:\Python25\Django-0.96.1>setup.py install
running install
running build
running build_py
error: package directory '\django' does not exist
I also tried by moving the tarred/unzipped file t
On 11/23/07, Marcin Kaszynski <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I tried to file this as a ticket, but trac kept rejecting it as spam
> even after I removed all the links and changed contents. I'm posting
> it here because others might find it useful too.
Have you tried creating a login:
ht
Hi!! Oops video! http://www.mactanque.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 e
Hello all,
I am just starting out with django and I have stuck a roadblock on
this web app I am trying to create. I want to have something like
this:
The cast of this play:
"Shane" as "Jeremy"
##
I want to place two input boxes in my admin interface as follows:
as
Can someone tell me how I ca
Okay, found the problem. It should say: C:
\Python25\Django-0.96.1>python setup.py install
Btw, the instruction at point 4. for Windows at
http://www.djangoproject.com/documentation/install/ is incorrect.
Dinesh
On Nov 23, 5:23 pm, dineshv <[EMAIL PROTECTED]>
wrote:
> Hi! Django 0.96.1 doesn
On Fri, 2007-11-23 at 14:59 -0800, leotr wrote:
> Yes, not only it's dirty but it's ineffective as well!
And your idea violates DRY.
> Declare a constant somewhere and use it in both model and form.
And where would that "somewhere" be?
Custom constants on the model?
I see no point in adding in
I have a problem with the csrfmiddleware - I'm trying to put up a form
to edit django templates, and if the template being edited has a
element the csrf thing inserts itself into the form input. I'm
wondering if there is a way to disable it for part of a page.
--~--~-~--~~
Yes, not only it's dirty but it's ineffective as well!
Declare a constant somewhere and use it in both model and form.
max_link_url_len = 80
class Link(models.Model):
url = bla_bla_field(max_length = max_link_url_len)
class myForm(forms.Form):
url = forms.URLField( max_length=m
On 24-Nov-07, at 11:03 AM, Shriphani wrote:
> "Shane" as "Jeremy"
> ##
>
> I want to place two input boxes in my admin interface as follows:
> as
> Can someone tell me how I can achieve this ?
you will have to hack admin for this - it is better not to do this as
admin is going to change ver
Didn't you look at html code which was generated by admin?
you will need to generate a form which has such fieldnames:
car..
like
and then react on post method in view
--~--~-~--~~~---~--~~
You received this message because y
El mar, 20-11-2007 a las 15:41 -0500, Marty Alchin escribió:
> On Nov 20, 2007 3:33 PM, Chris Hoeppner <[EMAIL PROTECTED]> wrote:
> > It would be nice to be able to include this in the upload_to parameter.
> > Something like
> > 'upload/%(model_name)s/%(instance_id)s.%(mimetype_extension)s' perhap
I'm not sure I follow you completely, but I think my blog post on the
subject of finding lookup items that are not being used may get you
going in the right direction.
http://blog.michaeltrier.com/2007/8/12/finding-lookup-items-that-are-not-used
I hope it helps.
Michael
On Nov 23, 2007 5:54 AM
WHO WE ARE
YouSendIt is the No. 1 digital file delivery company serving business and
individuals businesses who want a easy, secured, reliable and faster way to
SEND, RECEIVE and TRACK DIGITAL FILES.
YOUSENDIT SOLUTION
We replace the hassles of dealing with unreliable FTP servers, eliminate the
fr
On Nov 23, 2007 10:57 AM, Tim Chase <[EMAIL PROTECTED]> wrote:
>
> Hmm...your code seems to reference an "ipv4" module I don't have
> here on either of my Debian boxes, or my Win32 box at work. That
> could have been handy to have, rather than trying to reinvent the
> wheel. The closest I could
On Nov 23, 2007 10:32 AM, Tim Chase <[EMAIL PROTECTED]> wrote:
>
> I don't know whether this would be better done by replacing the
> INTERNAL_IPS functionality, or adding a second similar means, but
> for my app, it's helpful to know if the user is "internal" or
> "external" as defined by several
On Nov 23, 2007 9:42 AM, Wolfram Kriesing <[EMAIL PROTECTED]> wrote:
>
> On Nov 23, 2007 3:28 PM, James Bennett <[EMAIL PROTECTED]> wrote:
> >
> > On 11/23/07, Wolfram Kriesing <[EMAIL PROTECTED]> wrote:
> > > looks cleaner in my eyes. opinions please!
> >
> > In my opinion, you're asking for a lo
congrats. interesting solution.
Lately I've switched to newforms admin too.
On Nov 22, 11:50 am, Julien <[EMAIL PROTECTED]> wrote:
> Hi Kamil and all,
>
> I have finally found what I was looking for by using the branch
> newforms-admin.
> It could be tidied up a bit, but at least it works!
> Hope
How do you clean a field that's supposed to be a date or a number, for
example, if the user doesn't provide a legal date or number? If you're
not allowed to throw validation errors during cleaning, you could find
yourself in a situation where your later cleaning code makes
assumptions that aren't
On 11/23/07, Wolfram Kriesing <[EMAIL PROTECTED]> wrote:
> looks cleaner in my eyes. opinions please!
In my opinion, you're asking for a lot of custom behavior from a
default field type, and the fact that you have to do some custom
coding to support that custom behavior is not a bug ;)
--
"Bu
Hi,
I tried to file this as a ticket, but trac kept rejecting it as spam
even after I removed all the links and changed contents. I'm posting
it here because others might find it useful too.
When you use coverage.py in "manage.py test" it incorrectly reports
some statements as not executed. Th
I have models something like this:
class Attribute (Model):
name = CharField(maxlength=32)
private = BooleanField(default=False)
class Object (Model):
...
attr = ForeignKey(Attribute, null=True, blank=True)
now I want to exclude Objects containing a private Attri
this has two drawbacks:
1) the URL is validated in the "wrong" place (in clean() instead of
clean_url())
2) the error, if one occurs, is not assigned to the errors['url']
but errors['__all__']
fixing 2) would also be hackish imho
wolfram
On Nov 23, 2007 2:28 PM, Matthias Kestenholz <[EMAIL P
On Nov 23, 2007 2:41 PM, Matthias Kestenholz <[EMAIL PROTECTED]> wrote:
>
>
> On Fri, 2007-11-23 at 14:30 +0100, Wolfram Kriesing wrote:
> > :-) yep we also discussed that here
> > still it seems "wrong" that it needs to be done with such a hacky way around
> >
>
> I don't think that's hacky at al
On Fri, 2007-11-23 at 14:30 +0100, Wolfram Kriesing wrote:
> :-) yep we also discussed that here
> still it seems "wrong" that it needs to be done with such a hacky way around
>
I don't think that's hacky at all, really. If you want an URLField, you
get a field that guarantees that it really co
Maybe you can remove the logic from the Field cleanMethod and add it
to the Form CleanMethod.
because i understand you want a validation based on the content of
several fields ?
I would try something like this:
- in Field "clean" method: validate data nature
ie mail address is really a mail adres
this is what i currently have to do :(
if the clean_() function would get all the form-data that would
no be necessary!!
def __init__(self, *args, **kwargs):
data = len(args) and args[0] or kwargs['data']
# Copy the data first, so we can modify them,
copied = dict([(k,
Hello everyone
I've got a views.py in my forms application that emails form data off to
another department.
It's a bookign form for events that appears on the events details page.
www.bongo.com/events/EVENTSLUG
The form is displayed in a template and is on our web site, works a treat.
I've als
Hi,
I am trying to setup a django v0.96 with oracle 10g but keep getting
this error: cx_Oracle.DatabaseError: ORA-00911: invalid character
Would like to ask here... which version or branch of django should I
use to get oracle working fine.
--~--~-~--~~~---~--~
Then what is the use of specifying callback in `validator_list`? Also,
what can I do to make the above custom validator work? I am using form
but don't know what to do to invoke the validator.
On Nov 23, 2:56 pm, "James Bennett" <[EMAIL PROTECTED]> wrote:
> On 11/23/07, Bit Blazer <[EMAIL PROTEC
On 11/23/07, Bit Blazer <[EMAIL PROTECTED]> wrote:
> When I am trying to test this model from shell, it's just saving the
> data without any error messages when it is invalid. I don't know whats
> wrong in the code above. Any suggestions how can I fix this?
Validation is not (at the moment) perfo
Hi,
I have created a generic model class with a custom field validator to
which I have defined in the model as:
class MyModel(models.Model):
snum = models.CharField(max_length=5, validator_list=[is_valid_snum])
The function `is_valid_snum` has been defined as a global function
outside class
Hello,
My name is Thawatchai Piyawat, a programmer from Thailand that uses
Django to create LightLex.com. I just found out that I have been
banned from this group.
I believe there must be some misunderstandings, or something might be
wrong. Please advice.
Thank you,
Thawatchai
PS: I use my wi
The website www.200836.com was aimed at that all the people in the
world can buy Olympic souvenirs anywhere anytime
The website www.200836.com was exclusively authorized by BOCOG to sell
licensed products of the Beijing Olympics
if you want to know any information about 2008 beijing Olympic
games
On Nov 23, 2007 3:29 PM, Todd O'Bryan <[EMAIL PROTECTED]> wrote:
>
> How do you clean a field that's supposed to be a date or a number, for
> example, if the user doesn't provide a legal date or number? If you're
> not allowed to throw validation errors during cleaning, you could find
> yourself i
On Fri, 2007-11-23 at 14:45 +0100, Wolfram Kriesing wrote:
> On Nov 23, 2007 2:41 PM, Matthias Kestenholz <[EMAIL PROTECTED]> wrote:
> >
> >
> > On Fri, 2007-11-23 at 14:30 +0100, Wolfram Kriesing wrote:
> > > :-) yep we also discussed that here
> > > still it seems "wrong" that it needs to be do
But the problem is that the clean() method of the field already throws
a validationError, though i actually dont need to validate this field.
And that method simply comes first, no way around using the various
clean methods :-(
wolfram
On Nov 23, 2007 2:32 PM, Manakel <[EMAIL PROTECTED]> wrote:
Hi Wolfram,
On Fri, 2007-11-23 at 14:05 +0100, Wolfram Kriesing wrote:
> I got an alike problem, I ran through the docs, mailing lists, etc.
> but no solution.
>
> I got:
>
> class LinkForm(forms.Form):
> TYPE_CHOICES = (
> ('user', _('User link')),
> ('url', _('Web link')),
I got an alike problem, I ran through the docs, mailing lists, etc.
but no solution.
I got:
class LinkForm(forms.Form):
TYPE_CHOICES = (
('user', _('User link')),
('url', _('Web link')),
)
type = forms.ChoiceField(choices=TYPE_CHOICES)
user = forms.IntegerField(re
On 24-Nov-07, at 11:34 AM, Jantawan Piyawat wrote:
> I believe there must be some misunderstandings, or something might be
> wrong. Please advice.
was your mailbox bouncing mail?
--
regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/web/
Foss Conference for the common man: ht
Hello Dear All,
I have the following models
A --is linked via A-LINKS-- to B --is linked via B-LINKS to C.
where A,B,C are models (ie Requirement, Test,Defect)
and A-LINKS is a N-N relationship between A & B using a third party
object. (intermediate table)
and B-LINKS is a N-N relationship betw
Some of the more oracle oriented people on the list will be able to give you
an answer with more depth, however: there was a branch (and a sprint) solely
given to improving oracle support. This is now merged into trunk, so it may
be worth your while upgrading!
Ben
On 23/11/2007, anthony <[EMAIL PR
Matt Davies wrote:
> Hello everyone
>
> I've got a views.py in my forms application that emails form data off to
> another department.
>
> It's a bookign form for events that appears on the events details page.
>
> www.bongo.com/events/EVENTSLUG
>
> The form is displayed in a template and is o
What I am doing currently is:
class myForm(forms.Form):
url = forms.URLField( max_length=Link._meta.get_field('url').maxlength )
is this really the django-way to pass the maxlength into the form,
when i build the form by hand?
looks pretty dirty
--
cu
Wolfram
--~--~-~--~-
:-) yep we also discussed that here
still it seems "wrong" that it needs to be done with such a hacky way around
wolfram
On Nov 23, 2007 2:28 PM, Matthias Kestenholz <[EMAIL PROTECTED]> wrote:
>
> Hi Wolfram,
>
>
> On Fri, 2007-11-23 at 14:05 +0100, Wolfram Kriesing wrote:
> > I got an alike pro
We discussed this here again, and it looks like newforms currently
mixes cleaning and validating data in a not so ideal way.
Actually the clean and validation process should be separated, there
should be clean-methods and validate-methods. The process should work
in the following way, to allow fu
I just see that all 'digest' mails from django-users go to 'spam' in
my Gmail account. That may be the reason.
FYI, I never send an email to this group ever! I just read (via
search) the conversations.
BTW: my Gmail account is 'thawatchai'
Thanks,
Thawatchai
On Nov 24, 1:04 pm, Jantawan Piya
On Fri, Nov 23, Andrew McMurry wrote:
>
> I have models something like this:
>
> class Attribute (Model):
> name = CharField(maxlength=32)
> private = BooleanField(default=False)
>
> class Object (Model):
> ...
> attr = ForeignKey(Attribute, null=True, blank=True)
>
>
On Nov 23, 2007 3:28 PM, James Bennett <[EMAIL PROTECTED]> wrote:
>
> On 11/23/07, Wolfram Kriesing <[EMAIL PROTECTED]> wrote:
> > looks cleaner in my eyes. opinions please!
>
> In my opinion, you're asking for a lot of custom behavior from a
> default field type, and the fact that you have to do
>> I don't know whether this would be better done by replacing the
>> INTERNAL_IPS functionality, or adding a second similar means, but
>> for my app, it's helpful to know if the user is "internal" or
>> "external" as defined by several netmasks/CIDR addresses. Rather
>> than adding every address
On 24-Nov-07, at 11:48 AM, Jantawan Piyawat wrote:
> I just see that all 'digest' mails from django-users go to 'spam' in
> my Gmail account. That may be the reason.
if you brand us as 'spam' - why blame us for reciprocating ;-)
--
regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpl
really good idea.
I will add constants to the model-classes and refer to them via the
model.FIELD_MAX_LENGTH
thx
Wolfram
On Nov 23, 2007 11:59 PM, leotr <[EMAIL PROTECTED]> wrote:
>
> Yes, not only it's dirty but it's ineffective as well!
>
> Declare a constant somewhere and use it in bot
I don't flag the mails myself. The too-smart Gmail has done it for me
(without my consent, obviously). I've just found this out a minute
ago. That's why I've never seen an email from this group in my inbox.
Thawatchai
On Nov 24, 1:25 pm, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote:
> On 24-Nov-
hi,
I have two models called Child and Sponsor. There is a model called
Sponsorship which has foreign keys to Child and Sponsor. For the
foreign key to Child, I want to limit choices to all those children
who are *not* already a foreign key to sponsorship and who are
active. This is the q
61 matches
Mail list logo