<div dir="ltr">Hi Ajay,<div><br></div><div>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/? </div>
<div><br></div><div>Seth looked at the access log,(copied below) and concluded that there would be some programatic changes required.</div><div class="gmail_extra"><br>Following is part of our conversation:</div><div class="gmail_extra">
<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Seth wrote:</div><div class="gmail_extra"><div dir="ltr">Django is definitely messing up. books/book/add is the url you want, right? You are prefixing a url with /books/$pathagar.<div>
<br></div><div>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:</div><div><br></div><div>(On the XSCE server, I think we need a prefix -gh)</div>
<div><br></div><div>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.</div><div><br></div><div>2. Modify all of the url routes in urls.py</div>
<div><br></div><div>> (r'^tags/(?P<tag>.+)/$', 'pathagar.books.views.by_tag',</div><div><br></div><div>would become</div><div><br></div><div>> (r'^books/tags/(?P<tag>.+)/$', 'pathagar.books.views.by_tag',</div>
<div><br></div><div>This is probably your best bet given your time constraints.</div><div class=""><div id=":9k" class="" tabindex="0"><img class="" src="https://mail.google.com/mail/u/0/images/cleardot.gif" style=""></div>
</div><span class=""><font color="#888888"><div><br></div><div>--<span class="">Seth</span></div></font></span></div><div class=""><div class="adm"></div><div class="im"><div class="gmail_extra"><br><br><div class="gmail_quote">
On Sun, Aug 25, 2013 at 6:58 PM, George Hunt <span dir="ltr"><<a href="mailto:georgejhunt@gmail.com" target="_blank">georgejhunt@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div><br><div class="gmail_quote"><div dir="ltr">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:<div>
<div><br></div><div><div>172.18.100.204 - - [22/Aug/2013:14:13:49 +0000] "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"</div>
<div>172.18.100.204 - - [22/Aug/2013:09:13:54 -0500] "GET /books/latest HTTP/1.1" 301 - "<a href="http://172.18.96.1/portal/" target="_blank">http://172.18.96.1/portal/</a>" "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"</div>
<div>172.18.100.204 - - [22/Aug/2013:09:13:59 -0500] "GET /books/latest/ HTTP/1.1" 200 3782 "<a href="http://172.18.96.1/portal/" target="_blank">http://172.18.96.1/portal/</a>" "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"</div>
<div>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"</div>
<div>172.18.100.204 - - [22/Aug/2013:09:14:08 -0500] "GET<font color="#ff0000"> /books/book/add</font> HTTP/1.1" 200 6405 "<a href="http://172.18.96.1/books/latest/" target="_blank">http://172.18.96.1/books/latest/</a>" "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"</div>
<div>172.18.100.204 - - [22/Aug/2013:09:14:14 -0500] "GET /media/js/admin/RelatedObjectLookups.js HTTP/1.1" 404 369 "<a href="http://172.18.96.1/books/book/add" target="_blank">http://172.18.96.1/books/book/add</a>" "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"</div>
<div>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"</div>
<div><br></div><div><font size="4"><the book for upload was selected at this point, and the "add" button at the bottom right of the screen was activated></font></div><div><br></div><div>172.18.100.204 - - [22/Aug/2013:14:14:26 +0000] "POST<font color="#ff0000" style="background-color:rgb(243,243,243)"> /book/add</font> HTTP/1.1" 404 339 "<a href="http://172.18.96.1/books/book/add" target="_blank">http://172.18.96.1/books/book/add</a>" "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"</div>
<div>172.18.100.204 - - [22/Aug/2013:14:14:26 +0000] "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"</div>
</div><div><br></div><div><br></div></div><div><font size="4">(color added to highlight the url which seems questionable-- second was different from the first)</font></div><div><div><font size="4">I believe that that the correct url to post the data would be "/books/book/add"</font></div>
<div><font size="4"><br></font></div></div><div><font size="4">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></font></div>
<div><div><font size="4"><br></font></div><div><font size="4">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.</font></div>
<div><font size="4"><br></font></div></div></div></div></div></div></blockquote><div><br></div><div>Ajay, are you testing on a physical XO, or are you using a virtual machine?</div><div><br></div><div>I'm glad to have your help resolving the remaining issues with pathagar on XSCE.</div>
<div><br></div><div>George</div><div> </div></div></div></div></div><div class="gmail_quote">On Fri, Sep 6, 2013 at 9:33 AM, Ajay Garg <span dir="ltr"><<a href="mailto:ajay@activitycentral.com" target="_blank">ajay@activitycentral.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>Thanks Aneesh for the pointers; I will keep them in mind when I start playing with PATHAGAR in XSCE :)<br>
</div>Thanks again.<br></div><div><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Sep 6, 2013 at 3:09 PM, Aneesh Dogra <span dir="ltr"><<a href="mailto:lionaneesh@gmail.com" target="_blank">lionaneesh@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><p dir="ltr"><br>
On Sep 6, 2013 1:06 PM, "Ajay Garg" <<a href="mailto:ajay@activitycentral.com" target="_blank">ajay@activitycentral.com</a>> wrote:<br>
><br>
> Hi all.<br>
><br>
> I have been playing with the public book-server <a href="http://108.171.173.65/latest/" target="_blank">http://108.171.173.65/latest/</a> that Sameer let me know some time back (thanks a lot Sameer, again !!)<br>
><br>
> 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) :) ::<br>
><br>
><br>
><br>
> 1)<br>
> On the "home page" <a href="http://108.171.173.65/latest/" target="_blank">http://108.171.173.65/latest/</a>, I only see a "Log in" option.<br>
> However, how do users get registered/created at first place?<br>
></p>
</div><p dir="ltr">You can add users through the django_admin interface (command line)</p><div>
<p dir="ltr">> 2)<br>
> What is the notion of a "user" in the book-server?<br>
> In other words, what can a user do "after" logging in, which cannot be done "without" logging in?<br>
></p>
</div><p dir="ltr">User account in pathagar has rights to edit/add/delete the database entries I.e books.</p><div><div>
<p dir="ltr">><br>
> Looking forward to some pointers :)<br>
><br>
><br>
><br>
><br>
><br>
> Thanks and Regards,<br>
><br>
> Ajay Garg<br>
> Dextrose Developer<br>
> Activity Central: <a href="http://activitycentral.com" target="_blank">http://activitycentral.com</a></p>
</div></div></blockquote></div><br></div><br clear="all"><br></div></div>-- <br><div class=""><div class="h5"><font face="arial, sans-serif">Regards,<br><br>Ajay Garg</font><br style="font-size:13px;font-family:arial,sans-serif">
<font face="arial, sans-serif">Dextrose Developer</font><br style="font-size:13px;font-family:arial,sans-serif"><span style="font-size:13px;font-family:arial,sans-serif">Activity Central: </span><a href="http://activitycentral.com/" style="font-size:13px;font-family:arial,sans-serif" target="_blank">http://activitycentral.com</a>
</div></div></blockquote></div><br></div></div>