automated unit test generation

2013-10-02 Thread skunkwerk
Hi, I've been working on an open source project to auto-generate unit tests for web apps based on traces collected from the web server and static code analysis. I've got an alpha version online at www.splintera.com, and the source is at https://github.com/splintera/python-django-client. I'

Re: pdb doesn't break in django

2009-11-03 Thread skunkwerk
m a set_trace() > but sometimes I'd rather not edit the source code, especially on a > shared server, and it's > a pain to create a dummy module with a set_trace() and the call to the > target function.] > > Bill > > On Fri, Oct 30, 2009 at 1:11 PM,skunkwer

pdb doesn't break in django

2009-10-30 Thread skunkwerk
Hi, i've been trying to use pdb inside my django code, but it never breaks the program flow. I insert this into my code: import pdb pdb.set_trace() but it just continues execution - is there something i need to be doing? thanks! --~--~-~--~~~---~--~~ You rece

Re: fixture fails to load in test case, but works with loaddata

2009-09-24 Thread skunkwerk
ue must be either True or False. how can i figure out which value is messed up? thanks On Sep 24, 12:25 pm, skunkwerk wrote: > Hi, >    I created a database dump using the 'dumpdata' command, and when I > but am getting this error when I add the line: > fixtures = ['test_f

fixture fails to load in test case, but works with loaddata

2009-09-24 Thread skunkwerk
Hi, I created a database dump using the 'dumpdata' command, and when I but am getting this error when I add the line: fixtures = ['test_fixture-24.09.09.json'] to my TestCase class: Problem installing fixture '//ites/bdl/match/trunk/python/bdl_site/ match/fixtures/test_fixture-24.09.09.json':

testing with different settings

2009-09-23 Thread skunkwerk
Hi, I've been using the built-in django test suite, but need a way to somehow specify a different settings file or a configuration variable from the settings file, when the tests are run. Sort of similar to how django automatically changes the DATABASE_NAME setting - how does it actually do t

getting local variables in custom exception middleware

2009-04-27 Thread skunkwerk
Hi, i've been using django-db-log for logging exceptions when Debug=False, and I'd like to add the ability to log the local variables as well. Here is what I tried: def process_exception(self, request, exception): local_vars = repr(exception.tb_frame.f_locals.items()) however, tb_frame

error handling

2009-04-07 Thread skunkwerk
Hi, is there any way to log errors (regardless of whether Debug is true or false) instead of just displaying a debug trace/emailing the admins? is there some setting somewhere, or would I have to write some additional code like this: http://www.djangosnippets.org/snippets/639/ to get it workin

Re: mod_python error

2009-04-07 Thread skunkwerk
problem solved - i needed to refresh the page in my browser to see the debug log. thanks! On Apr 7, 1:59 am, Florian Strzelecki wrote: > And... what about that : > > DocumentRoot:   '/usr/local/apache2/htdocs' > > URI:            '/contact.php' > Location:       '/' > Directory:      None > Fil

Re: mod_python error

2009-04-07 Thread skunkwerk
thanks guys, the error isn't just with .php pages so i don't think that's the problem. i've turned on debug mode, and put back 500.html, but I'm not seeing a debug page... just the 500 page template with no tracebacks or anything. how do i see the regular django debug page? On Apr 7, 1:59 a

mod_python error

2009-04-06 Thread skunkwerk
Hi, i've been trying to figure out why i'm getting this error (i removed the 500.html template to view the traceback, but am not sure what's causing the unhandled exception in the first place). any ideas? thanks MOD_PYTHON ERROR ProcessId: 10894 Interpreter:'domU-12-31-39-03-BD-34.

fastcgi crashing

2008-06-03 Thread skunkwerk
django's been working great for me thusfar, but a few days ago i noticed the server started to go down intermittently - there was nothing in my django log file that indicated a fatal error, and my lighttpd log file only stated that the fastcgi process had died... here's how i'm starting fastcgi (

Re: newforms custom field attribute

2008-05-30 Thread skunkwerk
k outhttp://www.djangoproject.com/documentation/newforms/ > > On Sat, May 31, 2008 at 9:29 AM, skunkwerk <[EMAIL PROTECTED]> wrote: > > > simple question - how can I add a custom attribute to a form field? > > ie if I have a form like: > > > class SearchForm(forms.Form

newforms custom field attribute

2008-05-30 Thread skunkwerk
simple question - how can I add a custom attribute to a form field? ie if I have a form like: class SearchForm(forms.Form)): query = forms.CharField(max_length=30) i'd like to add a 'title' attribute to the query field. do i have to sublcass or do something fancy? thanks --~--~-~-

Re: regex works in python, not in django

2008-05-23 Thread skunkwerk
thanks! dumb mistake On May 23, 7:42 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Fri, May 23, 2008 at 10:36 PM, skunkwerk <[EMAIL PROTECTED]> wrote: > > > I'm quite puzzled by this... I have a line of code that is supposed to > > strip a vari

regex works in python, not in django

2008-05-23 Thread skunkwerk
I'm quite puzzled by this... I have a line of code that is supposed to strip a variable of any non-alphanumeric characters (such as whitespace): in my python shell, this works fine: >>>key4cache = '!yahoo' >>>re.sub(r"[^A-Za-z0-9]", "",key4cache) 'yahoo' in django, however: logger.debug('key4cac

Re: profiling django with fastcgi & cprofile?

2008-05-02 Thread skunkwerk
t.com/ browser/django/trunk/django/core/handlers/profiler-hotshot.py to work with cProfile instead. what would I replace the ModPythonHandler with (i'm using fastcgi) thanks again On May 1, 11:31 am, skunkwerk <[EMAIL PROTECTED]> wrote: > the page here:http://code.djangoproject.com/w

profiling django with fastcgi & cprofile?

2008-05-01 Thread skunkwerk
the page here: http://code.djangoproject.com/wiki/ProfilingDjango mentions profiling with hotshot & mod_python, or wsgi & cprofile. the stuff here: http://www.djangosnippets.org/snippets/605/ is also for hotshot, not cprofile. i'm not sure how to get this going with fastcgi - which i'm starting

persistence of variable in views.py

2008-04-30 Thread skunkwerk
I have a variable defined by a function call in my views.py that's at the global level at the start of the file (ie is not inside any other function, though the variable is not prefixed by 'global'). As this takes a few seconds to complete, I just wanted to make sure that this function isn't bein

Re: passing form to base template

2008-04-29 Thread skunkwerk
should do the trick, thanks On Apr 28, 7:49 pm, "Ronny Haryanto" <[EMAIL PROTECTED]> wrote: > On Tue, Apr 29, 2008 at 9:33 AM, skunkwerk <[EMAIL PROTECTED]> wrote: > >  I've got two forms included in my base template, from which a few > >  othe

Re: class in models.py 'not defined' exception

2008-04-29 Thread skunkwerk
thanks! that was exactly the problem. after i removed the django-created tables from models.py, it started working again. On Apr 28, 10:57 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Tue, Apr 29, 2008 at 1:31 AM, skunkwerk <[EMAIL PROTECTED]> wrote: > > &

Re: class in models.py 'not defined' exception

2008-04-28 Thread skunkwerk
he error was from): from django.conf.urls.defaults import * from winebago.views import homepage urlpatterns = patterns('', ) am i doing something wrong? On Apr 28, 9:11 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Mon, Apr 28, 2008 at 11:54 PM, skunkwerk <[EMAI

class in models.py 'not defined' exception

2008-04-28 Thread skunkwerk
I've been struggling with this error for the past hour. Error while importing URLconf 'winebago.urls': name 'AuthPermission' is not defined Exception Location: /usr/lib/python2.5/site-packages/django/core/ urlresolvers.py in _get_urlconf_module, line 255 my models.py was generated by: ./manage.p

passing form to base template

2008-04-28 Thread skunkwerk
I've got two forms included in my base template, from which a few others inherit. Currently I'm passing a newly-constructed form to each of the inherited templates in the functions using render_to_response, like so: return render_to_response('contact.html', {'form': form, 'suggform': suggform,

Re: lighttpd & django, fcgi issues

2008-04-07 Thread skunkwerk
7;s working now! is it normal for the fcgi start command to start 4 processes (as seen in htop)? in addition, it didn't start the processes with the correct pid that i specified in a file... thanks On Apr 7, 5:12 pm, "Ramiro Morales" <[EMAIL PROTECTED]> wrote: > On

Re: lighttpd & django, fcgi issues

2008-04-07 Thread skunkwerk
R_PROTOCOL required by WSGI! Status: 500 INTERNAL SERVER ERROR Content-Type: text/html and a bunch of HTML any ideas? thanks On Apr 7, 12:38 pm, Douglas E <[EMAIL PROTECTED]> wrote: > On Apr 6, 11:53 pm,skunkwerk<[EMAIL PROTECTED]> wrote: > > > > > I'

lighttpd & django, fcgi issues

2008-04-06 Thread skunkwerk
I'm having trouble running django with lighttpd (I'm not on a shared host). Here is what I've installed: ubuntu 7.10 lighttpd flup cmemcache python When I go to my web address which maps to the django project directory, all I see is a directory listing, not any django pages. I started fcgi lik