Re: Extremely Frustrated

2011-04-28 Thread Brian Bouterse
Also while in vim, you can show all symbols in the file directly as symbols.
 This makes tabs versus spaces trivial to identify.  To enter this mode use
the following command in vim.

:set list

and to exit this mode use

:set nolist

See the documentation
here
.

Brian


On Thu, Apr 28, 2011 at 4:50 AM, Tom Evans  wrote:

> On Thu, Apr 28, 2011 at 8:47 AM, Kenneth Gonsalves
>  wrote:
> > On Thu, 2011-04-28 at 00:27 -0700, Derek wrote:
> >> A good IDE will convert tabs to spaces for you save you hours of
> >> frustration!
> >
> > tab-nanny is also your friend
>
> Or in vim:
> :set expandtab shiftwidth=4 tabstop=4 | retab
>
> Short form:
> :se et sw=4 ts=4 | ret
>
> --
> 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+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Brian Bouterse
ITng Services

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



Re: Extremely Frustrated

2011-04-28 Thread Tom Evans
On Thu, Apr 28, 2011 at 8:47 AM, Kenneth Gonsalves
 wrote:
> On Thu, 2011-04-28 at 00:27 -0700, Derek wrote:
>> A good IDE will convert tabs to spaces for you save you hours of
>> frustration!
>
> tab-nanny is also your friend

Or in vim:
:set expandtab shiftwidth=4 tabstop=4 | retab

Short form:
:se et sw=4 ts=4 | ret

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



Re: Extremely Frustrated

2011-04-28 Thread Kenneth Gonsalves
On Thu, 2011-04-28 at 00:27 -0700, Derek wrote:
> A good IDE will convert tabs to spaces for you save you hours of
> frustration! 

tab-nanny is also your friend
-- 
regards
KG
http://lawgon.livejournal.com
Coimbatore LUG rox
http://ilugcbe.techstud.org/

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



Re: Extremely Frustrated

2011-04-28 Thread Derek
On Apr 25, 3:53 pm, Gandeida  wrote:
> Hello,
>
> I am running version 1.3.
>
> After copying and pasting about 20 more times, but getting the error
> sporadically, I have found that the issue was the tab characters that
> were being automatically generated to keep my indentation level.  I've
> changed it to use spaces instead.  Thank you for offering to help,
> though!  I just figured it out by accident :-)
>
> Regards,
> Gandeida

A good IDE will convert tabs to spaces for you save you hours of
frustration!

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



Re: Extremely Frustrated

2011-04-25 Thread Gandeida
Hi Ogi,

It turned out that I had some tab characters in my code that I
inadvertently added when I copied and pasted.  I've changed my editor
settings to use spaces instead of tabs, and all is working now.  Thank
you for offering to help!

Regards,
Gandeida

On Apr 22, 6:04 am, Ogi Vranesic  wrote:
> Could You also send us the definition of Book class?
> Ogi
>
> On Donnerstag 21 April 2011 10:00:17 pm you wrote:
>
>
>
> > Hello,
>
> > I have been working through the Django Book, and I keep getting syntax
> > errors in the examples in Chapter 6.
>
> > The following example works:
>
> > class BookAdmin(admin.ModelAdmin):
> >     list_display = ('title', 'publisher', 'publication_date')
> >     list_filter = ('publication_date',)
> >     date_hierarchy = 'publication_date'
> >     ordering = ('-publication_date',)
> >     fields = ('title', 'authors', 'publisher', 'publication_date')
>
> > The next one, however, does not - it throws a syntax error:
>
> > class BookAdmin(admin.ModelAdmin):
> >     list_display = ('title', 'publisher', 'publication_date')
> >     list_filter = ('publication_date',)
> >     date_hierarchy = 'publication_date'
> >     ordering = ('-publication_date',)
> >     fields = ('title', 'authors', 'publisher')
>
> > Nor can I add fields back in to this example or I get a syntax error:
>
> > class BookAdmin(admin.ModelAdmin):
> >     list_display = ('title', 'publisher', 'publication_date')
> >     list_filter = ('publication_date',)
> >     date_hierarchy = 'publication_date'
> >     ordering = ('-publication_date',)
> >     filter_horizontal = ('authors',)
> >     (would like to still define fields, but throws a syntax error)
>
> > Same with this one:
>
> > class BookAdmin(admin.ModelAdmin):
> >     list_display = ('title', 'publisher', 'publication_date')
> >     list_filter = ('publication_date',)
> >     date_hierarchy = 'publication_date'
> >     ordering = ('-publication_date',)
> >     filter_horizontal = ('authors',)
> >     raw_id_fields = ('publisher',)
> >     (would like to still define fields, but throws a syntax error)
>
> > Could someone please show me how to include "fields = ('title',
> > 'authors', 'publisher')" without getting an error?
>
> > Thanks,
> >Gandeida- Hide quoted text -
>
> - Show quoted text -

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



Re: Extremely Frustrated

2011-04-25 Thread Gandeida
Hello,

I am running version 1.3.

After copying and pasting about 20 more times, but getting the error
sporadically, I have found that the issue was the tab characters that
were being automatically generated to keep my indentation level.  I've
changed it to use spaces instead.  Thank you for offering to help,
though!  I just figured it out by accident :-)

Regards,
Gandeida

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



Re: Extremely Frustrated

2011-04-22 Thread Ogi Vranesic
Could You also send us the definition of Book class?
Ogi


On Donnerstag 21 April 2011 10:00:17 pm you wrote:
> Hello,
> 
> I have been working through the Django Book, and I keep getting syntax
> errors in the examples in Chapter 6.
> 
> The following example works:
> 
> class BookAdmin(admin.ModelAdmin):
> list_display = ('title', 'publisher', 'publication_date')
> list_filter = ('publication_date',)
> date_hierarchy = 'publication_date'
> ordering = ('-publication_date',)
> fields = ('title', 'authors', 'publisher', 'publication_date')
> 
> The next one, however, does not - it throws a syntax error:
> 
> class BookAdmin(admin.ModelAdmin):
> list_display = ('title', 'publisher', 'publication_date')
> list_filter = ('publication_date',)
> date_hierarchy = 'publication_date'
> ordering = ('-publication_date',)
> fields = ('title', 'authors', 'publisher')
> 
> Nor can I add fields back in to this example or I get a syntax error:
> 
> class BookAdmin(admin.ModelAdmin):
> list_display = ('title', 'publisher', 'publication_date')
> list_filter = ('publication_date',)
> date_hierarchy = 'publication_date'
> ordering = ('-publication_date',)
> filter_horizontal = ('authors',)
> (would like to still define fields, but throws a syntax error)
> 
> Same with this one:
> 
> class BookAdmin(admin.ModelAdmin):
> list_display = ('title', 'publisher', 'publication_date')
> list_filter = ('publication_date',)
> date_hierarchy = 'publication_date'
> ordering = ('-publication_date',)
> filter_horizontal = ('authors',)
> raw_id_fields = ('publisher',)
> (would like to still define fields, but throws a syntax error)
> 
> 
> Could someone please show me how to include "fields = ('title',
> 'authors', 'publisher')" without getting an error?
> 
> Thanks,
> Gandeida
> 

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



Re: Extremely Frustrated

2011-04-21 Thread Kenny Meyer
Can you give us the following information:
 - Django version installed on your system
 - Full tracebacks, not just what type of Exception has been thrown.

Please?

Kenny



On Thu, Apr 21, 2011 at 4:00 PM, Gandeida  wrote:
> Hello,
>
> I have been working through the Django Book, and I keep getting syntax
> errors in the examples in Chapter 6.
>
> The following example works:
>
> class BookAdmin(admin.ModelAdmin):
>    list_display = ('title', 'publisher', 'publication_date')
>    list_filter = ('publication_date',)
>    date_hierarchy = 'publication_date'
>    ordering = ('-publication_date',)
>    fields = ('title', 'authors', 'publisher', 'publication_date')
>
> The next one, however, does not - it throws a syntax error:
>
> class BookAdmin(admin.ModelAdmin):
>    list_display = ('title', 'publisher', 'publication_date')
>    list_filter = ('publication_date',)
>    date_hierarchy = 'publication_date'
>    ordering = ('-publication_date',)
>    fields = ('title', 'authors', 'publisher')
>
> Nor can I add fields back in to this example or I get a syntax error:
>
> class BookAdmin(admin.ModelAdmin):
>    list_display = ('title', 'publisher', 'publication_date')
>    list_filter = ('publication_date',)
>    date_hierarchy = 'publication_date'
>    ordering = ('-publication_date',)
>    filter_horizontal = ('authors',)
>    (would like to still define fields, but throws a syntax error)
>
> Same with this one:
>
> class BookAdmin(admin.ModelAdmin):
>    list_display = ('title', 'publisher', 'publication_date')
>    list_filter = ('publication_date',)
>    date_hierarchy = 'publication_date'
>    ordering = ('-publication_date',)
>    filter_horizontal = ('authors',)
>    raw_id_fields = ('publisher',)
>    (would like to still define fields, but throws a syntax error)
>
>
> Could someone please show me how to include "fields = ('title',
> 'authors', 'publisher')" without getting an error?
>
> Thanks,
> Gandeida
>
> --
> 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+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>

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



Extremely Frustrated

2011-04-21 Thread Gandeida
Hello,

I have been working through the Django Book, and I keep getting syntax
errors in the examples in Chapter 6.

The following example works:

class BookAdmin(admin.ModelAdmin):
list_display = ('title', 'publisher', 'publication_date')
list_filter = ('publication_date',)
date_hierarchy = 'publication_date'
ordering = ('-publication_date',)
fields = ('title', 'authors', 'publisher', 'publication_date')

The next one, however, does not - it throws a syntax error:

class BookAdmin(admin.ModelAdmin):
list_display = ('title', 'publisher', 'publication_date')
list_filter = ('publication_date',)
date_hierarchy = 'publication_date'
ordering = ('-publication_date',)
fields = ('title', 'authors', 'publisher')

Nor can I add fields back in to this example or I get a syntax error:

class BookAdmin(admin.ModelAdmin):
list_display = ('title', 'publisher', 'publication_date')
list_filter = ('publication_date',)
date_hierarchy = 'publication_date'
ordering = ('-publication_date',)
filter_horizontal = ('authors',)
(would like to still define fields, but throws a syntax error)

Same with this one:

class BookAdmin(admin.ModelAdmin):
list_display = ('title', 'publisher', 'publication_date')
list_filter = ('publication_date',)
date_hierarchy = 'publication_date'
ordering = ('-publication_date',)
filter_horizontal = ('authors',)
raw_id_fields = ('publisher',)
(would like to still define fields, but throws a syntax error)


Could someone please show me how to include "fields = ('title',
'authors', 'publisher')" without getting an error?

Thanks,
Gandeida

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