Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Django Channels + React along with API translation (#46)
* Django Channels + React along with API translation * Allow modifying demos * Bug fix: Modify demos * Bug fix: Save number of components in a demo * Render demo component * Allow communication between demo and lib * Removed unnecessary logging * Removed unnecassary print statements * Support to add root user * Removed unwanted files * Tests for demo and components * Tests for permalink * Fix PEP8 errors * Formatted using prettier * Add socialapp with rootsettings * Remoeved print statements * Modified update instructions * Configured travis * Fixed import for python 3 * Fixed python3 errors * Linked to docs * Update README.md * Modified gitignore * Modified Readme * Added csrf token * Modified travis * Replace camelCase with underscores * Replace Json/HttpResponse with DRF Response and status code * Modified readme * camelCase socket events * Don't delete modify user on login * Uses permalink serializer * Use component serializers * Always modify rootsettings * Drop field 'id' from components * Send Json not found instead of empty dict * Import only required classes * Added new line
- Loading branch information
Showing
71 changed files
with
1,357 additions
and
683 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
sudo: required | ||
language: python | ||
|
||
python: | ||
- "2.7" | ||
- "3.4" | ||
|
||
before_cache: | ||
- rm -f $HOME/.cache/pip/log/debug.log | ||
|
||
|
||
before_install: | ||
- pip install -U pip | ||
- nvm install 6.0.0 | ||
- nvm use 6.0.0 | ||
- npm install -g yarn@0.23.4 | ||
|
||
install: | ||
- pip install -r requirements.txt | ||
- yarn install | ||
|
||
script: | ||
- python manage.py makemigrations | ||
- python manage.py migrate | ||
- python manage.py test | ||
|
||
cache: | ||
directories: | ||
- node_modules | ||
- $HOME/.cache/pip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,23 @@ | ||
import request from "superagent"; | ||
const appConfig = require("../../../outCalls/config"); | ||
import { baseURL } from "./baseURL"; | ||
import Cookies from "universal-cookie"; | ||
|
||
export function deleteComponentDeployed(userid, repoId, type) { | ||
let URL = `${baseURL}/api/${type}model/${userid}/${repoId}`; | ||
const cookies = new Cookies(); | ||
|
||
export function deleteComponentDeployed(user_id, repoId, type) { | ||
let URL = `${baseURL}/api/${type}component/${user_id}/${repoId}`; | ||
return new Promise((resolve, reject) => { | ||
request.delete(URL).set("Accept", "application/json").end((err, res) => { | ||
if (err) { | ||
reject(err); | ||
} else { | ||
resolve(res.text); | ||
} | ||
}); | ||
request | ||
.delete(URL) | ||
.set("Accept", "application/json") | ||
.set("X-CSRFToken", cookies.get("csrftoken")) | ||
.end((err, res) => { | ||
if (err) { | ||
reject(err); | ||
} else { | ||
resolve(res.text); | ||
} | ||
}); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.