Re: Django 1.5 tutorial error: 'module' has no attribute 'StackedInLine'

2018-01-22 Thread Richard Roberts
Awesome Spot Karen. 

On Wednesday, 27 March 2013 15:48:18 UTC, Karen Tracey wrote:
>
> On Wed, Mar 27, 2013 at 11:32 AM, +Emmanuel  > wrote:
>
>> Hello there,
>>
>> I am working through the django tutorial at djangoproject.com. So far 
>> everything works out fine until Section 2.4.6 (customizing the admin form). 
>> Django throws an error:  *'module' has no attribute 'StackedInLine'. *
>>
>
> Right, the L in StackedInLine should NOT be capitalized, it should be just 
> an initial capital letter on Inline: StackedInline 
>

-- 
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-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/78416382-36bb-4f4f-83ea-526c59b8137a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django 1.5 tutorial error: 'module' has no attribute 'StackedInLine'

2013-04-02 Thread +Emmanuel
Thanks for the useful replies!

On Wednesday, March 27, 2013 6:32:06 PM UTC+3, +Emmanuel wrote:
>
> Hello there,
>
> I am working through the django tutorial at djangoproject.com. So far 
> everything works out fine until Section 2.4.6 (customizing the admin form). 
> Django throws an error:  *'module' has no attribute 'StackedInLine'. *I 
> checked around and this seems to work:
> *if you use import to include a module, make sure you don’t have a file 
> named just the same as the module you are trying to include in current 
> directory. It seems python takes preference for local files over modules 
> thus import fails.*
> Problem is, how now do I call the Poll admin module if it's name has been 
> changed to say admin2.py since naming it admin.py conflicts with the main 
> django admin.
> I hope this makes sense!
> Thanks.
>

-- 
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-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Django 1.5 tutorial error: 'module' has no attribute 'StackedInLine'

2013-04-02 Thread +Emmanuel
Thanks Karen! That fixed the problem :-)

On Wednesday, March 27, 2013 6:48:18 PM UTC+3, Karen Tracey wrote:
>
> On Wed, Mar 27, 2013 at 11:32 AM, +Emmanuel  > wrote:
>
>> Hello there,
>>
>> I am working through the django tutorial at djangoproject.com. So far 
>> everything works out fine until Section 2.4.6 (customizing the admin form). 
>> Django throws an error:  *'module' has no attribute 'StackedInLine'. *
>>
>
> Right, the L in StackedInLine should NOT be capitalized, it should be just 
> an initial capital letter on Inline: StackedInline 
>  

-- 
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-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Django 1.5 tutorial error: 'module' has no attribute 'StackedInLine'

2013-03-27 Thread Karen Tracey
On Wed, Mar 27, 2013 at 11:32 AM, +Emmanuel  wrote:

> Hello there,
>
> I am working through the django tutorial at djangoproject.com. So far
> everything works out fine until Section 2.4.6 (customizing the admin form).
> Django throws an error:  *'module' has no attribute 'StackedInLine'. *
>

Right, the L in StackedInLine should NOT be capitalized, it should be just
an initial capital letter on Inline: StackedInline

-- 
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-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Django 1.5 tutorial error: 'module' has no attribute 'StackedInLine'

2013-03-27 Thread Tom Evans
On Wed, Mar 27, 2013 at 3:32 PM, +Emmanuel  wrote:
> Hello there,
>
> I am working through the django tutorial at djangoproject.com. So far
> everything works out fine until Section 2.4.6 (customizing the admin form).
> Django throws an error:  'module' has no attribute 'StackedInLine'. I
> checked around and this seems to work:
> if you use import to include a module, make sure you don’t have a file named
> just the same as the module you are trying to include in current directory.
> It seems python takes preference for local files over modules thus import
> fails.

Mmmm, yes, but this is not what is happening. If you have this structure:

polls
├── __init__.py
├── admin.py
├── models.py
└── views.py

and in the admin.py write "from django.contrib import admin", it will
not get confused about the "admin.py" in the same directory. If you
had a file called "django.py", then that would confuse the importing.

> Problem is, how now do I call the Poll admin module if it's name has been
> changed to say admin2.py since naming it admin.py conflicts with the main
> django admin.

The admin file in your poll app must be called admin.py, else it will
not be discovered.

The easiest way to work out why you are getting this error, would be
to give us the complete error message - there should be multiple lines
-  and the contents of your admin.py.

Cheers

Tom

-- 
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-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.