RE: Cannot get this ModelForm view to save to the db, what am I doing wrong please

2018-12-10 Thread Matthew Pava
this ModelForm view to save to the db, what am I doing wrong please Cannot seem to get .save() to write to the db This is the model class Customer(models.Model): email = models.EmailField() postcode = models.CharField(max_length=10) def __unicode__(self): return self.email

Cannot get this ModelForm view to save to the db, what am I doing wrong please

2018-12-10 Thread MikeKJ
Cannot seem to get .save() to write to the db This is the model class Customer(models.Model): email = models.EmailField() postcode = models.CharField(max_length=10) def __unicode__(self): return self.email def save(self): self.postcode=upper(self.postcode)

Re: What am I doing wrong with this URL Pattern

2012-01-27 Thread Tim Chase
On 01/19/12 03:36, Django Newbie wrote: Example. url(r'^People/Info/(?P\d+)/$', 'iFriends.People.views.details'), url(r'^People/Info/(?P[a-z]{3})/$', 'iFriends.People.views.detail_name'), It works with numeric value. if I use "http://localhost:8000/ People/Info/1/" but not with if I use

What am I doing wrong with this URL Pattern

2012-01-27 Thread Django Newbie
Hi, I am trying to figure out a way to call a function depending on the parameter in the URL. Example. url(r'^People/Info/(?P\d+)/$', 'iFriends.People.views.details'), url(r'^People/Info/(?P[a-z]{3})/$', 'iFriends.People.views.detail_name'), It works with numeric value. if I use

Re: what am I doing wrong?

2011-01-25 Thread Daniel Roseman
On Tuesday, January 25, 2011 5:41:35 PM UTC, MikeKJ wrote: > > > class CertForm(forms.Form): > agree = forms.BooleanField(required=True, label="I confirm the above > and > agree.") > cert = forms.BooleanField(required=False, label="I require a > certificate") > > class

Re: what am I doing wrong?

2011-01-25 Thread Rob McQueen
rform is invalid in any case > 3 Just save the data given to another model 'Accounts' is all I want it to > do but it has to be done in here as this is where the agree is done > -- > View this message in context: > http://old.nabble.com/what-am-I-doing-wrong--tp30760259p30760259.html > S

what am I doing wrong?

2011-01-25 Thread MikeKJ
this message in context: http://old.nabble.com/what-am-I-doing-wrong--tp30760259p30760259.html Sent from the django-users mailing list archive at Nabble.com. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, sen

Re: Aggregates are giving the wrong numbers for .annotate()? What am I doing wrong?

2010-11-01 Thread Tom Evans
On Fri, Oct 29, 2010 at 6:30 PM, Jumpfroggy wrote: > Hi all, > > I've been working in django for a while now, but am still wrapping my > head around the more complex queryset features. > > I have something like this: > > class Foo: >    name = CharField() >    bars =

Aggregates are giving the wrong numbers for .annotate()? What am I doing wrong?

2010-10-29 Thread Jumpfroggy
Hi all, I've been working in django for a while now, but am still wrapping my head around the more complex queryset features. I have something like this: class Foo: name = CharField() bars = ForeignKey(Bar) widgets = ForeignKey(Widget) I can do this: Foo.objects.extra(select={

Bulk adding permissions from QuerySet failing, what am I doing wrong?

2010-02-05 Thread Eric Chamberlain
uot;, line 497, in _add_items [self._pk_val] + list(new_ids)) File "/Users/eric/working/rfapns/lib/python2.6/site-packages/Django-1.1.1-py2.6.egg/django/db/backends/util.py", line 19, in execute return self.cursor.execute(sql, params) ProgrammingError: can't adapt What am I doing wr

Re: It looks like Django is working from a stale DB. What am I doing wrong?

2010-02-04 Thread Karen Tracey
usual problem, which has reared its ugly head on > several fronts. The basic jist is that Django seems to not recognize > database changes made... > [snip] > > What am I doing wrong? > You are seeing the same things as described in this thread: http://groups.google.c

It looks like Django is working from a stale DB. What am I doing wrong?

2010-02-04 Thread Luke Sneeringer
= Source.objects.get(id = 1) Traceback (most recent call last): File "", line 1, in File "/usr/local/share/django/django/db/models/manager.py", line 120, in get return self.get_query_set().get(*args, **kwargs) File "/usr/local/share/django/django/db/models/query.p

RE: syntax error what am i doing wrong???

2009-10-26 Thread Vincent Jones
Thanks...it worked. -Original Message- From: django-users@googlegroups.com [mailto:django-us...@googlegroups.com] On Behalf Of Daniel Roseman Sent: Monday, October 26, 2009 7:01 PM To: Django users Subject: Re: syntax error what am i doing wrong??? On Oct 26, 10:35 pm, "jon...@co

Re: syntax error what am i doing wrong???

2009-10-26 Thread Daniel Roseman
On Oct 26, 10:35 pm, "jon...@cox.net" wrote: > SyntaxError at / > > ('invalid syntax', ('c:\\Users\\Vincent\\Documents\\django_bookmarks\ > \..\\django_bookmarks\\bookmarks\\views.py', 15, 20, 'return Http > Response(output)\n')) > > SCRIPT FROM VIEWS.PY > > from django.http

Re: syntax error what am i doing wrong???

2009-10-26 Thread Antoni Aloy
2009/10/26 jon...@cox.net : > > SyntaxError at / > > ('invalid syntax', ('c:\\Users\\Vincent\\Documents\\django_bookmarks\ > \..\\django_bookmarks\\bookmarks\\views.py', 15, 20, 'return Http > Response(output)\n')) > > SCRIPT FROM VIEWS.PY > > from django.http import HttpResponse

syntax error what am i doing wrong???

2009-10-26 Thread jon...@cox.net
SyntaxError at / ('invalid syntax', ('c:\\Users\\Vincent\\Documents\\django_bookmarks\ \..\\django_bookmarks\\bookmarks\\views.py', 15, 20, 'return Http Response(output)\n')) SCRIPT FROM VIEWS.PY from django.http import HttpResponse def main_page(request) : output = ''' %s

Re: ModelForm not respecting "exclude" - what am I doing wrong?

2009-05-17 Thread Alex Gaynor
On Sun, May 17, 2009 at 12:38 PM, ringemup wrote: > > > Aha. I'm on 1.0. Can I still use custom validation on the ModelForm > if I use the ModelAdmin to exclude the fields? > > Thank you! > > > On May 17, 1:36 pm, Alex Gaynor wrote: > > On Sun, May

Re: ModelForm not respecting "exclude" - what am I doing wrong?

2009-05-17 Thread ringemup
Aha. I'm on 1.0. Can I still use custom validation on the ModelForm if I use the ModelAdmin to exclude the fields? Thank you! On May 17, 1:36 pm, Alex Gaynor wrote: > On Sun, May 17, 2009 at 12:34 PM, ringemup wrote: > > > I'm trying to exclude

Re: ModelForm not respecting "exclude" - what am I doing wrong?

2009-05-17 Thread Alex Gaynor
On Sun, May 17, 2009 at 12:34 PM, ringemup wrote: > > I'm trying to exclude some fields from an admin form, but the exclude > option on the ModelForm is being ignored, as far as I can tell. The > following is my code. When I view the admin page in question, "Entry > Form

ModelForm not respecting "exclude" - what am I doing wrong?

2009-05-17 Thread ringemup
I'm trying to exclude some fields from an admin form, but the exclude option on the ModelForm is being ignored, as far as I can tell. The following is my code. When I view the admin page in question, "Entry Form Initialized" is printed to the command line, but all the fields, including blog and

Re: MEDIA_ROOT, what am I doing wrong?

2008-03-05 Thread Monica Leko
On 3/5/08, Pete Crosier <[EMAIL PROTECTED]> wrote: > > I think you're over-estimating Django a little when it comes to > serving media - check out > http://www.djangoproject.com/documentation/static_files/ > for details, it requires a little more work. Woho, it works. Thank you very much.

Re: MEDIA_ROOT, what am I doing wrong?

2008-03-05 Thread Pete Crosier
I think you're over-estimating Django a little when it comes to serving media - check out http://www.djangoproject.com/documentation/static_files/ for details, it requires a little more work. On Mar 5, 6:19 pm, "Monica Leko" <[EMAIL PROTECTED]> wrote: > In settings.py I have: > MEDIA_ROOT =

MEDIA_ROOT, what am I doing wrong?

2008-03-05 Thread Monica Leko
In settings.py I have: MEDIA_ROOT = 'C:/Documents and Settings/Monica/Desktop/aab/projekt/templates/media/' Media folder is in 'templates', and 'images' folder is in 'media'. angry.gif is in 'images'. Following page, when requested, doesn't show the image, only text "No image"?! I don't

Re: overriding-default-model-methods what am i doing wrong ?

2006-06-22 Thread coulix
yes it was, thanks. --~--~-~--~~~---~--~~ 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 [EMAIL

Re: overriding-default-model-methods what am i doing wrong ?

2006-06-22 Thread Adrian Holovaty
On 6/22/06, coulix <[EMAIL PROTECTED]> wrote: > def get_absolute_url(self): > return "/blog/tag/%s/" % (self.name) > > def save(self): > print "foo" > self.total_ref = 28 > super(Tag, self).save() > > "foo" [never] shows up on

Re: overriding-default-model-methods what am i doing wrong ?

2006-06-22 Thread coulix
imported file used space.. i was puting tab. --~--~-~--~~~---~--~~ 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,

Re: overriding-default-model-methods what am i doing wrong ?

2006-06-22 Thread coulix
i mean never shows up --~--~-~--~~~---~--~~ 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 [EMAIL

Re: overriding-default-model-methods what am i doing wrong ?

2006-06-22 Thread coulix
class Tag(models.Model): name = models.CharField(maxlength=200, core=True) total_ref = models.IntegerField(blank=True, null=True) class Admin: ordering = ['name'] def __str__(self): return self.name def get_absolute_url(self): return "/blog/tag/%s/"

Re: overriding-default-model-methods what am i doing wrong ?

2006-06-21 Thread Luke Plant
On Tuesday 20 June 2006 17:17, coulix wrote: > when i add a tag element via the admin interface, or from a blog > entry. total_ref is always null. why doesnt it get affected to 28 ? > thanks It looks OK to me. I do have similar code that sets values like this, so it should work. To debug,

overriding-default-model-methods what am i doing wrong ?

2006-06-20 Thread coulix
hello, simple problem : class Tag(models.Model): name = models.CharField(maxlength=200, core=True) total_ref = models.IntegerField(blank=True, null=True) class Admin: ordering = ['name'] def __str__(self): return self.name def get_absolute_url(self):

Re: RSS Feeds - what am I doing wrong?

2006-03-27 Thread Adrian Holovaty
On 3/27/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > When's the book due? > How about a chapter "migrating to Django from J2EE -- Becoming more > productive by unlearning" or something along those lines? I'd be happy > to proof-read it. Hehe...Well, I've never used J2EE (or any Java at

Re: RSS Feeds - what am I doing wrong?

2006-03-26 Thread Adrian Holovaty
On 3/24/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > def items(self, obj): > return submissions.get_list(blog__id__exact = obj.id, > order_by=('-date_submitted',), limit=5) > - - - - - - - - - - - - - - - - - - - - - - - - > > According to the docs, the RSS framework should be

Re: RSS Feeds - what am I doing wrong?

2006-03-24 Thread Bryan Murdock
I'm looking but I don't see anything you are doing wrong. It's been a while since I implemented my feeds and I vaguely remember maybe getting an error like that at one point. What you have looks a lot like what I have that works though. Sorry, I'm not helping much here, but I guess I didn't

RSS Feeds - what am I doing wrong?

2006-03-24 Thread [EMAIL PROTECTED]
Hi. I'm trying to put together a feed for a specific blog in my system. I've been following the example at http://www.djangoproject.com/documentation/syndication/#a-complex-example Unfortunately, when I access the feed, I get: - - - - - - - - - - - - - - - - - - - - - - - - TypeError at