Hi All:

I need a reality check on a misunderstanding I'm having with the 
installation instructions 
<https://www.django-rest-framework.org/#installation> for  DRF.  I've used 
DRF successfully before (about a year ago) so I'm surprised I'm having this 
difficulty.

The instructions in the first "Installation" section 
<https://www.django-rest-framework.org/#installation> call for a 
modification to urlpatterns (whereby we append a new pattern for DRF).  I 
noticed, when testing, that *this results in an immediate exception:*

NameError: name 'url' is not defined

I was curious to see if others are running into this error?  And if so, 
perhaps a quick correction would be useful to new DRF users, because an 
immediate error from the "here's how to install this" page seems like it 
would cause a bad first impression.  

As a secondary issue, I was also quite puzzled by the syntax itself,  as it 
does not match the urlpatterns syntax in the "Example" section immediately 
following this first section.  I'm guessing  this is because I am a 
relative "newbie" to Django and DRF, but a bit of explanation would go a 
long way here, because it's quite unlike the patterns used by the rest of 
the example code.  *Perhaps a comment with a link to the convention or an 
example would be useful?*

I know DRF is a great product, because it has worked quite well for me 
before, so as a work-around, I bypassed those last steps in the first part 
of the installation instructions, and went on to the "Example" section 
<https://www.django-rest-framework.org/#example>.  I implemented those 
instructions, and things went much smoother.

One final (minor) issue: I noticed, when testing, that the instructions for 
modifying urls.py seem to imply a swap out of the entire urlpatterns section, 
but if you do that, *you lose the ability to get to the original Django 
admin page link *at: 127.0.0.1:8000/admin/  (in fact it will throw another 
exception).  So perhaps the code in this section should be modified to fix 
that problem.

All that aside, I love the product.  I've got a great DRF example going, 
and I can continue my work.  I just wanted you all to know about these 
potential problematic issues, and see if there's a.way to make the 
introductory experience even better.

-- 
You received this message because you are subscribed to the Google Groups 
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-rest-framework+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-rest-framework/6307fb92-3cce-4c5f-b630-6d076fb081dao%40googlegroups.com.

Reply via email to