[google-appengine] Re: Alternate way to receive verification code than SMS?

2008-11-21 Thread Brian Clapper

On 11/21/08 3:11 PM, Faber Fedor wrote:
> 
> On Fri, Nov 21, 2008 at 2:06 PM, Brian Clapper <[EMAIL PROTECTED]> 
> wrote:
> I'm running it on Tiger just fine. What version of Python are you using?
> MacPorts Python 2.5

See this thread:
http://groups.google.com/group/google-appengine/browse_thread/thread/015bc242f0609ae6?fwc=1

--
-Brian

Brian Clapper, http://www.clapper.org/bmc/
Outside of a dog, a book is man's best friend.  Inside of a dog, it is too
dark to read.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Alternate way to receive verification code than SMS?

2008-11-21 Thread Brian Clapper

On 11/21/08 1:51 PM, Faber Fedor wrote:
> Marzia,
> 
> You're a Mac guy?  Do you have Appengine running on a Mac (Tiger)?  If
> so, how?  On mine I keep getting "Can't find module _md5".  The only
> advice I found was to reinstall GoogleAppEngineLauncher but that didn't
> help. :-(

I'm running it on Tiger just fine. What version of Python are you using?
-- 
-Brian

Brian Clapper, http://www.clapper.org/bmc/
I think time is crucial to anything. For example, if you lock an infinite
number of monkeys in a room with those typewriters, but you limit the
amount of time they have to write, the best you'll get out of them is the
pilot to The Dukes of Hazzard.
--Doug Sykes

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Error when accessing logs from dashboard

2008-10-23 Thread Brian Clapper

On 10/23/08 1:34 PM, Marzia Niccolai wrote:
> Hi Brian,
> 
> To view in the web interface, you can set the limit of logs records to
> be displayed by appending the &limit argument on the URL, so the
> following should work:
> 
> http://appengine.google.com/logs?&app_id=xxx&version_id=1.150&limit=10
> <http://appengine.google.com/logs?&app_id=brizzled&version_id=1.150&limit=10>
> 
> Also, instead of using sys.stderr you should use the standard python
> logging module.

I'm sharing this, so others might benefit.

Original problem: Retrieving logs via the dashboard resulted in a
short error message indicating that some internal retrieval exceeded 1Mb.

Cause: The problem appears to have been a stray "print" to sys.stderr that
I originally put into the code to help debug something while running with
dev_appserver; I neglected to remove that debug statement when I uploaded
the application. That print statement, while rarely executed, produced a
*lot* of output when it *was* executed. Yesterday, I used the application
in a way that triggered the print statement repeatedly It produced a lot of
log output; the volume of log output was clearly pushing an internal GAE
retrieval over a 1Mb limit, resulting in the error.

Limiting the number of logs via the "limit" parameter, as Marzia noted
above, allowed me to see some of the log output. Once I saw the output, the
problem was immediately apparent.

My only suggestion to the GAE team: In cases like this, it would help if
the log viewer displayed a more useful error message.

Thanks, Marzia.

-Brian

Brian Clapper, http://www.clapper.org/bmc/
Sex is the mathematics urge sublimated.
-- M. C. Reed

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Error when accessing logs from dashboard

2008-10-23 Thread Brian Clapper

On 10/23/08 1:34 PM, Marzia Niccolai wrote:
> Hi Brian,
> 
> To view in the web interface, you can set the limit of logs records to
> be displayed by appending the &limit argument on the URL, so the
> following should work:
> 
> http://appengine.google.com/logs?&app_id=xxx&version_id=1.150&limit=10
> 
> 
> Also, instead of using sys.stderr you should use the standard python
> logging module.

Thanks. I thought I'd gotten rid of all the sys.stderr stuff. I'll check again.

-Brian

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Error when accessing logs from dashboard

2008-10-23 Thread Brian Clapper

On 10/23/08 12:54 PM, Marzia Niccolai wrote:
> Hi Brian,
> 
> It does seem like the size of your logs is too large for the logs page,
> which is probably due to the amount of information you are including in
> them.  Can you try and download the logs to your computer?  Use the
> request_logs functionality of appcfg.py
> (http://code.google.com/appengine/docs/appcfgpy.html).

I've done that, thanks.

> If you cut down on the amount you are logging, and re-upload your app,
> this page will eventually be viewable again. However, I'm investigating
> if anything else can be done in the meantime so that you can view this page.

I'll cut back on the DEBUG logging and see if that helps. Thank you.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Error when accessing logs from dashboard

2008-10-23 Thread Brian Clapper

Attempting to examine the logs for my AppEngine application today, I have
consistently received a document containing nothing more than the following:

HTTP response was too large: 1738540. The limit is: 1048576.

Other than the obvious 1Mb ceiling being hit here, it's a little tough to
diagnose the cause of the problem. Is this happening because my application is
dumping out too many DEBUG-level log messages? (If so, what's the definition
of "too many"?) Is there some other problem?

Is anyone else seeing this?

Application ID is "brizzled", for what it's worth.

-Brian Clapper, [EMAIL PROTECTED]

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Terrible

2008-09-29 Thread Brian Clapper

On 9/29/08 1:12 PM, Richard Zak wrote:
> I assume you're on a mac.  Us Windows and Linux folks use the command
> line, which is the only *real* way to do things :)

I'm on a Mac. (Well, a Mac *and* Linux, depending.) I use the command line.
Does that make me "real", or just old? (Not that I care overmuch.)
-- 
-Brian

Brian Clapper, http://www.clapper.org/bmc/
Fanaticism consists of redoubling your efforts when you have forgotten your
aim.
-- Santayana

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Terrible

2008-09-29 Thread Brian Clapper

On 9/27/08 10:48 PM, rc wrote:
> This is the most unuser friendly way of managing a site. You have to
> be kidding me, command line deployment?! Unistalling...

Clearly the sort of programmer *I'm* going to be hiring Real Soon Now.
-- 
-Brian

Brian Clapper, http://www.clapper.org/bmc/
The attacker must vanquish; the defender need only survive.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Why do I need a cellphone to register.

2008-09-23 Thread Brian Clapper

On 9/23/08 3:19 AM, Hanukumar Pinnamraju wrote:
> This is not good, I dont have a cell phone and I can't register for
> app engine?

Please read this page: http://code.google.com/appengine/kb/sms.html


Brian Clapper, http://www.clapper.org/bmc/

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Having trouble uploading application.

2008-09-23 Thread Brian Clapper

On 9/22/08 5:42 PM, [EMAIL PROTECTED] wrote:
> I'm sorry, this is going to sound very beginner-ish (because I am one
> obviously). I've made my application and I'm trying to upload it but I
> keep running into problems. I'm using Ubuntu, and I go into the
> terminal and type  /home/*username*/Documents/google_appengine/
> appcfg.py update  and get the
> output bash: syntax error near unexpected token `newline'. Am I doing
> something totally obvious wrong?

If appcfg.py is not executable, you'll get that error. You have two options:

1. Make it executable: chmod 755 /path/to/appcfg.py
2. Explicitly run it through Python: python /path/to/appcfg.py update ...
--
Brian Clapper, http://www.clapper.org/bmc/

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: local log file

2008-09-22 Thread Brian Clapper

On 9/22/08 12:09 PM, Marzia Niccolai wrote:
> Hi Joseph,
> 
> Currently, dev_appserver logs are printed to the terminal.  It only
> prints info level logging, so to view logs in development, you will need
> to log at this level.

Am I missing something? I believe I've used the -d (--debug) parameter to
dev_appserver to get debug-level logs printed on the terminal.

Or are we talking about two different things?


Brian Clapper, http://www.clapper.org/bmc/

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Putiing google app api server online

2008-09-11 Thread Brian Clapper

On 9/11/08 9:53 AM, rahul_itbhu wrote:
> HI ..
> i read the instruction manual on the net by google and was
> successfully able to connect to the server on localhost:8080
> 
> problem:
>when i try and access the server using my computers ip address from
> other computer i was not able to do so..
> my fire wall is open on port 8080
> 
> in WAMP theres a special feature of puttin it online or no... when you
> put it online we can access from other computer ..
> is there such a feature in google app engine too

It listens on localhost by default, i.e., on address 127.0.0.1.
If you want it to listen on another interface, you have to specify it.
e.g.:

dev_appserver --address=192.168.1.100 .

--
-Brian

Brian Clapper, http://www.clapper.org/bmc/
After the last of 16 mounting screws has been removed from an access cover,
it will be discovered that the wrong access cover has been removed.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: unterminated string literal

2008-09-09 Thread Brian Clapper

On 9/9/08 10:29 AM, Donovan wrote:
> Unless there's already a function in python that I don't know about (I
> know php has json_encode), you can goto json.org to get a python based
> json library. It will properly escape string values for you (note that
> it'll include the quotes) so that you can output them into javascript
> in your templates.

Try simplejson: http://www.undefined.org/python/

-Brian

Brian Clapper, http://www.clapper.org/bmc/
Barth's Distinction: There are two types of people: those who divide people
into two types, and those who don't.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: REST api for datastore model

2008-09-07 Thread Brian Clapper
You might also consider http://code.google.com/p/app3/

Brian Clapper, http://www.clapper.org/bmc/

On Sun, Sep 7, 2008 at 1:43 PM, Peter Svensson <[EMAIL PROTECTED]> wrote:

> You could check out a project I'm involved with a project called
> gae-json-rest, which gives you a lot of the functionality you want, like
> REST url's for db.Model classes. We've not implemented json-schema yet, but
> will do so 'soonish' :)
>
> http://code.google.com/p/gae-json-rest/
>
> Cheers,
> PS
>
>
> On Sun, Sep 7, 2008 at 6:55 AM, Joseph <[EMAIL PROTECTED]> wrote:
>
>>
>> Hi: I'm trying out google app engine. I am using django helper. I've
>> defined the models. Is there a plugin for defining REST api? or should
>> I've to code them on my own?
>>
>> Also how can I define http basic authentication? Django uses signal
>> for the same. I understand that it is disabled in GAE.
>>
>> Thank you,
>> Joseph
>>
>>
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: environment flag

2008-09-05 Thread Brian Clapper

On 9/5/08 3:55 AM, jhf555 wrote:
> Couldn't find this answered yet, so...
> I need to serve one image in development mode, and a different image
> in production mode.  How do I tell which mode I'm in from my app
> engine code?...I'm hoping there's something like:
>   if ENVIRONMENT == "development":
> img = image1
>   else:
> img = image2
> 
> Thanks.

server = os.environ.get('SERVER_SOFTWARE','').lower()
if server.startswith('devel'):
img = image1
elif server.startswith('goog'):
img = image2
else:
logging.error('Unknown server: %s. Production/development?' % server)
image = something_else

-- 
-Brian

Brian Clapper, http://www.clapper.org/bmc/
Controlling complexity is the essence of computer programming.
-- Brian W. Kernighan

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Mako Templates for Python

2008-09-03 Thread Brian Clapper

On 9/3/08 5:23 PM, Davide Rognoni wrote:
> Yes, but the vote indicates the developers preference about the
> template systems.
> Then you can focus on the best library. What is?

I know the purpose of the vote. I just think voting on a favorite template
engine is ... well, not very useful.

Brian Clapper, http://www.clapper.org/bmc/
Cohen's Law: Everyone knows that the name of the game is what label you
succeed in imposing on the facts.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Mako Templates for Python

2008-09-03 Thread Brian Clapper

On 9/3/08 4:49 PM, Noah Gift wrote:
> On Wed, Sep 3, 2008 at 4:48 PM, Davide Rognoni <[EMAIL PROTECTED]> wrote:
>> Then you can vote this template :-)
> 
> Hopefully, people using other templates would be kind enough to post a
> how to on getting it working on the cookbook site google set up.
> 
> http://appengine-cookbook.appspot.com/

I agree. I'm far less interested in people's votes. Votes are noise to me.
Info on getting other engines working, though--that's useful information.

Brian Clapper, http://www.clapper.org/bmc/
A psychiatrist is a person who will give you expensive answers that
your wife will give you for free.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Is Google App Engine a "Virtual Machine" like Flash or Dot Net or Java ?

2008-09-03 Thread Brian Clapper

On 9/3/08 2:29 PM, Mel_3 wrote:

> And, when is multi-tasking a zillion projects... and one knows where
> to find someone to save them hours of prelim research... and the
> choose to do the research anyway... and drop the ball on some of their
> other responsibilities... well, that person isn't wisely using their
> resources.
>
> Of course we have to make sure we don't over use the available
> resources... but I've always found if I can just get a helpful expert
> to answer some questions right at the get-go... then I can go off and
> get going and become productive much faster...

Except that posting questions to a list--getting others to do your up-front
research, so you can "get going and become productive much faster"--without
doing even a minimal amount of your own research, simply pushes the
resource cost off to someone else. Why is your time more valuable than that
of an expert on this list? By getting a "helpful expert to answer some
questions right at the get-to", you're relying on that expert to give up
*his* valuable time to save *you* a few hours of research. Is it really all
that surprising such behavior would annoy people?

It's all about respect and consideration. Do some research yourself.
Then come to the list for clarification.

That behavior standard has been part of good netiquette for a very long
time. The fact that some people ignore good etiquette doesn't make it any
less good.

If you post simple questions to a list--especially questions that are
answered in a FAQ or on a well-known web site associated with the list--you
will invariably annoy the very experts whose help you desire.

If make an effort to educate yourself and do a little research on your own
first, you'll find, as if by magic, that people are a lot more disposed to
bend over backward to help you.

Brian Clapper, http://www.clapper.org/bmc/
Never put off until tomorrow what you can avoid altogether.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Google maps custom tile hosting on GAE

2008-09-02 Thread Brian Clapper

On 9/2/08 12:06 PM, Fred wrote:
> OK, thanks Brian. Final question - any pointers for reading from zip
> files on the fly?

See the standard Python zipfile module.
http://docs.python.org/lib/module-zipfile.html

Brian Clapper, http://www.clapper.org/bmc/
Variables won't.  Constants aren't.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Google maps custom tile hosting on GAE

2008-09-02 Thread Brian Clapper

On 9/2/08 11:45 AM, Fred wrote:
> but "An app can read files, but only files uploaded with the
> application code" from 
> http://code.google.com/appengine/docs/whatisgoogleappengine.html
> 
> So should the zip file would be imported into the datastore?

Your first paragraph should give you the answer. If it contains static data,
you can put it in your local development tree and upload it with appcfg. Or
you can put it in the data store as the equivalent of a BLOB.Brian

Brian Clapper, http://www.clapper.org/bmc/
Boy, n.:
A noise with dirt on it.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Google maps custom tile hosting on GAE

2008-09-02 Thread Brian Clapper

On 9/2/08 11:29 AM, Fred wrote:
> Hi,
> 
> I'm developing a google maps app, hosted on GAE, for which I've
> developed a custom tile overlay, consisting of thousands of png
> images, at about 4 - 8k each in size. I've tried uploading about 15mb
> worth of tiles (just over 3,500 tiles), and have hit the 1000 file
> limit. (Detailed in issue 161 - 
> http://code.google.com/p/googleappengine/issues/detail?id=161
> ).
> 
> The suggestion from google is: "We encourage developers to find
> creative ways to reduce the number of files in an app" - but for a
> custom overlay in maps I don't think there is any other solution that
> to have multiple tiles.
> 
> So - my question is whether anyone can suggest a way around this. I
> think this is a showstopper for me otherwise.

You could store them in a zip file, then extract what you need from the zip
file on the fly.
-- 
-Brian

Brian Clapper, http://www.clapper.org/bmc/
It is a miracle that curiosity survives formal education.
-- Albert Einstein

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Updating Application gives Server 500 Error

2008-08-31 Thread Brian Clapper

On 8/31/08 10:31 AM, Adam Fisk wrote:
> I'm seeing this too.  Maybe intermittent hiccups due to updating
> things on the App Engine team side?  Anyone know anything?

I see this periodically. If you search through the mailing list archives,
you'll see occasional bursts of complaints about it. It seems to happen for
awhile, then go away.

To date, no one from Google has responded with any information as to why it
happens. It definitely appears to be on the server (i.e., Google) side.

The workaround appears to be: Keep trying until it stops happening.

Brian Clapper, http://www.clapper.org/bmc/

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Today's scheduled maintenance cleared all logs

2008-08-27 Thread Brian Clapper

On 8/27/08 10:36 PM, Alex Epshteyn wrote:
> All my app's logs are now gone as a result of this maintenance and the
> request graph is empty. Was this something you that was expected to
> happen?
> 
> Is there a way to download one's logs manually to make sure we don't
> lose important info during future maintenance?

This is not really an answer to your question, so much as a tangent, but
integrating Google Analytics into my application has proven to be quite useful
as an aid to analyzing request traffic.

-Brian

Brian Clapper, http://www.clapper.org/bmc/
Mediocrity thrives on standardization.
-- Wayne Dyer

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Best practice for a lot of 301 redirects

2008-08-27 Thread Brian Clapper

On 8/27/08 3:27 AM, Jeffrey Rosen wrote:
> Hello, on my old site I have a rather large .htaccess file for legacy
> purposes.  What is the best way to handle all of these redirects?
> Maybe 75 of them.

Without seeing the .htaccess file, it's difficult to give a precise answer.
But GAE offers some useful tools that might help. One possibility is to use
regular expression matching in combination with a redirect handler. For
instance given this WSGIApplication initialization in one of your Python
scripts:

application = webapp.WSGIApplication(
[(r'/', FrontPageHandler),
 ...

 # Redirects from old paths.
 (r'/docs/(.*)/?', DocsRedirectHandler),]
)

You could handle redirects to any URL path starting with "/docs/" to
"/newdocs/" with this handler:

class DocsRedirectHandler(webapp.RequestHandler):
def get(self, docpath):
url = "/newdocs/%s" % docpath
logging.debug('Redirecting to: %s' % url)
self.redirect(url)

Brian Clapper, http://www.clapper.org/bmc/

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---