Or you can write your urls like this:
(r'^login/?$', 'mySite.myUser.views.login')
The question sign after the trailing slash makes it optional in regexp. Use it if for some reasons you don’t want to use APPEND_SLASH setting.
More Related Contents:
- Django URLs TypeError: view must be a callable or a list/tuple in the case of include()
- Django optional url parameters
- Difference between static STATIC_URL and STATIC_ROOT on Django
- Django multi tenancy
- Is it better to use path() or url() in urls.py for django 2.0?
- Django URL Redirect
- ImproperlyConfiguredError about app_name when using namespace in include()
- Django 404 error-page not found
- How to solve “Page not found (404)” error in Django?
- Django CSRF check failing with an Ajax POST request
- Having Django serve downloadable files
- How can I enable CORS on Django REST Framework
- Django upgrading to 1.9 error “AppRegistryNotReady: Apps aren’t loaded yet.”
- Iterating through two lists in Django templates
- Split views.py in several files
- How to execute a GROUP BY … COUNT or SUM in Django ORM?
- How do I add a placeholder on a CharField in Django?
- How do I extend the Django Group model?
- When to use Serializer’s create() and ModelViewset’s perform_create()
- What is choice_set in this Django app tutorial?
- Django REST Framework serializer field required=false
- Why doesn’t django’s model.save() call full_clean()?
- How do I prevent fixtures from conflicting with django post_save signal code?
- What’s the best solution for OpenID with Django? [closed]
- How can I get the current language in Django?
- QuerySet, Object has no attribute id – Django
- How to update manytomany field in Django?
- Django ‘AnonymousUser’ object has no attribute ‘_meta’
- Install mysqlclient for Django Python on Mac OS X Sierra
- How to get more diagnostic output on a “no module named xyz” error?