Browse Source

Changed url.

feature/python-error-tracking
Drew Larson 9 years ago
parent
commit
90f0b4eed2
  1. 6
      bikeshop_project/assets/js/components/SignIn.jsx
  2. 2
      bikeshop_project/bikeshop/urls.py

6
bikeshop_project/assets/js/components/SignIn.jsx

@ -24,7 +24,7 @@ export default class SignIn extends React.Component {
} }
componentDidMount () { componentDidMount () {
fetch('//bikeshop.local/member/signin/') fetch('/members/signin/')
.then((response) => { .then((response) => {
return response.json() return response.json()
}) })
@ -49,7 +49,7 @@ export default class SignIn extends React.Component {
handleUpdate (text, dataSource) { handleUpdate (text, dataSource) {
const self = this; const self = this;
self.setState({searchText: text}) self.setState({searchText: text})
fetch(`//bikeshop.local/member/search/${text}/`) fetch(`/members/search/${text}/`)
.then((response) => { .then((response) => {
if (response.status === 200) if (response.status === 200)
return response.json(); return response.json();
@ -74,7 +74,7 @@ export default class SignIn extends React.Component {
const member = this.state.signOn.member; const member = this.state.signOn.member;
if (!this.state.signedIn.find((signedInMember) => {return signedInMember.id === member.id})) { if (!this.state.signedIn.find((signedInMember) => {return signedInMember.id === member.id})) {
fetch('//bikeshop.local/member/signin/', { fetch('/members/signin/', {
method: 'post', method: 'post',
body: `id=${member.id}&purpose=${purpose}`, body: `id=${member.id}&purpose=${purpose}`,
headers: { headers: {

2
bikeshop_project/bikeshop/urls.py

@ -26,7 +26,7 @@ urlpatterns = [
url(r'^', include(core_urls)), url(r'^', include(core_urls)),
url(r'^login/', login, {'template_name': 'login.html'}, name='login'), url(r'^login/', login, {'template_name': 'login.html'}, name='login'),
url(r'^logout/', logout_then_login, name='logout'), url(r'^logout/', logout_then_login, name='logout'),
url(r'^member/', include(member_urls)), url(r'^members/', include(member_urls)),
url(r'^admin/', admin.site.urls), url(r'^admin/', admin.site.urls),
] ]

Loading…
Cancel
Save