Giter VIP home page Giter VIP logo

erplite's People

Contributors

cagegong2 avatar kaiqigong avatar lacusrinz avatar princescar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

erplite's Issues

Auth

We can use the current auth system in django. However, two problems need to be solved.

  1. Enable cookieless authentication. This will be useful because sometimes for security policy, some clients' cookies are disabled.
    http://stackoverflow.com/questions/20706480/django-session-authentication-and-disabled-cookies
    http://www.stereoplex.com/blog/cookieless-django-sessions-and-authentication-with
    We'd better do this in a switchable way. Say, if the client is cookie enabled, it can be verified via cookie, if not, verified by http header, or sth else.
  2. Login via api.
    E.g: post /login
    {username:"xxxx", password:"xxxxx"}

return:
success:302 or 200
{
token:"xxxxx"
username:"xxxxxx"
screenname:"xxxx"
...
}
fail:403,401
{
reason:"xxxx"
}

API list

We need an api mapping, so that I can post data upon.
Currently, I hard coded in js.

this.postUrl = erpSettings.apiHost+'/contactdata/';

create: function(success,fail) {
            $http.post(this.postUrl, this).success(success).error(fail);
        },

What I need should be like this:
get /apilist/

result:

[{name:"Contact",postUrl:"http://localhost:8000/contacts/"},
{name:"ContactData",postUrl:"http://localhost:8000/contactdata/"},
{name:"ContactLink",postUrl:"http://localhost:8000/contactlink/"},
{name:"ContactTag",postUrl:"http://localhost:8000/contacttag/"}
]

api: contacts/id data

data有点奇怪。。
我的想法是把data 转换为object。不知道后台能不能实现。
不行的话我就在前端实现吧。

{
"name": "\u51ef\u5947",
"avator": "./img/128px/bag_128px.png",
"tags": [
"user"
],
"data": [
"ContactData object",
"ContactData object",
"ContactData object",
"ContactData object",
"ContactData object",
"ContactData object"
],
"links": [],
"description": "\u8bf7\u95ee\u513f\u7ae5",
"createdDate": "2014-03-25",
"createdBy": "cage",
"modifiedDate": "2014-03-25",
"modifiedBy": "cage"
}

api: contacts

We do not need data, links, we only need tags in array. When step into detail, contacts/id, we want those datas.

Local storage

Import cache/localstorage system to app
cache the unsaved changes, token, entities.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.