Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no module named defaults using django 1.10 #56

Closed
bryankimani opened this issue Aug 7, 2016 · 2 comments
Closed

no module named defaults using django 1.10 #56

bryankimani opened this issue Aug 7, 2016 · 2 comments

Comments

@bryankimani
Copy link

I GOT THIS ERROR:

ImportError: No module named defaults.......friendships\urls.py in line 4

I changed the urls.py file with the code below:

`try:
from django.conf.urls import url, include
except ImportError:
from django.conf.urls import url, include
from friendship.views import view_friends, friendship_add_friend, friendship_accept,
friendship_reject, friendship_cancel, friendship_request_list,
friendship_request_list_rejected, friendship_requests_detail, followers,
following, follower_add, follower_remove, all_users

urlpatterns = [
url(
regex=r'^users/$',
view=all_users,
name='friendship_view_users',
),
url(
regex=r'^friends/(?P[\w-]+)/$',
view=view_friends,
name='friendship_view_friends',
),
url(
regex=r'^friend/add/(?P<to_username>[\w-]+)/$',
view=friendship_add_friend,
name='friendship_add_friend',
),
url(
regex=r'^friend/accept/(?P<friendship_request_id>\d+)/$',
view=friendship_accept,
name='friendship_accept',
),
url(
regex=r'^friend/reject/(?P<friendship_request_id>\d+)/$',
view=friendship_reject,
name='friendship_reject',
),
url(
regex=r'^friend/cancel/(?P<friendship_request_id>\d+)/$',
view=friendship_cancel,
name='friendship_cancel',
),
url(
regex=r'^friend/requests/$',
view=friendship_request_list,
name='friendship_request_list',
),
url(
regex=r'^friend/requests/rejected/$',
view=friendship_request_list_rejected,
name='friendship_requests_rejected',
),
url(
regex=r'^friend/request/(?P<friendship_request_id>\d+)/$',
view=friendship_requests_detail,
name='friendship_requests_detail',
),
url(
regex=r'^followers/(?P[\w-]+)/$',
view=followers,
name='friendship_followers',
),
url(
regex=r'^following/(?P[\w-]+)/$',
view=following,
name='friendship_following',
),
url(
regex=r'^follower/add/(?P<followee_username>[\w-]+)/$',
view=follower_add,
name='follower_add',
),
url(
regex=r'^follower/remove/(?P<followee_username>[\w-]+)/$',
view=follower_remove,
name='follower_remove',
),
]
`

@frankwiles
Copy link
Member

This is fixed in 1.5.0 that I just pushed up to PyPI. Thanks for reporting it!

@bryankimani
Copy link
Author

Welcome and thanks for the fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants