Re: 'str' object is not callable

2022-05-06 Thread Lalit Suthar
this part of the code looks fine from a first look. Can you share the complete view code for this On Fri, 6 May 2022 at 12:11, Salima Begum wrote: > Hi all, > In my project I am Django messages Framework. I am always facing 'str' > object error I dont understand how to solve this problem.

Re: 'str' object is not callable error appears from Django Message Framework

2021-09-20 Thread David Nugent
Hi Salima, Stack trace? Always the first call for triage on python exceptions. Also (and unrelated to your issue) google "django messages bootstrap" and check on how to avoid the {% if message.tags == .. %} horror show and make your templates much more readable/easily maintained. On Mon, Sep

Re: 'str' object is not callable

2020-09-23 Thread Khaleel Ahmed H. M. Shariff
Hi, May Peace, Blessings & Mercy of Almighty God be on you! The reason for 'str' object is not callable is because you have created a string object & given parenthesis along with it. As is, >>> x="Good Morning" >>> x() Traceback (most recent call last): File "", line 1, in TypeError: 'str'

Re: 'str' object is not callable

2020-09-23 Thread Alam Khazi
Thank you I will try that. On Wed 23 Sep, 2020, 9:38 PM Avi shah, wrote: > Try adding ''' as it can only take one string as parameter , ''' ''your > message'' . '' your message 2 '' ''' > > On Wed, Sep 23, 2020 at 9:24 PM Salima Begum > wrote: > >> Hi all, >> >> I am getting this error. May I

Re: 'str' object is not callable

2020-09-23 Thread Avi shah
Try adding ''' as it can only take one string as parameter , ''' ''your message'' . '' your message 2 '' ''' On Wed, Sep 23, 2020 at 9:24 PM Salima Begum wrote: > Hi all, > > I am getting this error. May I know the reason why this error occurred? > > Here I attached two screenshots please

Re: 'str' object is not callable in base.py

2012-09-04 Thread Lachlan Musicman
On Wednesday, September 5, 2012, Bill Freeman wrote: > My best guess is that, for whatever reason, 'timetable_view' in your url > conf > has not been converted into the view function. Try actually importing the > view in urls.py and putting it as the target of the pattern *without* > the quotes.

Re: 'str' object is not callable in base.py

2012-09-04 Thread Lachlan Musicman
On Tuesday, September 4, 2012, zayatzz wrote: > From this post i can see this line beeing wrong . > > timetable = get_object_or_404(slug=slug) > > You also need to give object as one of the parameters for > get_object_or_404 shortcut: like this : > >

Re: 'str' object is not callable in base.py

2012-09-04 Thread Bill Freeman
My best guess is that, for whatever reason, 'timetable_view' in your url conf has not been converted into the view function. Try actually importing the view in urls.py and putting it as the target of the pattern *without* the quotes. If this works, then figuring out whether you needed

Re: 'str' object is not callable in base.py

2012-09-04 Thread zayatzz
>From this post i can see this line beeing wrong . timetable = get_object_or_404(slug=slug) You also need to give object as one of the parameters for get_object_or_404 shortcut: like this : https://docs.djangoproject.com/en/dev/intro/tutorial03/?from=olddocs#a-shortcut-get-object-or-404 Alan

Re: RE: 'str' object is not callable

2011-02-18 Thread Burhan
Where is 'deletion_time' defined, in reference to the urls.py? The error is that urls.py can't resolve deletion_time, which is why its saying that "I cannot call a string object". I would investigate that. Try qualifying it by giving it the module name. On another note, you can concatenate

RE: 'str' object is not callable

2011-02-16 Thread Chris Matthews
Hi Patrick, You can typically get it by: 1)missing the % for a string format: x = "Hello number %d" (5) TypeError: 'str' object is not callable 2) And if you overwrite a function name with a string, e.g." >>> min(5,2,3) 2 >>> hour,min,sec = "14:59:03".split(":") >>>

Re: 'str' object is not callable

2009-08-03 Thread Malcolm Tredinnick
On Mon, 2009-08-03 at 09:51 -0700, Dolph wrote: > hey Ronghui, > > Thanks for the reply. I couldnt get your first suggestion to work, I > get "name 'coltrane_category_detail' is not defined". Also, Which is exactly what the problem is. In the first email you posted, you don't have any view

Re: 'str' object is not callable

2009-08-03 Thread Dolph
hey Ronghui, Thanks for the reply. I couldnt get your first suggestion to work, I get "name 'coltrane_category_detail' is not defined". Also, Also, I never posted my models.py in my Category class, get_absolute_url: def get_absolute_url(self): return ('coltrane_category_detail',

Re: 'str' object is not callable

2009-08-02 Thread Ronghui Yu
Try to configure url from (r'^(?P[-\w]+)/$', 'coltrane_category_detail'), to (r'^(?P[-\w]+)/$', coltrane_category_detail), But before that, you need to import this function Or give a whole path to the view like (r'^(?P[-\w]+)/$', 'pack_xxx.mod_xxx.coltrane_category_detail'), On Mon, Aug 3,