Re: Jquery Ajax call and Pylons request interaction

2012-07-10 Thread Jonathan Vanasco
i would not learn pylons, and learn pyramid instead. pylons is stable , but development has ceased except for security fixes. pyramid is essentially the new version of pylons ( and the new version of bfg ). there are a lot of pyramid turorials. -- You received this message because you are subs

Re: Using dynamic subdomains with pyramid

2012-07-13 Thread Jonathan Vanasco
I just do the URL rewriting like this on my proxy server or load balancers. It's way easier to just have nginx , varnish, etc handle this. -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons-discuss@goo

Re: template filename output in html

2012-07-14 Thread Jonathan Vanasco
if you're using Mako, you can use ## , which comments out the line. that will never render and isn't automatically created on imports. you could also use a build script - either with Fabfile or Ant ( like the html5 blueprint build script )... have a source "folder" that is your production , then r

Re: Need Help in downloading a file from server

2012-07-17 Thread Jonathan Vanasco
On Jul 16, 10:38 pm, ravi <4uall.raviku...@gmail.com> wrote: > But here the problem i am facing is csv file ouput is not in correct > format. all rows data coming in single line. That could be a text encoding issue. The single line could be - for example , but my guess - because you are on a Wi

Re: Serving Buildbot webpages via Pyramid ?

2012-07-19 Thread Jonathan Vanasco
4/ set up a solr-lucene instance , have a cronjob ( or a triggered task ) pull all the information from the various components and standardize into a common document. use pyramid to front requests via pysolr , and then display. -- You received this message because you are subscribed to the Googl

Re: Serving Buildbot webpages via Pyramid ?

2012-07-20 Thread Jonathan Vanasco
it's pretty easy, but how about saving it into a sqlite or bdb filestore ? you *could* do a lot of proxying and re-writing , but it seems like what you want to accomplish is standardizing the interface to all this documentation. periodically pulling everything out as json/whaetever and then stori

Re: Pyramid - Including diffrent version of static files in development and production mode

2012-07-21 Thread Jonathan Vanasco
i have a deploy script written in Fabric ( fabfile ) it handles a bunch of things like: - minify js and css - create symlinks for directories as needed - etc generally i do one - or both - of the following: 1) instead of static, i have /-static-source /static-production 2) a symlink in 'develop'

just wondering - serving file cache off of ram ?

2012-07-30 Thread Jonathan Vanasco
has anyone tried configuring pyramid / modules / os to run the cached data directory ( templates, sessions, variables, whatever ) off of a virtual disk/ram ? just wondering if anyone has, and if there were decent speed improvements. -- You received this message because you are subscribed to the

Re: just wondering - serving file cache off of ram ?

2012-07-31 Thread Jonathan Vanasco
ah, nice. i just started thinking about this as I noticed the "pserve --reload" command refreshing on any change within the directory ( i.e. on Dir/ docs/* -- not on Dir/App or Dir/$env$.ini The hdd on my macbook is 3-4 years old and pretty full, so it's not nearly as fast as it should be. -- Y

'data' directory

2012-08-01 Thread Jonathan Vanasco
this is puzzling me... under my previous Pylons + Paster experience, the 'data' directory ( where sessions, templates, dogpile, etc ) would always happen within the module as i've moved to Pyramid and uwsgi , this seems to occur not there -- but in whatever directory i spawned the uwsgi server fr

Re: 'data' directory

2012-08-01 Thread Jonathan Vanasco
thanks! is there a guide to what %(here) and other variables are available on the ini ? -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons-discuss@googlegroups.com. To unsubscribe from this group, send

Re: Is this correct?

2012-08-06 Thread Jonathan Vanasco
> > What would the disadvantage be of using Pyramid over a PHP framework ? First, the disadvantage: PHP is ubiquitous - it's on nearly every web hosting plan, and has great support with simple installers for most linux distros. It also rarely requires extra modules , and they can almost always j

Re: Is this correct?

2012-08-06 Thread Jonathan Vanasco
All libraries are frameworks and vice versa. it's a dicey thing. I wasn't meaning to confuse, but to illustrate that Pyramid is so low-level in comparison to "Frameworks" like Django, Rails, Cake, etc - that its not really a framework by comparison. -- You received this message because you

pyramid_mailer and sendmail

2012-08-06 Thread Jonathan Vanasco
i'm using pyramid_mailer and drop things into a local directory / spool has anyone hooked this up to the local sendmail ( or more likely exim, qmail, postfix ) ? i'd rather have the local MTA deliver or relay -- as they come with all sorts of error reporting, try-again, etc it seems like my ea

Re: 'data' directory

2012-08-07 Thread Jonathan Vanasco
is this 'here' dir available in the request.settings ? didn't see it in there, and it seems like it would be useful. -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons-discuss@googlegroups.com. To unsu

pyramid_mailer - qp

2012-08-08 Thread Jonathan Vanasco
i'm trying to get pyramid_mailer working i've got messages going into a maildir fine the qp commant doesn't seem to do anything though `qp --debug-smtp /path/to/maildir` gives me nothing. nothing in the local mail.log either i've tried setting a username , pass, hostname, forcetls , etc on

Re: pyramid_mailer - qp

2012-08-08 Thread Jonathan Vanasco
after digging around code a lot, here's what i figured out: i call pyramid_mailer's send_to_queue , which seems to place the message in the maildir/tmp the repoze.sendmail.queue console routine ( which is wrapped by qp ) calls the repoze.sendmail.maildir routine to loop through messages -- which

Re: pyramid_mailer - qp

2012-08-09 Thread Jonathan Vanasco
i went through all the code, this seems to be a documentation bug. the send_to_queue command appears to be transactional, although it's not stated as such in the docs pyramid_mailer.Mailer.send_to_queue() calls... repoze.sendmail.delivery.QueuedMailDelivery().send() calls... which subclasses th

uwsgi and forking

2012-08-09 Thread Jonathan Vanasco
I had some code that worked with Crypto and wasn't initially compatible with uwsgi... the fix was to call Crypto.Random's atfork() . thankfully uwsgi has a post_fork_hook that made this simple I don't always run under uwsgi though. does the implementation I used below look okay - or does anyone

Re: Is there a terser way to get a reference to my DB than self.request.root.db?

2012-08-11 Thread Jonathan Vanasco
storing the db connection somewhere under the active request is the optimal thing to do -- it makes the db generally accessible throughout the app. there are some ways to make it easier to get to: - if you use a class based approach to writing views, you could have a base class that does much of t

Re: Using Pyramid with Nginx and uWSGI

2012-08-13 Thread Jonathan Vanasco
check out my last post in this thread: http://groups.google.com/group/pylons-discuss/browse_thread/thread/2de9e2661230c999/b93b702bb42b4fc2 might help you get going a bit faster -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this

Re: Almost off-topic: OSS benefits

2012-08-16 Thread Jonathan Vanasco
there are a large number of automatic downloads from web crawlers that will index or re-host the packages. some of them are legit, others are for advertising farms ( they do a lot of SEO optimization against your project , to overtake the real origin in search rankings - then advertise against

Re: Pyramid 1.3.3 released

2012-08-17 Thread Jonathan Vanasco
you can upgrade packages installed with `pip` using `easy_install`, and vice versa. pip currently has a bug in the upgrade function, so i'd recommend against using it for upgrades. a call to `easy_install --upgrade PACKAGE` will upgrade that package , upgrade any dependencies to required versi

dogpile advice

2012-08-31 Thread Jonathan Vanasco
hi all so i have code that works , i just want to talk about it with other users and see if this is a good strategy / could be improved. i had to refactor the caching code to split it into more manageable chunks and integrate it into the app-config for different environments this is what came of

Re: accessing config variable in views

2012-09-02 Thread Jonathan Vanasco
> How would I access this config variable from my views? Some people have > suggested using request.registry.settings, but I don't see it in that > dictionary in my 1.3.3 version. request.registry.settings is the place to find app configuration settings. I just looked at the pyramid ldap docs, a

Re: New SQLAlchemy session created when referenced in views package

2012-09-05 Thread Jonathan Vanasco
scoped_session returns a session, so to me i see: /app/models.py: creates DBSession instance via scoped_session initialize_sql initializes it /app/views / etc : imports the DBSession from /app/models, then calls it? i think that's where an issue may be. have you looked into the SqlAH

Re: pyramid code translate

2012-09-07 Thread Jonathan Vanasco
> > this is a good idea. you should repost to pylons-devel, and/or make a > github request > https://github.com/pylons/pyramid/issues -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To view this discussion on the web visit https://group

Re: Pylons specific FormEncode bugs

2012-09-17 Thread Jonathan Vanasco
i responded to #4 on github. your suspicion is correct. -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/CpQ2WwXrbAgJ. To post to this group, send email

Re: Forcing mako to access templates outside of the pylon app?

2012-09-18 Thread Jonathan Vanasco
i had a similar need a while back ( it had to do with asset folders, but still similar ) > > the easiest solution for me, was to have a symlink created as part of my setup/deployment i use fabric for deployment, so it was extra simple. you could just 'mount' the external project directories und

dogpile cache_on_arguments default key generation

2012-09-18 Thread Jonathan Vanasco
i'm redoing dogpile caching on my app, and looking into cache_on_arguments the docs say "The default key generation will use the name of the function, the module name for the function, the arguments passed, as well as an optional “namespace” parameter in order to generate a cache key." looking

Re: dogpile cache_on_arguments default key generation

2012-09-18 Thread Jonathan Vanasco
i'm not sure what i looked at either, but that's the answer i was hoping for. i think i saw line in region.cache_on_arguments ( key = key_generator(*arg, **kw) ) and missed the valueerror in util i also have a much older version of dogpile, as my line numbers are way off anyways, great answer!

lazy database connections ?

2012-09-24 Thread Jonathan Vanasco
in my apps, i attach a db connection object to the request. It's basically just a wrapper that holds SqlAlchemy connections my code tends to look like this: class AView(): @viewconfig(...) def something(self): self._setupDb('reader') the _setupDb function attach

Re: a bit lost ...

2012-10-02 Thread Jonathan Vanasco
While Pyramid is very powerful, it is very low level and has no "bells and whistles". You could potentially rewrite Django on top of Pyramid. To try and address this question, let's imagine that when building on Pyramid or Django, there are 3 main types of code : - Core ( Pyramid or Django Its

Re: a bit lost ...

2012-10-08 Thread Jonathan Vanasco
@zak-- to some extent yes. but the levels of automation and magic you see in a Django app vs a Pyramid app early on are a stark contrast. With django you can enable a handful of extensions, and have a role-permisisoned forum site with blog posts and comments, complete with admin and user inte

avoiding race conditions in dogpile with recursive caching

2012-10-12 Thread Jonathan Vanasco
i'm using dogpile to manage caching, and ran into an issue with "assembled objects" - in which i (pre)compile a bunch of complex data into the cache on first view an example of the problem i've run into is in the class below... ( it's a very simplified illustration ) class CachingApi(object):

Legacy Pylons App Migration Questions ( 0.9.7 -> 0.1.0 / 1.x )

2012-10-13 Thread Jonathan Vanasco
I'm migrating an old Pylons app to 1.0 ( eventually to Pyramid ) I've never migrated from .9.7 to 1.x before. I've used 1.x, but this migration is confusing me a bit. I've run into a few issues I'm hoping someone before me found/solved : 1. I had a lot of misc functions access the pylons.confi

Re: Legacy Pylons App Migration Questions ( 0.9.7 -> 0.1.0 / 1.x )

2012-10-13 Thread Jonathan Vanasco
well i solved the render issue... in lib.base.py bad: from pylons.templating import render good: from pylons.templating import render_mako as render which wasn't covered in the docs. -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group.

Re: Legacy Pylons App Migration Questions ( 0.9.7 -> 0.1.0 / 1.x )

2012-10-15 Thread Jonathan Vanasco
thanks mike! -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons-discuss@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, vi

Re: E-Commerce and Shopping Cart Recommendation

2012-10-17 Thread Jonathan Vanasco
for checkout, you can just use a service like paypal , google or amazon. they all have api modules in python. in terms of the cart functionality, it's hit and miss depending on your requirements ( tracking stock, product variations, shipping options/costs, reserving products etc ) figure out your

Re: Perform some action before pserve

2012-10-24 Thread Jonathan Vanasco
For staging/production, I tend to write startup scripts per machine. For a while i was doing shell scripts, but then I started using Fabric. For local development, i have a 'source' file , that typically does this: 1. cd path_to_pyramidapp 2. source path_to_virtualenv/bin/activate 3. handle

Re: Fwd: [Gnukhata-devel] separation of js code from mako files

2012-10-26 Thread Jonathan Vanasco
If i understand you correctly: Before Editing : Your javascript was embedded in mako. and you had variables set in javascript After Editing : Your javascript is outside of mako, and you need to set variables If that is your problem, the solution is to re-architect your javascript so you can

Re: dogpile.cache 0.4.0 / dogpile.core 0.4.0 released

2012-10-30 Thread Jonathan Vanasco
incidentally, any idea how to deal with same-process dogpile-up issues like i had here: http://groups.google.com/group/pylons-discuss/browse_thread/thread/8e72fb880061088b -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group

Re: Fwd: [Gnukhata-devel] separation of js code from mako files

2012-10-30 Thread Jonathan Vanasco
On Oct 28, 1:58 pm, Mike Orr wrote: > I have this problem in a Pylons applicaition I'm converting to > Pyrmaid. Right now I'm leaving the Javascript in place, but I'm > thinking about moving it to separate templates (not static files). > Then I can inject variables without having the Javascript

Re: state of docs overhaul

2012-11-02 Thread Jonathan Vanasco
Here's what I'd like to see in Narrative & Reference docs - in addition to the above 1. The Pyramid Request Cycle mod_perl does a decent job at this: http://perl.apache.org/docs/2.0/user/handlers/server.html http://perl.apache.org/docs/2.0/user/handlers/http.html How does Pyramid handle a

Re: recommend a wysiwyg editor for a pyramid project?

2012-11-08 Thread Jonathan Vanasco
When it comes to the the type of HTML editing you mentioned, I want to stress 2 things: - As much as you can , don't allow consumer HTML - I really suggest forcing everything into Markdown or similar in the backend, then generating into HTML as needed. For image handling... i tossed my soluti

Re: How to handle multiple views in one page

2012-11-08 Thread Jonathan Vanasco
in my opinion there is no best-practice to handle this. it all depends on how you want to structure the application for ease-of-development vs where you're willing or unwilling to take performance hits. -- You received this message because you are subscribed to the Google Groups "pylons-discu

Re: How to handle multiple views in one page

2012-11-08 Thread Jonathan Vanasco
mean, that all of the inhouse routing and > view functionality of pyramid would be pretty useless and I would degrade > it to a database pool with ORM and manually call renderers. I can't imagine > that I'm the first to master this challenge. > > On Thursday, Novemb

Re: recommend a wysiwyg editor for a pyramid project?

2012-11-09 Thread Jonathan Vanasco
You don't have to require wiki-style formatting. If you give them something like the markdown editor on StackOverflow , they won't really care or notice. Then you strip/re-encode on the backend to ensure it's okay. If people care about not being able to do random new things, they'll complain

Re: Recommendations for having a static index page

2012-11-14 Thread Jonathan Vanasco
for a current project: DEV nginx - port 80 proxy pass to pserve ( waitress ) - port 5020 PROD/STAGING nginx - port 80 uwsgi integration to pyramid i decided that using nginx on dev was just a lot easier for me a- i just launch it once, and its no real drain on my mac, so i only have to auth to

Lessons from the Pylons Book

2012-11-27 Thread Jonathan Vanasco
I was going batty today trying to figure out why documentation , recommendations, and changelogs were conflicting when migrating an old Pylons project. Then I finally realized the problem - and noticed a large number of people on StackOverflow were suffering from the same issue: - The "Pylons Boo

Re: Lessons from the Pylons Book

2012-11-29 Thread Jonathan Vanasco
On Wednesday, November 28, 2012 1:45:37 PM UTC-5, Mike Orr wrote: > > The Pylons Book is a product of its time. Maybe we should just release > Pylons 1.2 unchanged to eliminate confusion. The Pylons Book *is* thorough > and well-written, but it's dated and a couple chapters delved into esoteric

Re: WebHelpers developments

2012-11-29 Thread Jonathan Vanasco
Is there a url for that Paginate project ? I've been using this generic lib: http://code.google.com/p/python-pagination/ Also, I don't know if you've considered it... but if there were an easy way to widgetize or templatize webhelpers so that it could generate HTML that is in line with Twitter

Re: Good form library for pyramid ? Better doing it by hand ?

2012-12-11 Thread Jonathan Vanasco
On Thursday, December 6, 2012 4:35:57 AM UTC-5, malthe wrote: > > Hey Nicolas, > > I had a realization at some point that form libraries ultimately > aren't a joy to work with. > > Instead, I wrote `repoze.formapi` (see docs at > http://docs.repoze.org/formapi/). > > I did something similar.

redirect in route definition?

2012-12-12 Thread Jonathan Vanasco
is it possible to redirect in a route definition, or do i need to create a view ? in the example below, i don't have an /account/my/archive page. if someone tries to hack the url, i want to send them to /account/my i'm doing this in a view, but i'm just wondering if anyone else has cleaner wa

Re: Good form library for pyramid ? Better doing it by hand ?

2012-12-12 Thread Jonathan Vanasco
i agree with pretty much everything. the issues for me have been in separating the customization points for the right team members.my library just wraps validation & serialization by FormEncode, and helps automate the server side processing. personally, i believe you should have form fields

Re: Closing a particular section of a Pyramid site

2013-01-15 Thread Jonathan Vanasco
I let the load balancers / web servers handle this. Entering "maintenance mode" just creates a "downtime" file... `touch /webserver/controls/downtime` Leaving maintenance removes it. My nginx config handles app requests differently based on the presence of these files. On Tuesday, January

Re: Storing long-term cookies as well as sessions?

2013-01-16 Thread Jonathan Vanasco
what kind of data ? what kind of application ? i've done things like this under pyramid: - store long-term 'cached' data in the database , keyed to a userid in the session. refresh that into the session if the user is logged in, but that key is not present. ( also save it whenever the values

thank you for pyramid.events.BeforeRender

2013-01-17 Thread Jonathan Vanasco
i was going crazy trying to figure out how to standardize a cache priming function for my templates. this should do the trick. thank you! -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To view this discussion on the web visit https://grou

Re: thank you for pyramid.events.BeforeRender

2013-01-18 Thread Jonathan Vanasco
On Jan 17, 11:43 pm, Mike Orr wrote: > Another idea I accidentally came up with is to put utility methods in > the base view class, which you can call as 'view.foo()'. It's neater > than making an API object in BeforeRender, and it also allows views to > call the exact same code if they need to

only running specific unit tests ?

2013-01-23 Thread Jonathan Vanasco
does anyone have a suggestion on how to (re)structure my tests packages/modules so i can use the --test-suite=NAME argument to setup.py ? -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons-discuss@googl

Re: only running specific unit tests ?

2013-01-23 Thread Jonathan Vanasco
i should add... originally my structure was: MyApp/myapp/tests now i have: MyApp/myapp/tests MyApp/myapp/tests_a MyApp/myapp/tests_b and i run like python setup.py test --test-suite=myapp.tests_a the problem is that i feel like i'm duplicating a lot of the setup across these m

how do others handle SqlAlchemy / etc maintenance in your Pyramid apps ?

2013-01-24 Thread Jonathan Vanasco
I've had to run a few 'maintenance' routines on one of my apps : - we changed a few db fields - we needed to clear the cache - the functions that created some db field data were updated, so everything needed to be tested for compliance and possibly regenerated i couldn't figure out a good way to h

Re: how do others handle SqlAlchemy / etc maintenance in your Pyramid apps ?

2013-01-25 Thread Jonathan Vanasco
On Jan 24, 10:40 pm, Michael Merickel wrote: > http://docs.pylonsproject.org/projects/pyramid/en/1.4-branch/narr/com... > > Not sure what else to say here.. your use case is why p.paster.bootstrap > exists. I had no idea it exists. It's exactly what I needed. I missed the changelog on this 2

Re: how do others handle SqlAlchemy / etc maintenance in your Pyramid apps ?

2013-01-25 Thread Jonathan Vanasco
On Jan 25, 1:46 am, Andreas Jung wrote: > I think using "alembic" seems to be the way to go for > upgrading/downgrading database schemas. It is the best for database schema migrations. But our maintenance largely has to do with internal functions changing how/where things are stored. A few it

what could cause a BeforeRender event to fire 8 times ?

2013-01-25 Thread Jonathan Vanasco
things were looking weird in my dev environment as I worked on a cache primer. when i was inspecting the request.pathinfo, i noticed that it was repeating a bit so i just tried an incremental test... and i seem to get '8' as a magic number. does anyone know why this would run 8 times ? config.

Re: what could cause a BeforeRender event to fire 8 times ?

2013-01-25 Thread Jonathan Vanasco
thanks all - it was the debug_toolbar that drove me #(%* crazy. @chris - templates do call many other templates. i use a lot of mako includes, inherits, partials. but they're not to blame! -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To

Re: Raw SQL with Bind Parameters

2013-01-26 Thread Jonathan Vanasco
http://docs.sqlalchemy.org/en/rel_0_8/orm/tutorial.html?highlight=raw%20sql#using-literal-sql >>> session.query("id", "name", "thenumber12").\ ... from_statement("SELECT id, name, 12 as " ... "thenumber12 FROM users where name=:name").\ ... p

Re: Looking for something similar to Oesjkit

2013-01-26 Thread Jonathan Vanasco
You should be able to do that with selenium, which has python bindings. On Jan 26, 11:06 am, tonthon wrote: > Hi, > > I'm looking for some feedback on javascript testing tools. > I'd like to test basic dom manipulation and integrate it as much as > possible with py.test. > Oesjkit looks to what

Re: Hand off time-consuming task to other thread/process/application/coroutine...?

2013-01-28 Thread Jonathan Vanasco
I don't think you'd necessarily need to use celery/redis/etc for this. No matter what you use to fetch the remote system data , you'll need to implement a user pattern like this: 1. User loads the web page , which is 'blank' with a loading message 2. The web-page fires a javascript call to an API

Re: Calling get_current_registry() during Pyramid startup

2013-01-29 Thread Jonathan Vanasco
On Jan 29, 4:45 am, Andreas Kaiser wrote: > On 29.01.2013, at 09:24, Andreas Jung wrote: > > However when I call this method during the startup phase > > from the main() method of my app then 'settings' evaluates to None. > > You should almost never use pyramid.threadlocal.get_current_registry(

Re: Hand off time-consuming task to other thread/process/application/coroutine...?

2013-01-29 Thread Jonathan Vanasco
On Jan 29, 3:26 am, Maarten De Schrijver wrote: > Now, in my idea: wouldn't it be better, in the second step (page 2) to > just immediately persist the user submitted data to the SQLite database to > allow the user to continue the flow and to hand off the connection to the > remote CRM to anoth

Re: Moving from Beaker SessionMiddleware to pyramid_beaker

2013-02-07 Thread Jonathan Vanasco
what are you using to manage sql connections in your app ? i dropped pyramid's transaction management and went with my own solution - which registers a db cleanup routine via a tween. depending on how your connections are managed, you might be missing a cleanup. please post the fix when you figur

Re: Moving from Beaker SessionMiddleware to pyramid_beaker

2013-02-07 Thread Jonathan Vanasco
hm, i'm looking at the ext source ( https://github.com/bbangert/beaker/blob/master/beaker/ext/database.py ) and the files mike noted as well. i likely missed something, but I don't see anything in the ext.backend or pyramid_beaker that handles closing connections, and it looks like very rudimenta

Re: Moving from Beaker SessionMiddleware to pyramid_beaker

2013-02-08 Thread Jonathan Vanasco
> I never did because the data disappears if you reboot the server and users > get annoyed if their session gets dropped in the middle or they have to log > in again FWIW - to get around that , I use an autologin routine... 1. I set an autologin cookie for anywhere from 1-30 days ( 1 if I d

Re: Moving from Beaker SessionMiddleware to pyramid_beaker

2013-02-08 Thread Jonathan Vanasco
On Feb 8, 12:33 pm, Michael Merickel wrote: > Encryption is all well and good but I'm not sure I'll trust encryption in a > library called "insecure_but_secure_enough". :-P i think its best to be upfront with the shortcomings of technology in general! if you spin up a few AWS instances, you can

Re: Worker models of Pyramid/dealing with long running requests

2013-02-14 Thread Jonathan Vanasco
are the requests random, or are they localized to several routes/views/ functions ? -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@

Re: Worker models of Pyramid/dealing with long running requests

2013-02-14 Thread Jonathan Vanasco
> Very localized to a particular route. most people create a separate backend to handle the specific routes. that usually handles the problem. one application configuration is dedicated to the 'heavy lifting' url patterns, keeping the other backend from being slowed down. the last reply by Arndt

has anyone replaced the default json renderer with a custom one ?

2013-02-19 Thread Jonathan Vanasco
I can't seem to get this working. I've tried a handful of approaches based on the docs, but it hasn't worked yet. If anyone has done this already , would you mind sharing your code and setup ? -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group.

Re: has anyone replaced the default json renderer with a custom one ?

2013-02-19 Thread Jonathan Vanasco
thank you! i'm installing one to deal with datetimes too! -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post

Re: has anyone replaced the default json renderer with a custom one ?

2013-02-23 Thread Jonathan Vanasco
this is really great, thank you!! i don't know if you wrote an @jsonp renderer, but I adapted yours... def jsonp_renderer_factory(info): def _render(value, system): value = py2json(value) request = system.get('request') if request is None: return value

Re: Pyramid web-app and accounting, tracking/limit user navigation on the website

2013-02-25 Thread Jonathan Vanasco
- Stash a "session_start" timestamp in the session - At the start of every request, run a function to check the "session_start" timestamp against `now`. if your criteria is met, you can invalidate the session, update the database, and redirect the user. depending on how you set up your requests,

Re: Pyramid web-app and accounting, tracking/limit user navigation on the website

2013-02-26 Thread Jonathan Vanasco
With digital media you can run a companion ajax call to 'ping' the server every n seconds - but that isn't very secure. that method is largely used for performance and audience analytics. if you want to 'securely' track video streams, you'd need to do that within the server that is serving them -

Re: Handling Current Page in Navigation Bar in Chameleon Templates

2013-02-27 Thread Jonathan Vanasco
FWIW- I've found the easiest way to handle any elements that have 'active' items like this, is to create an attribute safe object , Pylons style : class TabbedObject(object): def __getattr__(self, name): try: return object.__getattribute__(self,name)

Re: Handling Current Page in Navigation Bar in Chameleon Templates

2013-02-27 Thread Jonathan Vanasco
On Feb 27, 2:19 pm, Malthe Borch wrote: > In Chameleon, which implements its own dialect of TAL, we have the > pipe operator ("|"): oh that's great. I used to LOVE tal. it was my favorite. I only left it for Mako because of Pylons. Then I got hooked. -- You received this message because y

Re: Ann: New release - Nive cms

2013-02-28 Thread Jonathan Vanasco
ha, it looks like we're working on some similar concepts ;) Have you ever seen the CQ5 system from Day Software, later named "Adobe Digital Enterprise Platform" ? If not, you should take a look at it. It uses a similar concept of "sidekick" dhtml windows , and various content containers. -- Yo

Confused by Pyramid Events

2013-02-28 Thread Jonathan Vanasco
I'm trying to make sense of some events as they relate to subscribers... I keep wondering exactly why do the events have different interfaces? BeforeRender has a dictionary-like interface, whereas NewResponse is object-attribute based. Aside from that -- these docs just aren't resonating with m

Re: Pylons application maintenance

2013-03-03 Thread Jonathan Vanasco
thankfully, i'm nearly out of the deep , dark Pylons hole. ( no offense, ben ) only one startup that i'm advising uses Pylons, my new company is on Pyramid, and all my consulting projects are now on the business or product side ( oh, my life is so much easier now! ) when helping that one com

Re: Restrictions in named grouped

2013-03-05 Thread Jonathan Vanasco
1. Pylons 0.10 is not really a production release, it was released as a tool for helping migrate projects <1.0 to 1.0. ( http://docs.pylonsproject.org/projects/pylons-webframework/en/latest/upgrading.html ) 2. The current version of Pylons is 1.0.1 , you should upgrade to at least that. 3

Re: Unpacking and using Pyramids without installing?

2013-03-05 Thread Jonathan Vanasco
1. you're adding '/pyramid-1.4/pyramid' to the sys.path. that's looking at the root of your entire system, not the the root of your project. 2. ruby has something called 'bundler' , which basically automates virtualenv + pip + routes, or lets you create a "vendor" directory where you can distr

Re: Restrictions in named grouped

2013-03-06 Thread Jonathan Vanasco
if you're on 0.10 and not having any deprecation warnings , you should be able to switch over to 1.0 without any changes to your code. you just upgrade the pylons core to 1.0/1.01 I believe the 0.10 branch has a lot of extra code that allows for some pylons 0.9.7 idioms to work in the 1.0 envi

Re: Restrictions in named grouped

2013-03-07 Thread Jonathan Vanasco
Glad you ran into this issue -- I've run into this one before too, and couldn't remember it last week in the "maintenance notes thread". This reminded me! ( and - sorry that it caused you problems ) Pylons' setup.py has this in install_requires: WebOb>=1.1.1 If you do an easy_install/pip up

Re: Pylons application maintenance

2013-03-07 Thread Jonathan Vanasco
Via another thread, I also remembered this issue... Pylons' setup.py has this in install_requires: WebOb>=1.1.1 If you do an easy_install/pip upgrade , it'll fetch the most recent WebOb -- which is in the 1.2 or 1.3 branch Unfortunately, in WebOb 1.2a1 , there was this deprecation... https://

Re: Restrictions in named grouped

2013-03-11 Thread Jonathan Vanasco
On Thursday, March 7, 2013 11:33:06 PM UTC-5, Pinakee Biswas wrote: > > Hi Jonathan, > > Now we are facing compatibility issue with Toscawidgets (with Pylons > 1.0.1). The version for Toscawidgets is 0.9.9. Following is the error: > I don't know versions of ToscaWidgets are compatible with Pylo

Re: Sending email as a separate service

2013-03-19 Thread Jonathan Vanasco
reading your question... are you using a commandline interface/script for the nightly task ? > > http://docs.pylonsproject.org/projects/pyramid/en/1.4-branch/narr/commandline.html after initiating the bootstrap, it would be just a few lines of logic to handle your work -- and it all would

Re: Sending email as a separate service

2013-03-19 Thread Jonathan Vanasco
On Tuesday, March 19, 2013 2:31:09 PM UTC-4, Vincent Catalano wrote: > > I am not using a commandline interface. I ended up creating a new > APScheduler instance from within the applications main() function. That > way, the scheduled service will run only when the server is running. It is > in t

Re: Syncing files between local and remote pyramid-app - anything built-in?

2013-03-21 Thread Jonathan Vanasco
what about using `rsync` on the command line ? -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this gro

Re: Syncing files between local and remote pyramid-app - anything built-in?

2013-03-21 Thread Jonathan Vanasco
On Mar 21, 5:42 pm, Whit Morriss wrote: > or git + rsync if you need a history. that's really smart! -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons

Re: Syncing files between local and remote pyramid-app - anything built-in?

2013-03-21 Thread Jonathan Vanasco
you could do a command-line pyramid tool that runs on a crontab and wraps the rsync + cleanup routines. -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-

Re: Syncing files between local and remote pyramid-app - anything built-in?

2013-03-21 Thread Jonathan Vanasco
On Mar 21, 7:15 pm, Christian Benke wrote: > Hu? What's your idea about? > > The sync will be started by user-input. It's a local webinterface used > for publishing to a public website - when a internet connection is > available... You can "bootstrap" pyramid onto the command line ( http://docs

Re: Pyramid Books Published by O'Reilly

2013-03-25 Thread Jonathan Vanasco
1. I'd agree that the current docs are great. I wonder what a book would be. 2. fwiw, friends who have written/edited tech books have said this: you basically get paid nearly nothing / a vanity fee for your book. it works out to less than minimum wage. the terms get better as you work with a pu

<    2   3   4   5   6   7   8   9   10   11   >