Re: [Server-devel] [XSCE] Some queries regarding PATHAGAR workflows

2013-09-06 Thread Sameer Verma
On Fri, Sep 6, 2013 at 12:36 AM, Ajay Garg  wrote:

> Hi all.
>
> I have been playing with the public book-server
> http://108.171.173.65/latest/ that Sameer let me know some time back
> (thanks a lot Sameer, again !!)
>
>
That's a public facing install, so I cannot pass out the login/password
info on that one.


However, I have some queries regarding some workflows (and I found it best
> to query all you guys, so that the maximum information could be shared) :)
> ::
>
>
>
> 1)
> On the "home page" http://108.171.173.65/latest/, I only see a "Log in"
> option.
> However, how do users get registered/created at first place?
>
>
During installation, when you run the "python manage.py syncdb" it will ask
for an admin account. This account will give you a full admin backend on
Pathagar. From that backend, you can set up users with limited role, or
with superuser privileges.


> 2)
> What is the notion of a "user" in the book-server?
> In other words, what can a user do "after" logging in, which cannot be
> done "without" logging in?
>
>
>
A user is more like a curator, or a maintainer who can tag, untag, clean up
descriptions, etc.


>  Looking forward to some pointers :)
>
>
If you are using the VM (See http://www.olpcsf.org/pathagar) you can log
into the interface using login bsadmin and password bs::admin (#9 on that
page).

cheers,
Sameer

-- 
Sameer Verma, Ph.D.
Professor, Information Systems
San Francisco State University
http://verma.sfsu.edu/
http://commons.sfsu.edu/
http://olpcsf.org/
http://olpcjamaica.org.jm/


>
>
>
> Thanks and Regards,
>
> Ajay Garg
> Dextrose Developer
> Activity Central: http://activitycentral.com
>


___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


Re: [Server-devel] [XSCE] Some queries regarding PATHAGAR workflows

2013-09-06 Thread Miguel González
On Fri, Sep 6, 2013 at 3:51 PM, George Hunt  wrote:

> Hi Ajay,
>
> As you start playing with pathagar on XSCE, could you look at what will be
> involved to get it to work properly when the package is not located at the
> root of the server, ie. when WSGIalias is set to /books/ or /pathatar/?
>
> Seth looked at the access log,(copied below) and concluded that there
> would be some programatic changes required.
>
> Following is part of our conversation:
>
>
> Seth wrote:
> Django is definitely messing up.  books/book/add is the url you want,
> right?  You are prefixing a url with /books/$pathagar.
>
> If you can put pathagar at the root of your domain, it should just work.
>  If hosting pathagar with a prefix is necessary there are two things we can
> do:
>
> (On the XSCE server, I think we need a prefix -gh)
>
> 1. Look up the right Django way to make this abstract.  I am pretty sure a
> preferred way exists, but it will take me some time to seek the solution
> out and implement it.
>
>
One way to configure Django to run a web application in a subpath is to use
`FORCE_SCRIPT_NAME` setting [1] with the base URL. In this case:

```
FORCE_SCRIPT_NAME = '/books'
```
Hope it helps.

[1] https://docs.djangoproject.com/en/1.4/ref/settings/#force-script-name



> 2. Modify all of the url routes in urls.py
>
> >  (r'^tags/(?P.+)/$', 'pathagar.books.views.by_tag',
>
> would become
>
> >  (r'^books/tags/(?P.+)/$', 'pathagar.books.views.by_tag',
>
> This is probably your best bet given your time constraints.
>
> --Seth
>
>
> On Sun, Aug 25, 2013 at 6:58 PM, George Hunt 
>  wrote:
>
>>
>> After logging in as an administrative user to pathagar,  the following
>> log snippet shows an effort to select a book to upload in the
>> pathagar-error.log file:
>>
>> 172.18.100.204 - - [22/Aug/2013:14:13:49 +] "GET /favicon.ico
>> HTTP/1.1" 404 342 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2)
>> AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36"
>> 172.18.100.204 - - [22/Aug/2013:09:13:54 -0500] "GET /books/latest
>> HTTP/1.1" 301 - "http://172.18.96.1/portal/"; "Mozilla/5.0 (Macintosh;
>> Intel Mac OS X 10_8_2) AppleWebKit/537.36 (KHTML, like Gecko)
>> Chrome/28.0.1500.95 Safari/537.36"
>> 172.18.100.204 - - [22/Aug/2013:09:13:59 -0500] "GET /books/latest/
>> HTTP/1.1" 200 3782 "http://172.18.96.1/portal/"; "Mozilla/5.0 (Macintosh;
>> Intel Mac OS X 10_8_2) AppleWebKit/537.36 (KHTML, like Gecko)
>> Chrome/28.0.1500.95 Safari/537.36"
>> 172.18.100.204 - - [22/Aug/2013:09:13:59 -0500] "GET /favicon.ico
>> HTTP/1.1" 404 342 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2)
>> AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36"
>> 172.18.100.204 - - [22/Aug/2013:09:14:08 -0500] "GET /books/book/add 
>> HTTP/1.1"
>> 200 6405 "http://172.18.96.1/books/latest/"; "Mozilla/5.0 (Macintosh;
>> Intel Mac OS X 10_8_2) AppleWebKit/537.36 (KHTML, like Gecko)
>> Chrome/28.0.1500.95 Safari/537.36"
>> 172.18.100.204 - - [22/Aug/2013:09:14:14 -0500] "GET
>> /media/js/admin/RelatedObjectLookups.js HTTP/1.1" 404 369 "
>> http://172.18.96.1/books/book/add"; "Mozilla/5.0 (Macintosh; Intel Mac OS
>> X 10_8_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95
>> Safari/537.36"
>> 172.18.100.204 - - [22/Aug/2013:09:14:14 -0500] "GET /favicon.ico
>> HTTP/1.1" 404 342 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2)
>> AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36"
>>
>> > the bottom right of the screen was activated>
>>
>> 172.18.100.204 - - [22/Aug/2013:14:14:26 +] "POST /book/add HTTP/1.1"
>> 404 339 "http://172.18.96.1/books/book/add"; "Mozilla/5.0 (Macintosh;
>> Intel Mac OS X 10_8_2) AppleWebKit/537.36 (KHTML, like Gecko)
>> Chrome/28.0.1500.95 Safari/537.36"
>> 172.18.100.204 - - [22/Aug/2013:14:14:26 +] "GET /favicon.ico
>> HTTP/1.1" 404 342 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2)
>> AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36"
>>
>>
>> (color added to highlight the url which seems questionable-- second was
>> different from the first)
>> I believe that that the correct url to post the data would be
>> "/books/book/add"
>>
>> This is because the httpd WSGIAlias in /etc/httpd/conf.d/pathagar.conf
>> points to the pathagar.wsgi file, which I think also should be used as a
>> prefix to the package.  Or--maybe I should be setting the prefix, and I'm
>> not doing it>
>>
>> As an additional observation, navigating to /books/ redirects to
>> "/latest/" rather than "/books/latest", and returns a 404 Not found error.
>> This may, or may not be related.
>>
>>
> Ajay, are you testing on a physical XO, or are you using a virtual machine?
>
> I'm glad to have your help resolving the remaining issues with pathagar on
> XSCE.
>
> George
>
> On Fri, Sep 6, 2013 at 9:33 AM, Ajay Garg wrote:
>
>> Thanks Aneesh for the pointers; I will keep them in mind when I start
>> playing with PATHAGAR in XSCE :)
>> Thanks again.
>>
>>

Re: [Server-devel] [XSCE] Some queries regarding PATHAGAR workflows

2013-09-06 Thread George Hunt
Hi Ajay,

As you start playing with pathagar on XSCE, could you look at what will be
involved to get it to work properly when the package is not located at the
root of the server, ie. when WSGIalias is set to /books/ or /pathatar/?

Seth looked at the access log,(copied below) and concluded that there would
be some programatic changes required.

Following is part of our conversation:


Seth wrote:
Django is definitely messing up.  books/book/add is the url you want,
right?  You are prefixing a url with /books/$pathagar.

If you can put pathagar at the root of your domain, it should just work.
 If hosting pathagar with a prefix is necessary there are two things we can
do:

(On the XSCE server, I think we need a prefix -gh)

1. Look up the right Django way to make this abstract.  I am pretty sure a
preferred way exists, but it will take me some time to seek the solution
out and implement it.

2. Modify all of the url routes in urls.py

>  (r'^tags/(?P.+)/$', 'pathagar.books.views.by_tag',

would become

>  (r'^books/tags/(?P.+)/$', 'pathagar.books.views.by_tag',

This is probably your best bet given your time constraints.

--Seth


On Sun, Aug 25, 2013 at 6:58 PM, George Hunt  wrote:

>
> After logging in as an administrative user to pathagar,  the following log
> snippet shows an effort to select a book to upload in the
> pathagar-error.log file:
>
> 172.18.100.204 - - [22/Aug/2013:14:13:49 +] "GET /favicon.ico
> HTTP/1.1" 404 342 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2)
> AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36"
> 172.18.100.204 - - [22/Aug/2013:09:13:54 -0500] "GET /books/latest
> HTTP/1.1" 301 - "http://172.18.96.1/portal/"; "Mozilla/5.0 (Macintosh;
> Intel Mac OS X 10_8_2) AppleWebKit/537.36 (KHTML, like Gecko)
> Chrome/28.0.1500.95 Safari/537.36"
> 172.18.100.204 - - [22/Aug/2013:09:13:59 -0500] "GET /books/latest/
> HTTP/1.1" 200 3782 "http://172.18.96.1/portal/"; "Mozilla/5.0 (Macintosh;
> Intel Mac OS X 10_8_2) AppleWebKit/537.36 (KHTML, like Gecko)
> Chrome/28.0.1500.95 Safari/537.36"
> 172.18.100.204 - - [22/Aug/2013:09:13:59 -0500] "GET /favicon.ico
> HTTP/1.1" 404 342 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2)
> AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36"
> 172.18.100.204 - - [22/Aug/2013:09:14:08 -0500] "GET /books/book/add HTTP/1.1"
> 200 6405 "http://172.18.96.1/books/latest/"; "Mozilla/5.0 (Macintosh;
> Intel Mac OS X 10_8_2) AppleWebKit/537.36 (KHTML, like Gecko)
> Chrome/28.0.1500.95 Safari/537.36"
> 172.18.100.204 - - [22/Aug/2013:09:14:14 -0500] "GET
> /media/js/admin/RelatedObjectLookups.js HTTP/1.1" 404 369 "
> http://172.18.96.1/books/book/add"; "Mozilla/5.0 (Macintosh; Intel Mac OS
> X 10_8_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95
> Safari/537.36"
> 172.18.100.204 - - [22/Aug/2013:09:14:14 -0500] "GET /favicon.ico
> HTTP/1.1" 404 342 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2)
> AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36"
>
>  the bottom right of the screen was activated>
>
> 172.18.100.204 - - [22/Aug/2013:14:14:26 +] "POST /book/add HTTP/1.1"
> 404 339 "http://172.18.96.1/books/book/add"; "Mozilla/5.0 (Macintosh;
> Intel Mac OS X 10_8_2) AppleWebKit/537.36 (KHTML, like Gecko)
> Chrome/28.0.1500.95 Safari/537.36"
> 172.18.100.204 - - [22/Aug/2013:14:14:26 +] "GET /favicon.ico
> HTTP/1.1" 404 342 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2)
> AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36"
>
>
> (color added to highlight the url which seems questionable-- second was
> different from the first)
> I believe that that the correct url to post the data would be
> "/books/book/add"
>
> This is because the httpd WSGIAlias in /etc/httpd/conf.d/pathagar.conf
> points to the pathagar.wsgi file, which I think also should be used as a
> prefix to the package.  Or--maybe I should be setting the prefix, and I'm
> not doing it>
>
> As an additional observation, navigating to /books/ redirects to
> "/latest/" rather than "/books/latest", and returns a 404 Not found error.
> This may, or may not be related.
>
>
Ajay, are you testing on a physical XO, or are you using a virtual machine?

I'm glad to have your help resolving the remaining issues with pathagar on
XSCE.

George

On Fri, Sep 6, 2013 at 9:33 AM, Ajay Garg  wrote:

> Thanks Aneesh for the pointers; I will keep them in mind when I start
> playing with PATHAGAR in XSCE :)
> Thanks again.
>
>
> On Fri, Sep 6, 2013 at 3:09 PM, Aneesh Dogra  wrote:
>
>>
>> On Sep 6, 2013 1:06 PM, "Ajay Garg"  wrote:
>> >
>> > Hi all.
>> >
>> > I have been playing with the public book-server
>> http://108.171.173.65/latest/ that Sameer let me know some time back
>> (thanks a lot Sameer, again !!)
>> >
>> > However, I have some queries regarding some workflows (and I found it
>> best to query all you guys, so that the maximum information could be
>> shared) :)  ::
>> >
>> >
>> >
>

Re: [Server-devel] [XSCE] Some queries regarding PATHAGAR workflows

2013-09-06 Thread Ajay Garg
Thanks Aneesh for the pointers; I will keep them in mind when I start
playing with PATHAGAR in XSCE :)
Thanks again.


On Fri, Sep 6, 2013 at 3:09 PM, Aneesh Dogra  wrote:

>
> On Sep 6, 2013 1:06 PM, "Ajay Garg"  wrote:
> >
> > Hi all.
> >
> > I have been playing with the public book-server
> http://108.171.173.65/latest/ that Sameer let me know some time back
> (thanks a lot Sameer, again !!)
> >
> > However, I have some queries regarding some workflows (and I found it
> best to query all you guys, so that the maximum information could be
> shared) :)  ::
> >
> >
> >
> > 1)
> > On the "home page" http://108.171.173.65/latest/, I only see a "Log in"
> option.
> > However, how do users get registered/created at first place?
> >
>
> You can add users through the django_admin interface (command line)
>
> > 2)
> > What is the notion of a "user" in the book-server?
> > In other words, what can a user do "after" logging in, which cannot be
> done "without" logging in?
> >
>
> User account in pathagar has rights to edit/add/delete the database
> entries I.e books.
>
> >
> > Looking forward to some pointers :)
> >
> >
> >
> >
> >
> > Thanks and Regards,
> >
> > Ajay Garg
> > Dextrose Developer
> > Activity Central: http://activitycentral.com
>



-- 
Regards,

Ajay Garg
Dextrose Developer
Activity Central: http://activitycentral.com
___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel