spiningup / BigVASP

A collaborative Mozilla science project to build a materials science database for calculation results using simulation package VASP
4 stars 8 forks source link

Project Layout #8

Closed andres-root closed 10 years ago

andres-root commented 10 years ago

Changed the project layout to a more consistent structure. The database is still working with sqllite3 as it was required in other issues. Templates and Static Files are isolated in other folders. Added Requirements.txt file which contains the project dependencies that can be installed with the command pip -r requirements.txt.

Authentication system was created.

`

spiningup commented 10 years ago

Andres, thanks for the work. I just tried your code. When I run http://127.0.0.1:8000/, it automatically switch to http://127.0.0.1:8000/signin/ with admin and password filled in. After I click the Sign in button, the webpage stuck there and doesn't go anywhere. Can you explain how this authentication work ? Thanks, /Jun

andres-root commented 10 years ago

Hi. I think the problem is that i forgot to give you the username and pass. XD. When you log in the site automatically redirects you to the list page. Now I'm AFK but I'll give you the information tomorrow morning. On Oct 13, 2014 9:18 PM, "Jun Yan" notifications@github.com wrote:

Andres, thanks for the work. I just tried your code. When I run http://127.0.0.1:8000/, it automatically switch to http://127.0.0.1:8000/signin/ with admin and password filled in. After I click the Sign in button, the webpage stuck there and doesn't go anywhere. Can you explain how this authentication work ? Thanks, /Jun

— Reply to this email directly or view it on GitHub https://github.com/spiningup/BigVASP/pull/8#issuecomment-58988392.

spiningup commented 10 years ago

Is it possible to link to google accounts as authentication ?

andres-root commented 10 years ago

Yes. Totally, I can work in that feature this week if you want. But before anything, make sure you installed the dependencies, you can do this with the command below:

pip install -r requirements.txt

Once you do that, you can login with the next credentials:

user: admin@mail.co

password: django

I used that email for testing, you can always change it but since I'm using an email insted a user in the login process you'll need to change the email not only in the email field but in the username field as well.

if you see this message in the browser

A server error occurred. Please contact the administrator.

you just have to do a migration with this command:

./manage.py migrate

and that's it

please let me know any other problem

best,

Andres

On Oct 13, 2014 10:41 PM, "Jun Yan" notifications@github.com wrote:

Is it possible to link to google accounts as authentication ?

— Reply to this email directly or view it on GitHub https://github.com/spiningup/BigVASP/pull/8#issuecomment-58992792.

spiningup commented 10 years ago

I just followed your instructions: installed the requirements, run migrate; but there is still nothing shows up after I input user and password. The "sign in" button doesn't react to anything. Does this support chrome ? another question: how can user register first and then sign in ?? Thanks, /Jun

andres-root commented 10 years ago

Hi, I fixed the problem, now when you log in into the platform it takes you to the list page.

spiningup commented 10 years ago

Hi, the new login page looks much nicer, but I still can't log in .... I tried both Chrome and Safari, none of them can login. I read your code and see you redirect the page to login page if an user is not authenticated. Let's put this admin login aside and focus on more important things now:

1) we need a sign up page, otherwise nobody is authenticated. 2) we need to redirect the page to something else, its confusing to see the page doesn't change at all after click "signin". At least a warning shall show up saying login credentials are not correct or username not found, etc.

Will you be able to do that ? Thanks, Andres

acbalingit commented 10 years ago

Hello!

Is there any chance that the layout change be merged already? I think the commits are straying away from the request. After merging the pull request, @andres-root could send another pull request for the auth backend. We could also get a sense of how we should layout the files in the pull request when contributing. Also, we could split different features as separate issues (a pull request to create the auth backend, another for the front end, etc.), sort of feature request or TODO list.

Any thoughts? @andres-root @spiningup @BillMills

andres-root commented 10 years ago

I think the same @acbalingit. I just fixed a couple things that were not working as expected. @acbalingit Could you test the app in your host? it works in mine. Test credentials are: root@mail.co:django

acbalingit commented 10 years ago

Yup, works for me.

spiningup commented 10 years ago

I had to switch the entire thing to a new computer and it worked. I will just merge this branch for the moment. Andres, will you be able to add a sign-up layer ?

andres-root commented 10 years ago

yes, next task will be that then. For the moment you can register a user at /admin/ and push the sqlite database.

On Sun, Oct 26, 2014 at 5:56 PM, Jun Yan notifications@github.com wrote:

I had to switch the entire thing to a new computer and it worked. I will just merge this branch for the moment. Andres, will you be able to add a sign-up layer ?

— Reply to this email directly or view it on GitHub https://github.com/spiningup/BigVASP/pull/8#issuecomment-60536097.

spiningup commented 10 years ago

I see. I prefer not to push the sqlite database. It can be pretty big if one starts to upload stuff. I will close this thread. You can open another thread once you have worked out sign-up layer. Thanks,