ATTRIBUTE ERROR

2010-10-28 Thread sami nathan
My occured Error is Exception Value: 'str' object has no attribute 'resolve' Exception Location: C:\Python25\Lib\site-packages\django\core\urlresolvers.py in resolve, line 217

ATTRIBUTE ERROR

2010-11-02 Thread sami nathan
If i am doing anything wrong forgive me i am newbe MY error is Exception Type: AttributeError Exception Value: 'str' object has no attribute 'resolve' Exception Location: D:\Python25\lib\site-packages\django\core\urlresolvers.py in resolve, line 25 My url.py look like

Attribute error

2011-04-30 Thread Pulkit Mehrotra
AttributeError at /mysite/wishlist/ 'module' object has no attribute 'CharField' What does this error means ??? View for this is: from django.shortcuts import render_to_response from django.http import HttpResponseRedirect,HttpResponse from wishlist.models import wish from wishlist.forms import

Attribute Error

2007-08-19 Thread MikeHowarth
Hi I was wondering whether anyone can help me out. I'm currently creating a form to register users, what I'm finding is that when I then attempt to save the user within the Register:save method I'm getting an attribute error when trying to access the title attribute. I've tr

Attribute error

2018-05-30 Thread Caleb Bryson
I am getting a attribute error when i try to run my server. does anyone know what i can change in this code to fix that? from django.db import models class Post(models.Model) : title = models.Charfield(max_length=140) body = models.Textfield() date = models.DataTimeField() def __str__(self

attribute error

2018-08-28 Thread Imran Sharief
hi every one i am new to django am getting attribute error past from 2 days i got stuck in this error only i have attached the file also plz do help me to resolve this error -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubs

Attribute error

2021-05-12 Thread Peter Kirieny
can somebody help with this please, am building an ecommerce web and when i want to view my cart i get this error AttributeError: 'NoneType' object has no attribute 'price' here is my models.py class OrderItem(models.Model): product = models.ForeignKey(Product, on_delete=models.SET_NULL, null

Re: ATTRIBUTE ERROR

2010-10-28 Thread yu xue
Hi, I feel there are some places which need to modify: 1. urlpatterns should be (r"^wap/di/sub/$", current_datetime), 2. It seems that the view function is endless loop... 2010/10/28 sami nathan > My occured Error is > > Exception Value: > > 'str' object has no attribute 'resolve' > > Exceptio

Re: ATTRIBUTE ERROR

2010-11-02 Thread Tom Evans
On Tue, Nov 2, 2010 at 11:08 AM, sami nathan wrote: > If i am doing anything wrong forgive me i am newbe > > > MY error is > Exception Type:         AttributeError > Exception Value: > > 'str' object has no attribute 'resolve' > > Exception Location: >        D:\Python25\lib\site-packages\django\c

Re: Attribute error

2011-04-30 Thread Yongning Liang
class wish(models.Model): wish=models.CharField(max_length=200) what's your django version On Sun, May 1, 2011 at 3:45 AM, Pulkit Mehrotra wrote: > AttributeError at /mysite/wishlist/ > > 'module' object has no attribute 'CharField' > > What does this error means ??? > > View for this

Re: Attribute error

2011-04-30 Thread Karen Tracey
On Sat, Apr 30, 2011 at 3:45 PM, Pulkit Mehrotra wrote: > 'module' object has no attribute 'CharField' > > What does this error means ??? > > View for this is: > from django.shortcuts import render_to_response > from django.http import HttpResponseRedirect,HttpResponse > from wishlist.models impor

Re: Attribute error

2011-04-30 Thread Pulkit Mehrotra
changed the name but nothing happened the django version is 1.3 -- 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 django-users+unsu

Re: Attribute error

2011-05-01 Thread DJ Ango
Capitalize class names. class Wish(models.Model): the_wish = models.CharField(max_length=100) On Apr 30, 4:26 pm, Pulkit Mehrotra wrote: > changed the name but nothing happened > the django version is 1.3 -- You received this message because you are subscribed to the Google Groups "Djang

Re: Attribute Error

2007-08-19 Thread [EMAIL PROTECTED]
whether anyone can help me out. > > I'm currently creating a form to register users, what I'm finding is > that when I then attempt to save the user within the Register:save > method I'm getting an attribute error when trying to access the title > attribute. I've t

Re: Attribute Error

2007-08-19 Thread MikeHowarth
I'll take a look at that. Even commenting that line out and attempting to access self.title I'm still getting an attribute error thrown: 'Register' object has no attribute 'title' On Aug 19, 10:22 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wr

Re: Attribute Error

2007-08-19 Thread Doug B
I think you've got some misconceptions about newforms. http://www.djangoproject.com/documentation/newforms/ should give you the info you need. Something more like this: def save(self): #set up the objects we are going to populate user = User() # you want a new -instance- not another referen

Re: Attribute Error

2007-08-19 Thread Malcolm Tredinnick
On Sun, 2007-08-19 at 14:30 -0700, MikeHowarth wrote: > I'll take a look at that. > > Even commenting that line out and attempting to access self.title I'm > still getting an attribute error thrown: 'Register' object has no > attribute 'title'

Re: Attribute Error

2007-08-20 Thread MikeHowarth
dinnick <[EMAIL PROTECTED]> wrote: > On Sun, 2007-08-19 at 14:30 -0700, MikeHowarth wrote: > > I'll take a look at that. > > > Even commenting that line out and attempting to access self.title I'm > > still getting an attribute error thrown: 'Register'

user.get_profile() attribute error

2008-01-12 Thread [EMAIL PROTECTED]
I'm trying to catch any exceptions from user.get_profile() during account creation in order to create the profile I create the user, authenticate them, log them in, and then try to get_profile. To start out, the user name is the email and I'm setting the password to a random string newUser = Use

'ManyToManyField' attribute error

2006-06-07 Thread Mikeal Rogers
Hiya, I'm using the django trunk and tried to generate the SQL for a model I just wrote and got the following traceback; execute_manager(settings) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/django/core/management.py", line 1255, in execute_m

cursor.fetchall() attribute error

2006-11-11 Thread Rob Slotboom
In a models.py I have created the folowing function. Top level, not in a class. def get_unvoted_polls_for_voter_ip(ip): from django.db import connection cursor = connection.cursor() sql = """SELECT polls_poll.* FROM polls_poll LEFT OUTER JOIN polls_vote ON polls_poll.id = polls_vot

cursor.fetchall() attribute error

2006-11-11 Thread Rob Slotboom
In a models.py I have created the folowing function. Top level, not in a class. def get_unvoted_polls_for_voter_ip(ip): from django.db import connection cursor = connection.cursor() sql = """SELECT polls_poll.* FROM polls_poll LEFT OUTER JOIN polls_vote ON polls_poll.id = polls_vot

Re: Attribute error

2018-05-30 Thread Mike Dewhirst
On 31/05/2018 11:45 AM, Caleb Bryson wrote: I am getting a attribute error when i try to run my server. does anyone know what i can change in this code to fix that? Try indenting the __str__ method so it is within the scope of the Post class from django.db import models class Post

Re: Attribute error

2018-05-30 Thread Caleb Bryson
it is still saying "AttributeError: model 'django.db.models' has no attribute 'Charfeild' On Wednesday, May 30, 2018 at 10:04:04 PM UTC-4, Mike Dewhirst wrote: > > On 31/05/2018 11:45 AM, Caleb Bryson wrote: > > I am getting a attribute error when i try to

Re: Attribute error

2018-05-30 Thread Spence Patrick
gt; >> On 31/05/2018 11:45 AM, Caleb Bryson wrote: >> > I am getting a attribute error when i try to run my server. does >> > anyone know what i can change in this code to fix that? >> >> Try indenting the __str__ method so it is within the scope of the Post

Re: Attribute error

2018-05-30 Thread Caleb Bryson
I think it was because i did not use camel casing so CharField instead of Charfield. I will continue the tutorial and see if that works On Wednesday, May 30, 2018 at 10:04:04 PM UTC-4, Mike Dewhirst wrote: > > On 31/05/2018 11:45 AM, Caleb Bryson wrote: > > I am getting a attribut

Re: Attribute error

2018-05-30 Thread 岳贝
The date = models.DataTimeField() should be date = models.DateTimeFild() ? https://docs.djangoproject.com/en/2.0/ref/models/fields/#datetimefield Caleb Bryson 于2018年5月31日周四 上午9:45写道: > I am getting a attribute error when i try to run my server. does anyone > know what i can change in thi

Re: attribute error

2018-08-28 Thread Andréas Kühne
e i am new to django am getting attribute error past from 2 > days i got stuck in this error only i have attached the file also plz do > help me to resolve this error > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group.

Re: Attribute error

2021-05-13 Thread Ryan Nowakowski
It's likely that your instance of OrderItem has a product field that's null. On May 12, 2021 3:50:42 AM CDT, Peter Kirieny wrote: >can somebody help with this please, am building an ecommerce web and >when i >want to view my cart i get this error >AttributeError: 'NoneType' object has no attribu

Re: Attribute error

2021-05-18 Thread Peter Kirieny
tanks for this, it was helpfull On Thu, 13 May 2021 at 15:31, Ryan Nowakowski wrote: > It's likely that your instance of OrderItem has a product field that's > null. > > On May 12, 2021 3:50:42 AM CDT, Peter Kirieny > wrote: > >can somebody help with this please, am building an ecommerce web a

Re: Attribute Error

2020-02-17 Thread Adam Mičuda
Hi, you have to return instance of `django.http.HttpResponse` class from you view `RegisterStudent` instead of string: *line 98* and *line 99*. see https://docs.djangoproject.com/en/3.0/ref/request-response/#django.http.HttpResponse Regards. Adam po 17. 2. 2020 v 13:49 odesílatel Ernest Thuku

Re: Attribute Error

2020-02-17 Thread Ayser shuhaib
Pleas provide the code for clickjacking.py On Mon, 17 Feb 2020 at 14:50, Ernest Thuku wrote: > Hello guys please help on the error. I have been stuck for days now. > I am Ernest from Kenya. > please look into these files below > > -- > You received this message because you are subscribed to the

Re: Attribute Error

2020-02-17 Thread maninder singh Kumar
Have you tried putting a print statement in views.py RegisterStudent to get to an output in the server. Perhaps the problem is in the template and the get isn't even coming to the view Sent from my iPad > On 17-Feb-2020, at 6:30 PM, Adam Mičuda wrote: > > Hi, > you have to return instance of `

SessionStore attribute error

2022-09-19 Thread shiva singh
hello everyone please help how can solve this problem? this is session code:- if user.password==password and user.role=="Company": com=Company.objects.get(user_id=user) request.session['id']=user.id request.session['role']=user.role

Confused by attribute error

2009-03-27 Thread Robocop
Hello again, So i'm working on some of my old code, and a previously (or so i remember) function no longer works. When calling it my django page posts the error: AttributeError at /audit_sheets/TEST/ 'list' object has no attribute 'user' Request Method: POST Request URL:http://suppo

Attribute Error on Dumpdata

2007-12-06 Thread ttk
Hello all, I'm getting an attribute error when I try running the dumpdata command on any of my apps. news = app name NewsEntry = model Output: = C:\someproject>manage.py dumpdata news Traceback (most recent call last): File "C:\someproject\manage.py", line 11, in

Re: user.get_profile() attribute error

2008-01-12 Thread Alex Koshelev
Do you create a profile model and set right value in settings.py file? http://www.djangoproject.com/documentation/authentication/#storing-additional-information-about-users And User.get_pofile() does not require logged in user. Note that profile instance per user you must create manually. On 13

Re: user.get_profile() attribute error

2008-01-12 Thread [EMAIL PROTECTED]
I had the settings.py configured with the wrong Model name. useraccount instead of userprofile. Whoops. Thanks! Though the documentation might be wrong, in that DoesNotExist doesn't seem to be a real exception. ObejctDoesNotExist, as defined in django/ core/exceptions.py, is the correct exceptio

Re: user.get_profile() attribute error

2008-01-12 Thread Alex Koshelev
get_profile() uses default profile model manager. So if you profile model is Profile - exception is Profile.DoesNotExist that is subclass of ObjectDoesNotExist On 13 янв, 02:45, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I had the settings.py configured with the wrong Model name. > useracco

Tutorial -- no attribute error

2006-01-29 Thread kbochert
I'm trying to run through the tutorial and when I get to the step: 'python manage.py sql polls' I get the error AttributeError: 'module' object has no attribute '_MODELS' (management.py line 65) I'm using SQLite. This question has been asked here before without reply. Am I out of luck? Thanks Ka

Re: 'ManyToManyField' attribute error

2006-06-07 Thread Malcolm Tredinnick
Hi Mikeal, On Wed, 2006-06-07 at 19:17 -0700, Mikeal Rogers wrote: > Hiya, > > I'm using the django trunk and tried to generate the SQL for a model > I just wrote and got the following traceback; > > execute_manager(settings) >File "/Library/Frameworks/Python.framework/Versions/2.4/l

Re: 'ManyToManyField' attribute error

2006-06-07 Thread Mikeal Rogers
Sure, Here you go, class BItem(models.Model): #Date stuff created_on = models.DateTimeField(auto_now_add=True) last_edited_on = models.DateTimeField(auto_now=True) #Last Edited By last_edited_by = models.ForeignKey(User) #B information name = models.CharField(

Re: 'ManyToManyField' attribute error

2006-06-07 Thread Malcolm Tredinnick
Hi Mikael, On Wed, 2006-06-07 at 19:41 -0700, Mikeal Rogers wrote: > Sure, Here you go, > > class BItem(models.Model): > > #Date stuff > created_on = models.DateTimeField(auto_now_add=True) > last_edited_on = models.DateTimeField(auto_now=True) > #Last Edited By > last_

Re: 'ManyToManyField' attribute error

2006-06-07 Thread Mikeal Rogers
Thanks, that clears things up. I thought that if I sent it as a string rather than the class I could wait to define it until later. -Mikeal On Jun 7, 2006, at 8:30 PM, Malcolm Tredinnick wrote: > > Hi Mikael, > > On Wed, 2006-06-07 at 19:41 -0700, Mikeal Rogers wrote: >> Sure, Here you go, >>

Re: cursor.fetchall() attribute error

2006-11-11 Thread James Bennett
On 11/11/06, Rob Slotboom <[EMAIL PROTECTED]> wrote: >return [Poll.__class__(*row) for row in cursor.fetchall()] This is the problematic line; to instantiate a Poll, you'll want to either call its constructor -- Poll() -- or use the 'create()' method of its default manager (probably 'Poll.obj

session id attribute error

2022-09-19 Thread shiva singh
hello everyone please help me how can solve this problem:-[image: image.jpeg] -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegr

Re: SessionStore attribute error

2022-09-19 Thread 'Kasper Laudrup' via Django users
On 20/09/2022 08.21, shiva singh wrote: hello everyone please help how can solve this problem? I suggest you ignore all the replies you've already gotten and then post the exact same question a third time. Kind regards, Kasper Laudrup -- You received this message because you are subscribed

Re: SessionStore attribute error

2022-09-20 Thread shiva singh
hello Dear Kasper Laudrup I am beginner sorry for this but my problem is not solve yet that's why I have sent my code for better solution of error I am not familiar about this file witch you are send me On Tuesday, September 20, 2022 at 12:22:12 PM UTC+5:30 Kasper Laudrup wrote: > On 20/0

Re: SessionStore attribute error

2022-09-21 Thread Basheer Olamilekan Balogun
I think this best way is to check which kind of id your are store, because the primary id by default is integer which is going to be added automatically, so in your code i can see that you specify company_id upon creation new company which i do not think you have such field in your JobDetail mod

Re: Confused by attribute error

2009-03-27 Thread Briel
Hi. It would be really helpful to be able to look at your function as well. My Guess is that the problem lies there, since this is happening when you call the function. Even if the problem is within django it would be a lot easier to find when looking through your function to see what it does. Als

Re: Confused by attribute error

2009-03-27 Thread Robocop
On Mar 27, 3:05 pm, Briel wrote: > Hi. > It would be really helpful to be able to look at your function as > well. My > Guess is that the problem lies there, since this is happening when you > call the function. Even if the problem is within django it would be a > lot > easier to find when look

Re: Confused by attribute error

2009-03-27 Thread Robocop
Also i don't comment until i put my code into production (bad habit, yes i know :x), so let me know if you need me to throw in some dirty comments to make it more readable. On Mar 27, 3:21 pm, Robocop wrote: > On Mar 27, 3:05 pm, Briel wrote: > > > Hi. > > It would be really helpful to be able

Re: Confused by attribute error

2009-03-30 Thread Robocop
Sorry for the delay, i've been sidetracked multiple times in the last few days. The code is post here: http://dpaste.com/21221/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: Confused by attribute error

2009-03-30 Thread Robocop
So the fun continues. I realized that i did not need to use the login_required decorator on this function since it's just tossed around in the backend, so i took that out thinking it would prevent decorators.py from being called. When i hit the function above now, it posts the same error with a

Re: Confused by attribute error

2009-03-30 Thread Karen Tracey
On Mon, Mar 30, 2009 at 2:23 PM, Robocop wrote: > > So the fun continues. I realized that i did not need to use the > login_required decorator on this function since it's just tossed > around in the backend, so i took that out thinking it would prevent > decorators.py from being called. Did yo

Re: Confused by attribute error

2009-03-30 Thread Robocop
Bingo! Looks like i was lazy with my code and threw decorators on ALL the functions, not just my views. There was a lingering decorator on the send_file function that i did not notice. Thanks for pointing out my sloppines;) You saved me a ton of time today, double thanks! On Mar 30, 12:02 pm,

Re: Attribute Error on Dumpdata

2007-12-06 Thread ttk
I think I found my problem... I failed to add "objects = models.Manager()" into my models which would explain why that attribute isn't found. I'll try this out but if anyone has additional suggestions, I'm all ears. cheers, -ttk --~--~-~--~~~---~--~~ You received

Re: Attribute Error on Dumpdata

2007-12-07 Thread Karen Tracey
On Dec 7, 2007 2:31 PM, Empty <[EMAIL PROTECTED]> wrote: > > > Seems dumpdata is coded to require a Manager named 'objects' for the > Models > > it dumps, even though (as described here: > > http://www.djangoproject.com/documentation/model-api/#manager-names), > Django > > does not require that a

Re: Attribute Error on Dumpdata

2007-12-07 Thread Karen Tracey
On Dec 6, 2007 8:01 PM, ttk <[EMAIL PROTECTED]> wrote: > > I think I found my problem... > > I failed to add "objects = models.Manager()" into my models which > would explain why that attribute isn't found. > > I'll try this out but if anyone has additional suggestions, I'm all > ears. Seems dum

Re: Attribute Error on Dumpdata

2007-12-07 Thread Empty
Added ticket http://code.djangoproject.com/ticket/6155 with patch. Still need to write tests. Michael On Dec 7, 2007 3:15 PM, Karen Tracey <[EMAIL PROTECTED]> wrote: > > On Dec 7, 2007 2:31 PM, Empty <[EMAIL PROTECTED]> wrote: > > > > > > > > > Seems dumpdata is coded to require a Manager named

Re: Attribute Error on Dumpdata

2007-12-07 Thread Empty
> Seems dumpdata is coded to require a Manager named 'objects' for the Models > it dumps, even though (as described here: > http://www.djangoproject.com/documentation/model-api/#manager-names), Django > does not require that a Manager named objects exists for all Models. > Whether this is just an

Re: Tutorial -- no attribute error

2006-01-29 Thread Adrian Holovaty
On 1/29/06, kbochert <[EMAIL PROTECTED]> wrote: > > Yeah -- just found it. Sticky key prevented saving of the polls.py > file > Why do these things always happen when I'm learning something new?? > > On to the next stupidity. No problem at all -- we should improve that error message. Adrian -

Re: Tutorial -- no attribute error

2006-01-29 Thread Adrian Holovaty
On 1/29/06, kbochert <[EMAIL PROTECTED]> wrote: > I'm trying to run through the tutorial and when I get to the step: > 'python manage.py sql polls' > I get the error > AttributeError: 'module' object has no attribute '_MODELS' > (management.py line 65) > I'm using SQLite. Hi Karl, Chances are yo

Re: Tutorial -- no attribute error

2006-01-29 Thread kbochert
Yeah -- just found it. Sticky key prevented saving of the polls.py file Why do these things always happen when I'm learning something new?? On to the next stupidity. Thanks

Re: session id attribute error

2022-09-19 Thread Muhammad Juwaini Abdul Rahman
That was user, so probably you need request.user.id, not session. On Mon, 19 Sept 2022 at 16:00, shiva singh wrote: > hello everyone please help me how can solve this problem:-[image: > image.jpeg] > > -- > You received this message because you are subscribed to the Google Groups > "Django users

Re: session id attribute error

2022-09-19 Thread Aashish Kumar
Do this request.session.get(‘id’) On Mon, 19 Sep 2022 at 1:30 PM, shiva singh wrote: > hello everyone please help me how can solve this problem:-[image: > image.jpeg] > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from

Re: session id attribute error

2022-09-19 Thread Mohammad Ehsan Ansari
Hi SessionStore is a model class? if yes you can use pk instant of id On Monday, 19 September 2022 at 22:48:02 UTC+5:30 aashishk...@gmail.com wrote: > Do this > > request.session.get(‘id’) > > On Mon, 19 Sep 2022 at 1:30 PM, shiva singh wrote: > >> hello everyone please help me how can solve

Attribute Error when doing a syncdb.

2008-10-24 Thread Jared
Hello, I'm doing a little blog app and I'm going to be using tagging in it. So I wen to the google code page and downloaded it, named it tagging (instead of tagging-0.2.1), and then ran the install. Once I did that I made sure both my blog app and the tagging was included in the installed apps. I

Django Attribute Error on Page Load

2006-02-22 Thread [EMAIL PROTECTED]
Hi, I'm new to django and it looks really cool. I've installed mod_python and am trying to get the tutorial to work. It seems to work for the most part but whenever I am trying to load a page I get the following error message, after I hit refresh the page loads properly, for a little while and

Filter "date" and FormFieldWrapper attribute error

2006-08-26 Thread Andres Luga
Hi, when displaying a form for a new object, I'm trying to set a default value for a date field using a filter in a template, like so: {{ form.somefield|date:"Y-m-d" }} This gives me an error: 'FormFieldWrapper' object has no attribute 'year'. What am I doing wrong (I'm using generic views)?

Attribute error at /admin/ by Django

2018-04-06 Thread Hamroz Jumaev
http://dpaste.com/2GDFCG8 -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-

Re: Attribute Error when doing a syncdb.

2008-10-25 Thread ஆமாச்சு
//I'm doing a little blog app and I'm going to be using tagging in it. So I wen to the google code page and downloaded it, named it tagging (instead of tagging-0.2.1), and then ran the install.// Does the unzipped folder had a directory 'tagging' inside with the app rests? Please include that to

Extending User model with Inheritance - Attribute Error

2011-07-10 Thread Brent
Hi all, I am attempting to follow this tutorial: http://scottbarnham.com/blog/2008/08/21/extending-the-django-user-model-with-inheritance/ But I am receiving this error: AttributeError at /login/ 'NoneType' object has no attribute 'DoesNotExist' Here is my stack trace: http://dpaste.com/565795/

Re: Django Attribute Error on Page Load

2006-02-23 Thread Kenneth Gonsalves
On Thursday 23 Feb 2006 10:15 am, [EMAIL PROTECTED] wrote: > I'm new to django and it looks really cool.  I've installed > mod_python and am trying to get the tutorial to work.  It seems > to work for the most part but whenever I am trying to load a page > I get the following error message, after

Re: Django Attribute Error on Page Load

2006-02-23 Thread [EMAIL PROTECTED]
Yeah, I am restarting on every change; but I am still having this problem. -Jeremy Kenneth Gonsalves wrote: > On Thursday 23 Feb 2006 10:15 am, [EMAIL PROTECTED] wrote: > > I'm new to django and it looks really cool.  I've installed > > mod_python and am trying to get the tutorial to work.  It s

Re: Filter "date" and FormFieldWrapper attribute error

2006-08-27 Thread Gary Wilson
Andres Luga wrote: > when displaying a form for a new object, I'm trying to set a default > value for a date field using a filter in a template, like so: > > > {{ form.somefield|date:"Y-m-d" }} > > This gives me an error: > 'FormFieldWrapper' object has no attribute 'year'. > What am I doing wron

Re: Attribute error at /admin/ by Django

2018-04-06 Thread Melvyn Sopacua
On vrijdag 6 april 2018 09:05:20 CEST Hamroz Jumaev wrote: > http://dpaste.com/2GDFCG8 No middleware. -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an e

Attribute Error: 'NoneType' object has no attribute 'get_field_sets'

2008-06-18 Thread Molly
I am creating an app to be run on the desktop, I am in the process of importing my models, and I got this error: AttributeError at /admin/base/incident/add/ 'NoneType' object has no attribute 'get_field_sets' Request Method:

Re: Extending User model with Inheritance - Attribute Error

2011-07-10 Thread Venkatraman S
On Sun, Jul 10, 2011 at 1:05 PM, Brent wrote: > Hi all, > > I am attempting to follow this tutorial: > > http://scottbarnham.com/blog/2008/08/21/extending-the-django-user-model-with-inheritance/ > > But I am receiving this error: > AttributeError at /login/ > 'NoneType' object has no attribute 'D

Re: Extending User model with Inheritance - Attribute Error

2011-07-10 Thread Jonas Geiregat
Op 10-jul-2011, om 12:37 heeft Venkatraman S het volgende geschreven: > > This is not good design. If you want to store some extra fields for a User - > i would define just another model called ProfileDetails, FK it to User and > use it as such. That's also how I would do it, some example cod

Re: Extending User model with Inheritance - Attribute Error

2011-07-11 Thread Brent
Thanks for the responses. How do I use a foreign key, though? In other words, how do I tell my code to look at UserProfile rather than just user? On Jul 10, 5:08 am, Jonas Geiregat wrote: > Op 10-jul-2011, om 12:37 heeft Venkatraman S het volgende geschreven: > > > > > This is not good design. I

Re: Extending User model with Inheritance - Attribute Error

2011-07-11 Thread Michał Sawicz
Dnia 2011-07-11, pon o godzinie 09:48 -0700, Brent pisze: > How do I use a foreign key, though? In other words, how do I tell my > code to look at UserProfile rather than just user? https://docs.djangoproject.com/en/1.3/topics/auth/#storing-additional-information-about-users -- Michał (Saviq) S

Re: Extending User model with Inheritance - Attribute Error

2011-07-11 Thread Andre Terra
Wherever you would reference a user instance, reference UserProfile.user instead If you need to find out a profile from request.user, you can use request.user.get_profile() or the longer UserProfile.objects.get(user_id= request.user.id) Cheers, André On Mon, Jul 11, 2011 at 1:48 PM, Brent wrot

Re: Extending User model with Inheritance - Attribute Error

2011-07-11 Thread Brent
I am having trouble with this line of the tutorial: "You need to register a handler for the signal django.db.models.signals.post_save on the User model, and, in the handler, if created=True, create the associated user profile." It seems I need to edit the User model. I am confused, though, because

Re: Extending User model with Inheritance - Attribute Error

2011-07-11 Thread Andre Terra
All you have to do is add the following code to your models.py (or any other module that gets loaded by django, for that matter): # models.py from django.db.models import signals def create_user_profile(sender, instance, created, **kwargs): if created: UserProfile.objects.create(user

Re: Extending User model with Inheritance - Attribute Error

2011-07-11 Thread Andre Terra
Pass user.get_profile() as a template variable instead by adding it to the template context. Cheers, André On Mon, Jul 11, 2011 at 2:50 PM, Brent wrote: > Okay, thanks. This is really helpful. > > I am having trouble calling get_profile() from within my profile.html > template, though. Here is

Re: Extending User model with Inheritance - Attribute Error

2011-07-11 Thread Brent
Okay, thanks. This is really helpful. I am having trouble calling get_profile() from within my profile.html template, though. Here is my stack trace: http://dpaste.com/566583/ I tried calling get_profile without the (), which got rid of the error, but no data showed up. On Jul 11, 10:15 am, And

Re: Extending User model with Inheritance - Attribute Error

2011-07-11 Thread Brent
Is this done in urls.py? On Jul 11, 10:55 am, Andre Terra wrote: > Pass user.get_profile() as a template variable instead by adding it to the > template context. > > Cheers, > André > > > > > > > > On Mon, Jul 11, 2011 at 2:50 PM, Brent wrote: > > Okay, thanks. This is really helpful. > > > I am

Re: Extending User model with Inheritance - Attribute Error

2011-07-11 Thread Andre Terra
This is done in your view: https://docs.djangoproject.com/en/dev/ref/templates/api/#subclassing-context-requestcontext Cheers On Mon, Jul 11, 2011 at 3:12 PM, Brent wrote: > Is this done in urls.py? > > On Jul 11, 10:55 am, Andre Terra wrote: > > Pass user.get_profile() as a template variabl

Re: Extending User model with Inheritance - Attribute Error

2011-07-11 Thread Brent
So I need to create a custom view? (I can't use an existing view)? I was hoping to avoid diving into templates until later, after I've become a little more familiar with the python/html code. On Jul 11, 11:48 am, Andre Terra wrote: > This is done in your view: > > https://docs.djangoproject.com/e

Re: Extending User model with Inheritance - Attribute Error

2011-07-11 Thread Brent
Sorry, I meant I was hoping to avoid diving into defining my own views until later. On Jul 11, 1:08 pm, Brent wrote: > So I need to create a custom view? (I can't use an existing view)? I > was hoping to avoid diving into templates until later, after I've > become a little more familiar with the

Re: Extending User model with Inheritance - Attribute Error

2011-07-11 Thread Andre Terra
You could use a context processor, which is basically a function that adds variables to *every* template that gets called from a properly setup view. I assume the view you are using does apply context processors, and defining one is as easy as: http://stackoverflow.com/questions/3722174/django-tem

Re: Extending User model with Inheritance - Attribute Error

2011-07-11 Thread Brent
Hmm...I see. How do you choose what variables are available to which view? It seems like anything I put in context_processors is available anywhere, and I'm not sure I want that. I think I am getting closer, but I am now getting a SiteProfileNotAvailable error. Here is my stack trace: http://dpa

Attribute error, with a very basic banking app

2016-08-25 Thread Neil Hunt
erver doesn't run. It says there's an attribute error. I've temporarily left the user name and password in at the moment. I had a look at their tutorial how to do a use the Django authentication system (thanks for telling me about that) and I'm going to change that after I u

Admin Site Fails to Load with Attribute Error

2007-01-06 Thread Ben Lamb
I'm running rev 4293 of Django, under Python 2.3.5 on both OpenBSD 3.7 and Linux 2.6.15 (Kubuntu). I have the same project deployed on both servers. When I try to access the admin site on the OpenBSD machine I get the error: AttributeError at /admin/ 'module' object has no attribute 'urlpatter

Attribute Error 'NoneType' object has no attribute '_prefetch_related_lookups'

2019-07-11 Thread Warwick Lewarne
Hi all, I keep getting the above error and I am not sure what I need to do to correct it. An example will assist. my model: class Product_Group(models.Model): customer_id = models.ForeignKey(Customer, on_delete=models.CASCADE) prod_group = models.CharField(max_length=30, unique = True,

Re: Attribute Error: 'NoneType' object has no attribute 'get_field_sets'

2008-06-18 Thread Florencio Cano
What do you mean with "importing your models"? Do you mean syncing them with the database? Have you tried $ python manage.py validate? 2008/6/18 Molly <[EMAIL PROTECTED]>: > > I am creating an app to be run on the desktop, > > I am in the process of importing my models, and I got this error: > >

Re: Attribute Error: 'NoneType' object has no attribute 'get_field_sets'

2008-06-18 Thread Molly
My bad, I mean I have to import all of the errors it gives me when I got to run the site.. What do you mean "Have you tried $ python manage.py validate?" I put that into the cmd if that's what you mean, and it gave me an error for the $ sign, it said "'$' is not recognized as an internal or ext

Re: Attribute Error: 'NoneType' object has no attribute 'get_field_sets'

2008-06-18 Thread Joseph
Molly, You are on windows. So $ is not applicable to you. Go to command prompt and type python manage.py validate Anyway, I have sent you a mail that points to one of Django documentation page. See if you have the admin class defined. If you are new to programming/python/django, I would recomme

Re: Attribute error, with a very basic banking app

2016-08-25 Thread ludovic coues
Could you share the full stack trace you get when trying to run the server ? The attribute error should come with a ton of information like the file and the line where the error occur. 2016-08-25 16:57 GMT+02:00 Neil Hunt : > I've beem working on a simple banking app based on the Django

  1   2   >