Re: Newbie : Object copy - weird error :-)

2018-07-13 Thread mickael . barbo
Thanks you Melvyn, this is it :-) Have a nice day. Regards Le mardi 3 juillet 2018 00:34:14 UTC+2, Melvyn Sopacua a écrit : > > On vrijdag 29 juni 2018 09:44:40 CEST Mickael Barbo wrote: > > > > > I try to create a way to archive (copy) the same object instance on an > > > other DataBase. > >

Re: Newbie : Object copy - weird error :-)

2018-07-02 Thread Melvyn Sopacua
On vrijdag 29 juni 2018 09:44:40 CEST Mickael Barbo wrote: > I try to create a way to archive (copy) the same object instance on an > other DataBase. > > I followed this advice : # https://stackoverflow.com/ > questions/21699707/python-how-to-copy-all-attibutes-from- > base-class-to-derived-one

Re: Newbie : Object copy - weird error :-)

2018-06-29 Thread Mickael Barbo
Hello Julio, Ok, I see. I try to create a way to archive (copy) the same object instance on an other DataBase. I followed this advice : # https://stackoverflow.com/ questions/21699707/python-how-to-copy-all-attibutes-from- base-class-to-derived-one 2018-06-27 14:56 GMT+02:00 Julio Biason :

Re: Newbie : Object copy - weird error :-)

2018-06-29 Thread Mickael Barbo
Hi 赖信桃, Sorry for formating problem. Here it is class AbstractDataModel(models.Model): xxx class Meta: abstract = True def __iter__(self): return iter([self.xxx, self.yyy, self.zzz, self.aaa, self.qqq, self.mode_bbb]) class

Re: Newbie : Object copy - weird error :-)

2018-06-27 Thread Julio Biason
Hi Mikael, The problem is happening because of this: __init__() takes from 1 to 2 positional arguments but 11 were given On your new __init__(), you added just 2 parameters: `self` and `source`. But you overwrote the default `models.Model` init, which receives way more parameters (the original

Re: Newbie : Object copy - weird error :-)

2018-06-26 Thread 赖信桃
Can you format your code or post it on a gist? On Wed, Jun 27, 2018 at 00:17 wrote: > Hi all :-) > > I'd like to archive some data. > > I did that : > > class AbstractDataModel(models.Model): > > xxx > > > class Meta: > abstract = True > > > def __iter__(self): > > return

Re: Newbie : Object copy - weird error :-)

2018-06-26 Thread mickael . barbo
Error typo, I creates a new thread with the good description ;-) Le mardi 26 juin 2018 16:35:27 UTC+2, Nelson Varela a écrit : > > The following class is kinda weird: > class DataModel(DataModel): > > A class which inherits itself??? > > > > On Tuesday, June 26, 2018 at 11:31:24 AM UTC+2,

Newbie : Object copy - weird error :-)

2018-06-26 Thread mickael . barbo
Hi all :-) I'd like to archive some data. I did that : class AbstractDataModel(models.Model): xxx class Meta: abstract = True def __iter__(self): return iter([self.xxx, self.yyy, self.zzz, self.aaa, self.qqq, self.mode_bbb]) class

Re: Newbie : Object copy - weird error :-)

2018-06-26 Thread Nelson Varela
The following class is kinda weird: class DataModel(DataModel): A class which inherits itself??? On Tuesday, June 26, 2018 at 11:31:24 AM UTC+2, mickae...@gmail.com wrote: > > Hi all :-) > > I'd like to archive some data. > > I did that : > > class AbstractDataModel(models.Model): > xxx > >

Newbie : Object copy - weird error :-)

2018-06-26 Thread mickael . barbo
Hi all :-) I'd like to archive some data. I did that : class AbstractDataModel(models.Model): xxx class Meta: abstract = True def __iter__(self): return iter([self.xxx, self.yyy, self.zzz, self.aaa, self.qqq, self.mode_bbb]) class DataModel(DataModel): pass

Re: Weird error like tickets 8892 and 10811

2014-06-25 Thread Lachlan Musicman
ergh. Rookie error. Subtle bug in the Job class - see the save override: def save(self, *args, **kwargs): if not self.slug: self.slug = self.job_number super(Job, self).save(*args, **kwargs) Note that the call to super is only reachedwhen there is no slug. The fix is simple:

Re: Weird error like tickets 8892 and 10811

2014-06-25 Thread Lachlan Musicman
Ok, I now understand why this happens: >>> x == j True >>> j == x True >>> j.findings 'data' >>> x.findings u'' https://docs.djangoproject.com/en/dev/ref/models/instances/#eq "with the same primary key value and the same concrete class are considered equal. " (no docs in 1.6, but I presume

Weird error like tickets 8892 and 10811

2014-06-25 Thread Lachlan Musicman
I have run up against this bug before: https://code.djangoproject.com/ticket/8892 Recently, it was updated to "duplicate of" https://code.djangoproject.com/ticket/10811 The TL;DR is Sometimes when you have models with O2O or FK you can lose data if the models are saved in the wrong order.

Re: Weird Error when following django book?

2011-05-25 Thread raj
Thank you, so I guess everything is working okay. :) On May 25, 2:30 pm, Jacob Kaplan-Moss wrote: > On Wed, May 25, 2011 at 1:04 PM, Boštjan Mejak > wrote: > > HTML source code can't be passed as a string. You morons. > > This isn't OK. Stop it at

Re: Weird Error when following django book?

2011-05-25 Thread Jacob Kaplan-Moss
On Wed, May 25, 2011 at 1:04 PM, Boštjan Mejak wrote: > HTML source code can't be passed as a string. You morons. This isn't OK. Stop it at once. You've been warned about your tone once before. Please aim for a professional, polite tone here or find another group to

Re: Weird Error when following django book?

2011-05-25 Thread Boštjan Mejak
HTML source code can't be passed as a string. You morons. -- 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

Re: Weird Error when following django book?

2011-05-25 Thread Nan
The "u" before the opening quote is Python's way of telling you that it's a Unicode string instead of an ASCII string. On May 25, 11:54 am, raj wrote: > I'm up to the html template part of the djangobook, and I keep getting > a weird output error whenever I do a t.render()

Weird Error when following django book?

2011-05-25 Thread raj
I'm up to the html template part of the djangobook, and I keep getting a weird output error whenever I do a t.render() call. It's a really small error but I want to make sure that my django module is correctly working. This is the output I got from the example in the django book: u"Dead John

Re: weird error with MS Excel 2010 exports

2011-05-20 Thread chris hendrix
hi gabe - response = render_to_response('reports/trackingdump.html',{'trs':trs,}) filename='trackingdump.xls' response['Content-Disposition'] = 'attachment; filename=' + filename response['Content-Type'] = 'application/vnd.ms-excel; charset=utf-8' that's

Re: weird error with MS Excel 2010 exports

2011-05-20 Thread Gabriel Gunderson
On Thu, May 19, 2011 at 1:44 PM, Bobby Roberts wrote: > hi.  Regardless of how we try to export from a view into an excel > file, we get a weird msgbox reading: > > "The file you are trying to open, 'filenamehere.xls', is in a > different format than specified by the file

weird error with MS Excel 2010 exports

2011-05-19 Thread Bobby Roberts
hi. Regardless of how we try to export from a view into an excel file, we get a weird msgbox reading: "The file you are trying to open, 'filenamehere.xls', is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before

weird error on admin index

2011-04-27 Thread Pascal Moutia
Hi django users I'm trying to start my admin section of my django site but i always got an error apparently with the admin template, but i never touched it, there is the error: TemplateSyntaxError at /admin/ Caught AttributeError while rendering: 'ListView' object has no attribute 'rindex'

Re: weird error on django basic blog

2009-11-14 Thread Bobby Roberts
they are in there though? Now i'm getting a diff error On Nov 14, 2:27 pm, Carlos Ricardo Santos wrote: > I can only see that you're missing the > templates_path/blog/post_archive_day.html > template. > > 2009/11/14 Bobby Roberts > > > > >

Re: weird error on django basic blog

2009-11-14 Thread Carlos Ricardo Santos
I can only see that you're missing the templates_path/blog/post_archive_day.html template. 2009/11/14 Bobby Roberts > anyone know what this traceback means? > > > http://www.thecigarcastle.com/blog/2009/nov/1/my-first-blog-post/ > > -- > > You received this message

weird error on django basic blog

2009-11-14 Thread Bobby Roberts
anyone know what this traceback means? http://www.thecigarcastle.com/blog/2009/nov/1/my-first-blog-post/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from

Re: Weird error on Foreign key save?

2009-02-19 Thread Karen Tracey
On Thu, Feb 19, 2009 at 5:24 AM, Alfonso wrote: > > Karen, > > Good point - I will certainly use dpaste in the future. Here's the > traceback, I should have copied that in right from the start: > > Traceback: > [snip] File

Re: Weird error on Foreign key save?

2009-02-19 Thread Alfonso
Karen, Good point - I will certainly use dpaste in the future. Here's the traceback, I should have copied that in right from the start: Traceback: File "/home/queryclick/webapps/django/lib/python2.5/django/core/ handlers/base.py" in get_response 86. response =

Re: Weird error on Foreign key save?

2009-02-18 Thread Karen Tracey
On Wed, Feb 18, 2009 at 2:30 PM, Alfonso wrote: > > I've got an invoice model that foreign key's to a customer model, when > the invoice is saved I'm update a few fields in that related customer > model to make other code in my setup work. I keep getting > "unsupported

Weird error on Foreign key save?

2009-02-18 Thread Alfonso
I've got an invoice model that foreign key's to a customer model, when the invoice is saved I'm update a few fields in that related customer model to make other code in my setup work. I keep getting "unsupported operand type(s) for ** or pow(): 'Decimal' and 'NoneType'" whenever I try to save

Re: Weird error when doing loaddata

2008-11-22 Thread Russell Keith-Magee
On Sun, Nov 23, 2008 at 10:07 AM, Erik Allik <[EMAIL PROTECTED]> wrote: > > Thanks, your suggestion to very carefully check the fixture path led > me to realizing the problem. I wanted to load the service.json file > located in the working directory but loaddata was actually using the > one in

Re: Weird error when doing loaddata

2008-11-22 Thread Erik Allik
Thanks, your suggestion to very carefully check the fixture path led me to realizing the problem. I wanted to load the service.json file located in the working directory but loaddata was actually using the one in the fixtures subdirectory which was completely outdated. Nevertheless, I think

Re: Weird error when doing loaddata

2008-11-22 Thread Russell Keith-Magee
On Sun, Nov 23, 2008 at 8:09 AM, Erik Allik <[EMAIL PROTECTED]> wrote: > > I'm doing django-admin.py loaddata with a JSON file containing just > [], i.e. an empty fixture, to rule out any possibility of invalid data > being in the fixture, but still getting the following traceback: > >

Weird error when doing loaddata

2008-11-22 Thread Erik Allik
I'm doing django-admin.py loaddata with a JSON file containing just [], i.e. an empty fixture, to rule out any possibility of invalid data being in the fixture, but still getting the following traceback: http://dpaste.com/92961/ The DB schema is in sync with the model definitions. The

Re: newforms-admin weird error ( 'str' object has no attribute '_default_manager' )

2008-07-25 Thread vv2
I am experiencing same error message with r8053, however my situation is a bit different: - commenting out fieldsets definition doesn't help, - everything works perfectly on local dev server and fails deployed through mod_wsgi and mod_python (I didn't try with fcgi) I managed to narrow down the

Re: newforms-admin weird error ( 'str' object has no attribute '_default_manager' )

2008-07-25 Thread Bram de Jong
On Fri, Jul 18, 2008 at 5:45 PM, Karen Tracey <[EMAIL PROTECTED]> wrote: > > Determining which part of the fieldsets definition generates the error would > be helpful. You might be able to determine it by looking at the local vars > in the debug page. Alternatively you could experiment with

Re: newforms-admin weird error ( 'str' object has no attribute '_default_manager' )

2008-07-18 Thread Karen Tracey
On Fri, Jul 18, 2008 at 10:57 AM, Bram de Jong <[EMAIL PROTECTED]> wrote: > > Hello all, > > just updated to latest newforms-admin (r7947) and > Do you know what level you updated from? That's always handy to know when trying to pinpoint when a problem was introduced. > This is the admin

newforms-admin weird error ( 'str' object has no attribute '_default_manager' )

2008-07-18 Thread Bram de Jong
Hello all, just updated to latest newforms-admin (r7947) and This is the admin for one of my (rather large) models: class Sound(SocialModel): # SocialModel is a model that defines some GenericRelation user = models.ForeignKey(User) # snip license = models.ForeignKey(License)

Re: weird error

2008-04-25 Thread Rajesh Dhawan
On Apr 25, 7:25 am, Matias Surdi <[EMAIL PROTECTED]> wrote: > With the following model: > > class Candidate(models.Model): >      name = models.CharField(max_length=100,unique=True) >      file = > models.FileField(upload_to="curriculums/%Y/%m/%d",max_length=300) > >      def

Re: weird error [corrected]

2008-04-25 Thread Matias Surdi
Karen Tracey escribió: > On Fri, Apr 25, 2008 at 8:02 AM, Matias Surdi <[EMAIL PROTECTED] > > wrote: > > > Matias Surdi escribió: > > Sorry, there was an error in the previous message: > > > > > > With the following model: > > > >

Re: weird error [corrected]

2008-04-25 Thread Karen Tracey
On Fri, Apr 25, 2008 at 8:02 AM, Matias Surdi <[EMAIL PROTECTED]> wrote: > > Matias Surdi escribió: > > Sorry, there was an error in the previous message: > > > > > > With the following model: > > > > class Candidate(models.Model): > > name = models.CharField(max_length=100,unique=True) > >

Re: weird error [corrected]

2008-04-25 Thread Matias Surdi
Matias Surdi escribió: > Sorry, there was an error in the previous message: > > > With the following model: > > class Candidate(models.Model): > name = models.CharField(max_length=100,unique=True) > file = > models.FileField(upload_to="curriculums/%Y/%m/%d",max_length=300) > >

weird error [corrected]

2008-04-25 Thread Matias Surdi
Sorry, there was an error in the previous message: With the following model: class Candidate(models.Model): name = models.CharField(max_length=100,unique=True) file = models.FileField(upload_to="curriculums/%Y/%m/%d",max_length=300) def _get_FIELD_url(self,field):

weird error [corrected]

2008-04-25 Thread Matias Surdi
Sorry, there was an error in the previous message: With the following model: class Candidate(models.Model): name = models.CharField(max_length=100,unique=True) file = models.FileField(upload_to="curriculums/%Y/%m/%d",max_length=300) def _get_FIELD_url(self,field):

weird error

2008-04-25 Thread Matias Surdi
With the following model: class Candidate(models.Model): name = models.CharField(max_length=100,unique=True) file = models.FileField(upload_to="curriculums/%Y/%m/%d",max_length=300) def _get_FIELD_url(self,field): return "http://www.google.es; if getattr(self,