I don't know if this is still the case but when I've tried to set
field.choices before now that doesn't change the widget.choices.
Try adding this:
self.fields['answers'].widget.choices = [(i, a.statement) for i, a in
enumerate(answers)]
in fact I just checked and now the widge
http://www.ziddu.com/download.php?uid=bLCclJWra7Ch4palZLKWlJWiZLGglpk%3D4
SpyBotSearch-Destroy_1
sure...
Can you copy link. and paste URL.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To
Am Dienstag, 22. Januar 2008 22:09 schrieb Francis:
> Hi,
>
> I'm using the attach_alternative command to send html emails.
>
> But when I use this command, I always get a "Content-Type: text/html;
> charset=utf-8" heading in all my emails.
>
> Is it possible to get rid of it?
Why do you want to
I recommend this approach because it works seamlessly when
transferring between production and development:
1. Put your static files in the repository (assuming you are using one)
2. On the production server, add these lines to the site config
so this doesn't get used except on developmen
http://www.ipodvoorniks.nl/?page=clicks&ref=14691
On 23 jan, 11:20, Thomas Guettler <[EMAIL PROTECTED]> wrote:
> Am Dienstag, 22. Januar 2008 22:09 schrieb Francis:
>
> > Hi,
>
> > I'm using the attach_alternative command to send html emails.
>
> > But when I use this command, I always get a "Con
Hi,
I am not sure if anyone has had this situation or not but I have been
struggling with this for days now.
I have a form with a few select fields and a few text fields. The form post
the information to it's own url so that the details show below the form. I
try to write the form dict to a sesss
thanks Corey very much,I have tried your 5-step instruction, it works
fine ,but my problem is
"I need press F5 constantly to refresh my no-bug page to get the css
file down to show that page properly"
sometimes those static file loaded very quickly but sometimes it just
disaperared living a ugly-l
I've searched the web and this group, and the consensus seems to be
that I must have a problem with my urls.py in one or more places;
however, I'm at a loss as to where that might be.
I recently transitioned from a fastcgi deployment proxied from nginx
to mod_python. Previously, nginx was handlin
Hi,
How I see the SQL generated in the system in development?
Its appears on the console?
Thank,
Claudio Escudero
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send ema
Check out this snippet here:
http://www.djangosnippets.org/snippets/555/
If you add this middleware to your application, you will see a bar at
the top of each page showing you the SQL for that page, including any
duplicate requests. So far it's been very handy for me to see whats
actually going
Hi All.
Why I get this error?
It's heppens in person_meter_readings view when request method is POST
on MeterReadings.objects.create(**kw) line, I discovered this using
print's with development server.
def person_meter_readings(request, person_id):
...
if request.method == 'POST':
me
Well, it did in fact turn out to be a bug fixed in the SVN version
(currently 7028), so everything is working great now.
Thanks everyone for the help.
Cheers,
Tim
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"
Hey all,
I'm about to start a new website, and have been a big fan of the symfony
framework to date, anyways I'm always open to new ideas, so a friend
recommended I give django a try, so here I am. I just finished reading
through the book and doing the poll tutorial, have to say its made an
impre
Very much depends on your country, but have a look at esendex.com they offer
a very good api, I can speak from experience! There isn't a python SDK, but
they have examples in other languages, so it shouldn't be too hard to draft
one up and all there specs are based on standard protocols and are we
I just add django.middleware.transaction.TransactionMiddleware to
MIDDLEWARE_CLASSES, and get
OperationalError: ERROR: insert or update on table
"transactions_meterreadings" violates foreign key constraint
"transactions_meterreadings_service_id_fkey"
DETAIL: Key (service_id)=(43683) is not pres
Thank you Eric, it helped a lot. The 'name' attribute does get me
confused every now and then...good point!
- nick
On Jan 23, 12:09 am, Eric Abrahamsen <[EMAIL PROTECTED]> wrote:
> > Question: In python, how do I access name attribute in Author? That
> > is, I'd like to know how to find out auth
Hi,
thanks for all, I will check the possibilities :)
2008/1/23, Mat <[EMAIL PROTECTED]>:
>
> Very much depends on your country, but have a look at esendex.com they offer
> a very good api, I can speak from experience! There isn't a python SDK, but
> they have examples in other languages, so it
>
> #ModelForm
> class RecipeForm(ModelForm):
> class Meta:
> model = Recipe
> exclude = ('user','thumbnail','tag_list')
>
> # View that creates form
>
> def testForm(reque
Hi,
I'm building a web application for one of my clients with django. But
I need to do something that I have never did before and I am somehow
really short on time to learn it.
So I am looking for someone who has experience with encryption/
security in python. It is to be incorporated into my dj
I'm architecting a system that will send and receive messages to/from
our SMS gateway vendor, and I'm trying to figure out the best way to
accomplish asynchronous web service calls inside a Django view. I'd
like the view to create a job and notify another process that an item
has been added to its
> I'm building a web application for one of my clients with django. But
> I need to do something that I have never did before and I am somehow
> really short on time to learn it.
>
> So I am looking for someone who has experience with encryption/
> security in python. It is to be incorporated int
Hi Mat,
I'm a bit of a newbie myself, but for once I actually think that I can
answer some questions here myself - mostly because I've wondered some
of the same things.
> 1. Firstly one of best things about symfony is the debug toolbar which lets
> developers see whats going on, it really is an
Thanks Emil,
Thats great, the debug tag seems to be pretty close to the information I was
after, just not wrapped up in a nice JS bar which folds out of the way :),
maybe a quick template switch would make it really neat, ill have a play
around with it.
Template inclusion tags look like exactly
Tim Chase wrote:
>> What's need to be done :
>> - Take a message, encrypt it using a secure method (should be better
>> or equal than OTP), return the encrypted message.
>
> parties, Blowfish and DES3 are popular choices and likely to be
just a point of fact: neither of these are >= to OTP.
al
Hi again Mat!
> Thats great, the debug tag seems to be pretty close to the information I was
> after, just not wrapped up in a nice JS bar which folds out of the way :),
> maybe a quick template switch would make it really neat, ill have a play
> around with it.
Just after sending the last messa
Alternatively, you can add the primary key to the instance like this:
modified_recipe = f.save(commit=False)
modified_recipe.pk = recipe_id # (where recipe_id is obtained as per
my first response above)
Now when you save modified_recipe, it will update the existing record.
-Rajesh D
--~--~
>>> - Take a message, encrypt it using a secure method (should be better
>>> or equal than OTP), return the encrypted message.
> >
>> parties, Blowfish and DES3 are popular choices and likely to be
>
> just a point of fact: neither of these are >= to OTP.
They're all strong cryptographically,
Django-threadedcomments[1] is a simple yet flexible threaded
commenting system for Django. It uses Django's built-in
django.contrib.comments app as a starting point, adds the ability to
create hierarchies of comments, and then adds some of the
functionality currently provided externally with comm
> If you have not already, go to new.djangobook.com and read chapter 7
> on form processing. Make sure you understand it. Visit the excellent
> newforms reference in the Django doc. Look at the onchange attribute
> for checkboxes to see how to make a form autosubmit on a change to a
> field, a
On Jan 23, 2008 9:17 AM, Claudio Escudero <[EMAIL PROTECTED]> wrote:
> How I see the SQL generated in the system in development?
> Its appears on the console?
http://www.djangoproject.com/documentation/faq/#how-can-i-see-the-raw-sql-queries-django-is-running
--
"Bureaucrat Conrad, you are tech
Only one person (or very limited group) will receive the encrypted
message by email. It will hold customer information need by the sale
rep. So no user will have to deal with the encrypted data.
Server receive customer info -> encrypt critical info -> sent email to
sales rep.
sales rep. decrypt t
Perfect,
Thank you
On Jan 23, 2008 5:03 PM, James Bennett <[EMAIL PROTECTED]> wrote:
>
> On Jan 23, 2008 9:17 AM, Claudio Escudero <[EMAIL PROTECTED]> wrote:
> > How I see the SQL generated in the system in development?
> > Its appears on the console?
>
>
> http://www.djangoproject.com/documenta
I am following the section of the django book
(http://www.djangobook.com/en/1.0/chapter07/) to create a feedback form,
my problem is when I try to submit the form, I get an error (
'ContactForm' object has no attribute 'clean_data' ) I have read a
little and see that it's because the form is n
i'll be honest, i don't know anyone who's ever used a one-time-pad
outside of some military applications before we had computers
everywhere. while the security is mathematically "perfect", it's so
encumbering to implement that i consider it overall riskier. having to
pass by courier gigs upo
> i'll be honest, i don't know anyone who's ever used a one-time-pad
ooh...terminology clarification:
OTP = one-time password
OTP = one-time pad
The former is a common tool used for safely logging in over an
insecure channel (such as using S/Key when logging into my
OpenBSD box over telnet).
Dear Francis,
> Only one person (or very limited group) will receive the encrypted
> message by email. It will hold customer information need by the sale
> rep. So no user will have to deal with the encrypted data.
>
> Server receive customer info -> encrypt critical info -> sent email to
> sales
On Jan 23, 2:39 pm, Andrew Doades <[EMAIL PROTECTED]> wrote:
> I am following the section of the django book
> (http://www.djangobook.com/en/1.0/chapter07/) to create a feedback form,
> my problem is when I try to submit the form, I get an error (
> 'ContactForm' object has no attribute 'clean_d
Thanks, thats looks like what I was talking about, would be quite nice to
wrap it all up into a little pop up bar,
Thanks CJL for the SQL link as well, ill give them both a go.
Mat
-Original Message-
From: django-users@googlegroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of Emil
Sent:
I've spent a little too much time on this, but before I decided to
make a custom sql query, I wanted to see if anyone could provide any
assistance. It is really a python question, and the problem I'm
having is I'm not an expert yet with python.
First, I have a list of dictionaries.
[ {'id': 1,
Rajesh Dhawan wrote:
>
> On Jan 23, 2:39 pm, Andrew Doades <[EMAIL PROTECTED]> wrote:
>
>> I am following the section of the django book
>> (http://www.djangobook.com/en/1.0/chapter07/) to create a feedback form,
>> my problem is when I try to submit the form, I get an error (
>> 'ContactForm
> I know I can use the Q object, like:
>
> MyModel.objects.filter(Q(id=1) & Q(title='test1') | Q(id=2) &
> Q(title='test2'))
>
> My question is how can I convert my list to those Q objects? The list
> may have 2 dictionaries in it like this, or it may have 20. My hangup
> is getting things into
> Try this:
>
> x = [ {'id': 1, 'title': 'test1'}, {'id': 2, 'test2'} ]
> if x:
> d = x[0]
> q = Q(id=d['id']) & Q(title=d['title'])
> for d in x[1:]:
> q = q | (Q(id=d['id']) & Q(title=d['title']))
> query = MyModel.objects.filter(q)
Hey, that make
Stephen Mizell wrote:
>> Try this:
>>
>> x = [ {'id': 1, 'title': 'test1'}, {'id': 2, 'test2'} ]
>> if x:
>> d = x[0]
>> q = Q(id=d['id']) & Q(title=d['title'])
>> for d in x[1:]:
>> q = q | (Q(id=d['id']) & Q(title=d['title']))
>> query = MyModel.obj
>
> But be sure to fix the typo in x first!
>
> >>> x = [ {'id': 1, 'title': 'test1'}, {'id': 2, 'test2'} ]
> File "", line 1
> x = [ {'id': 1, 'title': 'test1'}, {'id': 2, 'test2'} ]
> ^
> SyntaxError: invalid syntax
>
Ha, whoops. I
>
> I just got this working and it's great. I feel like I owe you all a steak
> dinner or something.
Mmmm... sounds good :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group
Hi all,
I'm new to regex/django/python, and I'm having trouble getting urls.py
to pass a request to a view. Specifically, when I hit:
http://django.mysite.com/chef/home/param1/param2/
I'd expect the 3rd from the last pattern to match:
## my urls.py file
I now have this as the view:
if request.method == 'POST':
form = ContactForm(request.POST)
if form.is_valid():
topic = form.cleaned_data['topic']
message = form.cleaned_data['message']
to = form.cleaned_data.get('to')
sender = for
I'm trying to do something I expect would be really simple.
I have a model with a dozen fields. How to I do a query that returns
a subset of those dozen?
In other words, how do I invoke a query and supply what is essentially
a column list in a SQL SELECT statement?
Thanks.
--~--~-~--~-
On Jan 23, 2008 4:38 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> In other words, how do I invoke a query and supply what is essentially
> a column list in a SQL SELECT statement?
By following the instructions in the nice documentation that's
provided with Django:
http://www.djangoproject.
On Jan 23, 5:11 pm, Andrew Doades <[EMAIL PROTECTED]> wrote:
> I now have this as the view:
> if request.method == 'POST':
> form = ContactForm(request.POST)
> if form.is_valid():
> topic = form.cleaned_data['topic']
> message = form.cleaned_data['mess
Cheers,
That was basically the question, what do i put in that to field so the
what I email address I enter to the to field is where the message is
sent to!
Rajesh Dhawan wrote:
>
> On Jan 23, 5:11 pm, Andrew Doades <[EMAIL PROTECTED]> wrote:
>
>> I now have this as the view:
>> if requ
I don't know if the URL you show is literally what you hit or not. If it
is, then it doesn't match because "param1" doesn't match "\d+" which
means one or more digits. Same for param2.
--Ned.
almostvindiesel wrote:
> Hi all,
>
> I'm new to regex/django/python, and I'm having trouble getting
Don't know how I missed this. Thanks.
On Jan 23, 4:41 pm, "James Bennett" <[EMAIL PROTECTED]> wrote:
> On Jan 23, 2008 4:38 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> > In other words, how do I invoke a query and supply what is essentially
> > a column list in a SQL SELECT statement?
>
Hello all,
I have a model with a ForeignKey field that sets null=True:
class Title(models.Model):
#...
supplier = models.ForeignKey(Contact, verbose_name='Supplier',
null=True)
...but when I try to save an instance without a supplier:
>>> t = Title()
>>> t.save()
[complete Traceback be
Update: in the SQL for the Title table,
CREATE TABLE "core_title" (
...
"supplier_id" integer NULL,
);
Two things to note:
1. the SQL explicitly allows the supplier field to be NULL
2. the 'REFERENCES "core_contact" ("id") clause is conspicuously
absent
On Jan 23, 6:12 pm, Wyley <[EMAIL PROT
On Wed, 2008-01-23 at 22:53 +, Andrew Doades wrote:
> Cheers,
>
> That was basically the question, what do i put in that to field so the
> what I email address I enter to the to field is where the message is
> sent to!
>
> Rajesh Dhawan wrote:
> >
> > On Jan 23, 5:11 pm, Andrew Doades <[E
ok, I got it.
the glitch baffleed me is the following:
I changed the apache conf MaxRequestsPerChild from 0 to 1 to let py
code changed inmediate debugable.
but that just requres the apache create a PROCESS for every single
static file -- too luxury for my humble old pc.
On Jan 23, 9:38 pm, mxl
null=True tells Django to STORE a null value--this is why your unit tests
would succeed--because no attempt was made to store a null. It was a
situation where key storage was deferred.
Many databases will allow a constraint with a foreign key to be deferrable
and initially deferred so that you d
Michael,
Thanks for your reply!
> Many databases will allow a constraint with a foreign key to be deferrable
> and initially deferred so that you don't have to disable the relationship
> to load data.
Can you say a bit more about this? I'm by no means an expert on
databases; I'm not quite sure
after changed the MaxRequestsPerChild from 1 to 24 everything works
just fine
sorry post this glitch on a django forum, it should goes to apache
forum.
On Jan 24, 9:03 am, mxl <[EMAIL PROTECTED]> wrote:
> ok, I got it.
> the glitch baffleed me is the following:
> I changed the apache conf MaxRe
On 23-Jan-08, at 6:42 PM, Polar Bear z RPA wrote:
> I try to write the form dict to a sesssion
what code do you use to write the dict to the session? Probably you
are overwriting the session dict instead of adding to it
--
regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/
Hello,
On Jan 23, 2008 11:17 PM, Wyley <[EMAIL PROTECTED]> wrote:
>
> Michael,
>
> Thanks for your reply!
>
> > Many databases will allow a constraint with a foreign key to be deferrable
> > and initially deferred so that you don't have to disable the relationship
> > to load data.
>
> Can you sa
No, it is not the case that null=True is disallowed for FKs, but it
probably should be.
In a full database setup, the existence of foreign key constraints usually
means that records have to be carefully loaded in an appropriate order,
otherwise the FK field in one record has no match in the table
Just a quick question that might be an easy answer but I am curious.
Why is it that in the URL dispatcher all the direct to views use the
first argument in urlpatterns but when we use include it doesn't
matter? Example:
urlpatterns = patterns('myapp.views',
(r'^foo', include('myapp.foo.urls')
Hi Jorge,
Thank you so much for the response! This works perfectly. Thanks for
cluing me in to request.GET.get() functionality. I do have a slight
follow up here though. Once this is implemented you end up with the
redirect URL looking something like this:
http://mygreatwebsite.com/django_ap
Hi Jorge,
Thank you so much for the response! This works perfectly. Thanks for
cluing me in to request.GET.get() functionality. I do have a slight
follow up here though. Once this is implemented you end up with the
redirect URL looking something like this:
http://mygreatwebsite.com/django_ap
Hi Jorge,
Thank you so much for the response! This works perfectly. Thanks for
cluing me in to request.GET.get() functionality. I do have a slight
follow up here though. Once this is implemented you end up with the
redirect URL looking something like this:
http://mygreatwebsite.com/django_ap
Hi Jorge,
Thank you so much for the response! This works perfectly. Thanks for
cluing me in to request.GET.get() functionality. I do have a slight
follow up here though. Once this is implemented you end up with the
redirect URL looking something like this:
http://mygreatwebsite.com/django_ap
Hi Jorge,
Thank you so much for the response! This works perfectly. Thanks for
cluing me in to request.GET.get() functionality. I do have a slight
follow up here though. Once this is implemented you end up with the
redirect URL looking something like this:
http://mygreatwebsite.com/django_ap
Hi Jorge,
Thank you so much for the response! This works perfectly. Thanks for
cluing me in to request.GET.get() functionality. I do have a slight
follow up here though. Once this is implemented you end up with the
redirect URL looking something like this:
http://mygreatwebsite.com/django_ap
What I found is the following:
Platform: Windows-XP
(1) When I check out the trunk from svn (svn co
http://code.djangoproject.com/svn/django/trunk
django-source) and then run "python setup.py install" from django-
source, the script does not install the following:
site_packages/django/contrib/
Hi Jorge,
Thank you so much for the response! This works perfectly. Thanks for
cluing me in to request.GET.get() functionality. I do have a slight
follow up here though. Once this is implemented you end up with the
redirect URL looking something like this:
http://mygreatwebsite.com/django_ap
Hi Jorge,
Thank you so much for the response! This works perfectly. Thanks for
cluing me in to request.GET.get() functionality. I do have a slight
follow up here though. Once this is implemented you end up with the
redirect URL looking something like this:
http://mygreatwebsite.com/django_ap
Hi Jorge,
Thank you so much for the response! This works perfectly. Thanks for
cluing me in to request.GET.get() functionality. I do have a slight
follow up here though. Once this is implemented you end up with the
redirect URL looking something like this:
http://mygreatwebsite.com/django_ap
class Person(models.Model):
PIN = models.CharField(maxlength=20, primary_key=True)
Name = models.CharField(maxlength=20)
class Burse(models.Model):
PIN = models.ForeignKey(Person)
Cash = models.IntegerField()
===
p = Person(..)
m = p._meta
m.get_all_rela
class Person(models.Model):
PIN = models.CharField(maxlength=20, primary_key=True)
Name = models.CharField(maxlength=20)
class Burse(models.Model):
PIN = models.ForeignKey(Person)
Cash = models.IntegerField()
With HTML Page: show
On 24-Jan-08, at 8:49 AM, Dennis wrote:
> Thanks again Jorge!! This newsgroup is really fantastic!,
possibly - but is that an excuse for sending this mail 10 times?
--
regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/web/
Foss Conference for the common man: http://registra
Got it. I am now regex semi-literate... this helped:
http://www.roblocher.com/technotes/regexp.aspx
For those interested, I changed the broken line to
(r'^chef/home/(?P[a-z]+)/(?P[a-z]+)/
$','mysite.chef.views.sort_recipes')
Thanks Ned
~John
On Jan 23, 2:59 pm, Ned Batchelder <[EMAIL PROTECTE
Bingo. I assumed (incorrectly) that the ModelForm class would
automatically incorporate the PK since it was auto-gened in the Model
class. Your fix does the trick.
Thanks Rajesh,
~John
On Jan 23, 9:55 am, Rajesh Dhawan <[EMAIL PROTECTED]> wrote:
> Alternatively, you can add the primary key to t
This is my model:
id = models.IntegerField(primary_key=True)
hashid = models.CharField(max_length=390, blank=True)
name = models.ForeignKey(Strings, db_column='name',
related_name='tstcName')
url = models.ForeignKey(Text, db_column='url', related_name='url')
startsat = models.DateT
This is my model:
class TestCaseSuite(models.Model):
id = models.IntegerField(primary_key=True)
hashid = models.CharField(max_length=390, blank=True)
name = models.ForeignKey(Strings, db_column='name',
related_name='tstcName')
url = models.ForeignKey(Text, db_column='url', related
81 matches
Mail list logo