Re: Django Tutorial #5 Testing: return Poll.objects.filter( SyntaxError: 'return' outside function

2014-09-16 Thread Andy McKay
You've got a syntax error in your code, likely wherever you have "return Poll.objects.filter(" in your code. "Outside a function" likely means that you have not correctly indented your code, for example if your return has no indentation. Whitespace in Python is significant and is part of the

Re: memcached and redis

2014-03-01 Thread Andy McKay
On Sat, Mar 1, 2014 at 12:39 PM, Andreas Kuhne wrote: > The main difference is that you can use redis as a session cache for > django (save the session objects to memory instead of the database), which > I haven't found a solution for memcache yet. > Memcache works

Vancouver Python Day - Tickets on sale Friday

2013-10-23 Thread Andy McKay
We're pleased to announce that tickets for Vancouver Python Day will be released on Friday, October 25 at 10AM. You can purchase tickets at http://vanpyday.eventbrite.com/ Space is extremely limited, so we advise buying your tickets as early as possible if you plan to attend. Thanks to our

Django Software Foundation minutes

2013-10-14 Thread Andy McKay
Just wanted to make people aware that each month the board of the Django Software Foundation meets. The minutes of each meeting are published here: https://www.djangoproject.com/foundation/records/ If there's anything you'd like discussed at the next board meeting, please contact us at:

Vancouver Python Day - Talk Proposal Deadline

2013-10-14 Thread Andy McKay
Hi Djangonauts! We've just set the deadline for Vancouver Python Day talk proposal submissions. All talk proposals must be submitted by *Thursday, October 17, 2013 at 23:59 Pacific Time*. See https://github.com/andymckay/vancouver-python-day for instructions on submitting a talk proposal. All

Vancouver Python Day

2013-09-30 Thread Andy McKay
The Vancouver Python User Group and the Vancouver Django Meetup Group are pleased to announce: Vancouver Python Day Saturday, November 16, 2013 SFU Harbour Centre Part of Vancouver Developer Week 2013, Vancouver Python Day is a one-day mini conference celebrating the Python Developer Community

Re: Passing variables to css file in django

2013-08-25 Thread Andy McKay
Any string can be rendered as a template. This is covered pretty well in the docs: https://docs.djangoproject.com/en/dev/ref/templates/api/ For example: >>> from django.template import Context, Template >>> t = Template("body { background-color: {{ bgcolor }} }") >>> c = Context({'bgcolor':

Re: Friendship model

2013-08-08 Thread Andy McKay
On Thu, Aug 8, 2013 at 12:41 PM, Robin Lery wrote: > How do i create a Friendship model? Please guide me. > You would need to provide more detail to get much help. The tutorial covers how to make models: https://docs.djangoproject.com/en/dev/intro/tutorial01/ -- You

Re: how do I run a django script from command line or Pycharm?

2013-03-12 Thread Andy McKay
On Tue, Mar 12, 2013 at 5:42 PM, frocco wrote: > I want to run the code below in a file called migration.py django-extensions will do this for you, if you create a run method. http://blog.brendel.com/2012/01/how-to-use-djangextensions-runscript.html -- You received this

Re: Benchmarking and timing DB transactions in Django

2013-03-03 Thread Andy McKay
On Feb 22, 2013, at 3:18 AM, R R wrote: > I was wondering if there are any tools to benchmark DB transactions using the > Django ORM. I'm using PostGreSQL with Django 1.4. I'm required to compare and > come up with the best possible database design for a project which

Re: Can a method call inside save() display its return on template?

2012-07-20 Thread Andy McKay
> cursor.execute("SELECT > GetDirectionDescr("+str(nod_id1)+","+str(nod_id2)+") from sys.dual") Please note that code means that you might be open to SQL injection. You should be using the parameters for SQL, see:

Re: Render time

2012-07-05 Thread Andy McKay
> Thanks Andy. Super cool, and pretty much just what I was looking for. > Seems to work fine in FF and Chrome, but in Safari I don't seem to > have access to the performance.timing data. Should that be there or do > I have do something to load or enable it? Sadly, Safari does not support this :(

Re: Render time

2012-07-05 Thread Andy McKay
> I'm trying to use the Navigation Timing package to measure how long a > page takes to be rendered. So you don't want to include all the lookups? Just the "rendering" part? > So that would be loadEventEnd-responseEnd, > however I am finding that loadEventEnd is always 0 for me, even though > I

Re: Render time

2012-06-25 Thread Andy McKay
> Now they want me to add to that how long > the browser takes to render the page after it gets the data. You can use the navigation timing API: https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html We use this in conjuction with graphite and django-statsd to produce

Re: Off-line Django apps / Caching and synchronizing data

2012-05-24 Thread Andy McKay
> Somehow create a standalone django app that is the same as the online one > and then have it synchronize when it goes back online. Something ala Google > Gears / HTML5. But not done anything like this and I'm not sure how > complicated the synchronizing would be and I'm reluctant to roll out

Re: Different urls.py file for different apps

2012-05-22 Thread Andy McKay
Use include to pull in values from other apps inside your urls.py https://docs.djangoproject.com/en/dev/topics/http/urls/#including-other-urlconfs On Tue, May 22, 2012 at 11:49 AM, siddharth56660 wrote: > Hi, > I am developing an ERP system which is vast and covers

Re: How do you write a django model that can crunch numbers and automatically populate another field with results?

2012-05-08 Thread Andy McKay
You can hook into the model signal so that when the model changes, you do you calculation and change your models. https://docs.djangoproject.com/en/dev/ref/signals/#django.db.models.signals.post_save -- You received this message because you are subscribed to the Google Groups "Django users"

Re: Django - Worldwide Developer Rates - Hourly Income - location and project duration specific

2012-05-05 Thread Andy McKay
> A plumber is mostly manual labor which will take a toll on the body over the > years. Programming too takes its toll on the body over time (make sure you have a nice ergonomic setup). The relentless march of technology means that the length of a programmers career is shorter than many jobs,

Re: restarting a django development server

2012-04-23 Thread Andy McKay
Change your code so you don't have to. Relying on a restart for that is the wrong approach. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send

Re: High Traffic

2012-04-16 Thread Andy McKay
Run django debug toolbar, see what queries you are running and how long they take and that you've got database indexes set up. Failing that, run a middleware or other logging tool to tell you slow pages. Then test with django debug toolbar. Rinse and repeat. -- You received this message because

Re: Problems extracting valid form data lately

2012-04-15 Thread Andy McKay
What does your form code look like? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com.

Re: mocking out a Model

2012-04-14 Thread Andy McKay
> @patch('apps.market.models.House') Is create house in apps.market.models, or is it somewhere else? If it's somewhere else, mock it relative to that file eg: @patch('apps.some_file.House') > I'm also wondering if it's possible to inspect MockedHouse to see if it has > for example some tags

Re: PythonScript(Zope) like in a django app, any tips?

2012-04-14 Thread Andy McKay
Em sábado, 14 de abril de 2012 14h19min01s UTC-3, Andy McKay escreveu: >> >> That's not something I'd ever recommend an untrusted user do. There >> are still many ways that could go wrong. The safest execution >> environment I've seen for Python is App Engine, send a callback to

Re: PythonScript(Zope) like in a django app, any tips?

2012-04-14 Thread Andy McKay
That's not something I'd ever recommend an untrusted user do. There are still many ways that could go wrong. The safest execution environment I've seen for Python is App Engine, send a callback to that instead :) -- You received this message because you are subscribed to the Google Groups

Re: How to add audio to a Django based webpage?

2012-04-04 Thread Andy McKay
On Wed, Apr 4, 2012 at 12:50 PM, Homer wrote: > Should I add something else so that it would work? Thanks for your help! There's nothing I've seen yet that's a Django problem. Does the outputted HTML look right? Does that work? If not tell us and we'll see if we can help you

Re: Sorting the output of regroup

2012-03-10 Thread Andy McKay
> Any idea what is the best way to accomplish this? Sort the list in Python in your view. Its easier to do, easier to test and easier to maintain. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Question on unknown error

2012-02-26 Thread Andy McKay
You can return whatever you want. All depends how you are using the result. On Sun, Feb 26, 2012 at 5:48 PM, Stanwin Siow wrote: > It's ok guys! > > > I figured out the error. > > At the end of the method we were returning 0 and 1 that will throw the > error. > > Is

Re: Question on unknown error

2012-02-26 Thread Andy McKay
Please give us the full traceback and exact line of code it occurred on. There isn't enough information right now. On Sun, Feb 26, 2012 at 1:38 PM, Mario Gudelj wrote: > In print 'time' what's time? Should you not have print exp_datetime? > > > On 27 February 2012 01:27,

Re: User .get_all_permissions() vs. .has_perm() inconsistency

2012-02-10 Thread Andy McKay
On Fri, Feb 10, 2012 at 4:01 PM, dslowik wrote: u.get_all_permissions() > set([u'wb.delete_libraryitem', u'wb.change_libraryitem']) u.has_perm("wb.change_libraryitem") > True > > ...Shouldn't that be False? Why would it be False? get_all_permissions: Returns a set

Re: Speficy a Database for Testing

2012-02-08 Thread Andy McKay
You can define a custom test runner to do this. For example: https://docs.djangoproject.com/en/dev/topics/testing/#django.test.simple.DjangoTestSuiteRunner.setup_databases On Wed, Feb 8, 2012 at 7:42 AM, xina towner wrote: > Yes, but django makes a new testDatabase and

Re: Dynamic settings variables (dynamic global variable)

2012-02-08 Thread Andy McKay
You can define multiple caches: https://docs.djangoproject.com/en/1.3/topics/cache/#django-s-cache-framework You could then use a file system cache or your own local memcache. https://docs.djangoproject.com/en/1.3/topics/cache/#filesystem-caching You can then get that cache and access it in

Re: Django (and Python) speakers

2012-02-08 Thread Andy McKay
> The Django crowd seems to prefer PostgreSQL collectively, but I know > there are a million sites out there using MySQL, so that would > probably resonate with people. Sort of the "frank Wiles of the mySQL > world"? +1 on good MySQL speakers, whilst its not preferred by many, its very under

Re: Checking template

2012-02-06 Thread Andy McKay
On Mon, Feb 6, 2012 at 9:04 AM, xina towner wrote: > How can I  check the template of a view?? .. >         self.assertTemplateUsed(resp, 'name_of_the_template', 'Bad > Template') Yes, the docs on assertTemplateUsed are at:

Re: reverse() with keyword argument driving me batty

2012-01-12 Thread Andy McKay
On Thu, Jan 12, 2012 at 9:50 AM, John DeRosa wrote: >       url(r'^results/text/(?P)/$', 'textresults', > name='exporttextresults') One guess, you haven't specified what the (?P in your regex accepts. For example: (?P\w+) -- You received this message because you are

Re: How to get current session user in models.py?

2012-01-03 Thread Andy McKay
On Mon, Jan 2, 2012 at 12:25 PM, Waldek Herka wrote: > c) local threading way posted by you is not as straight > forward as it looks - I'd say it's very similar in complexity to > mine.. you still need to explicitly call 'activate' somewhere(view > method)

Re: How to get current session user in models.py?

2012-01-02 Thread Andy McKay
Inspecting your stack to find the user seems a pretty convoluted way to do it. You could either a) not access users in your models b) explicitly pass the user around or c) just place your user into a local threading and retrieve it anywhere else for example:

Re:Field available via Django shell but not via web application (crossposted from StackOverFlow)

2011-11-01 Thread Andy McKay
Is this using the Django built in runserver or some other way of serving pages? If not try using runserver. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from

Re: Signals and listeners defined in a separate modules unusable in other apps

2011-10-09 Thread Andy McKay
n't being imported. Stick a print statement in the module to confirm this is the case. If so, import them. -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, s

Re: Question about Signals and Bootstrap

2011-10-09 Thread Andy McKay
So relax, don't worry about it. Instead give each signal a unique dispatch_uid: https://docs.djangoproject.com/en/dev/topics/signals/#preventing-duplicate-signals This makes disconnecting signals easier as well. -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You received this mess

Re: PayPal Adaptive Payments

2011-10-09 Thread Andy McKay
debase is rather big so might be hard to follow, but the key PayPal stuff is here: https://github.com/jbalogh/zamboni/blob/master/apps/paypal/__init__.py It doesn't answer your question, but gives you something to look at ;) Cheers. -- Andy McKay a...@clearwind.ca twitter: @andymckay -

Re: Create socket server in django

2011-09-19 Thread Andy McKay
You could write a Python process that starts up a Socket Server and imports all the Django stuff, just like the current server does for HTTP. Then there's no need to "send the data to django". Might help: http://docs.python.org/library/socketserver.html On Mon, Sep 19, 2011 at 2:00 PM, Micke

Re: Can I write tests for 3rd party url shortener?

2011-09-02 Thread Andy McKay
On 2011-09-02, at 4:58 AM, Yaşar Arabacı wrote: > > Is there a way to test whether or not a 3rd party url shortener works. What I > have in mind is this: Sure, python has libraries like urllib for dong that sort of thing. http://docs.python.org/library/urllib.html -- A

Re: configuration field

2011-09-02 Thread Andy McKay
don't involve parsing the entire tree, as far as I remember: http://docs.python.org/library/markup.html But I would take the XML and store the bits you need in a more efficient format. -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You received this message because you are subs

Re: can django be used in destop application?

2011-08-23 Thread Andy McKay
On 2011-08-23, at 4:17 AM, smith jack wrote: > i mean not use django for web site development, but for desktop application, > it seems its orm can be used in destop application, isn't it? Yes. -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You received this message becau

Re: message mark_safe and redirect results in message still showiing with encoded tags

2011-08-23 Thread Andy McKay
ello', 'safe':True} and then cope with it when you deserialize. -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsub

Re: models.URLField does not validate a valid url

2011-08-22 Thread Andy McKay
out on HEAD requests" Sounds like similar is happening here. -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegrou

Re: message mark_safe and redirect results in message still showiing with encoded tags

2011-08-22 Thread Andy McKay
stores it. Then when read it does the reverse turning it back into a string. You'll have either to alter that behaviour or find another way around. [1] https://code.djangoproject.com/browser/django/trunk/django/utils/safestring.py#L89 -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You re

Re: anybody using PhoneGap with Django

2011-07-07 Thread Andy McKay
On 2011-07-07, at 2:22 PM, John Fabiani wrote: > I'm wondering if anyone has had any success with PhoneGap and Django? Yes. -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You received this message because you are subscribed to the Google Groups "Django users" g

Re: How to use the django-users mailing list properly and doing your homework..

2011-07-06 Thread Andy McKay
hen they are longer around - IRC will still be there :) The #django IRC channel and all the other channels for all the other projects (celery, gevent, postgres, mysql etc) can be great. I'd recommend them as a great help channel to everyone. -- Andy McKay a...@clearwind.ca twitter: @andymc

Re: Unit-Testing Dilemma

2011-06-21 Thread Andy McKay
check that under different conditions it is called correctly. -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@

Re: Open source Django websites

2011-06-21 Thread Andy McKay
> "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en.

Re: Synchronize method or model field access

2011-05-25 Thread Andy McKay
p://ask.github.com/celery/getting-started/introduction.html -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegro

Re: NoReverseMatch while rendering

2011-05-25 Thread Andy McKay
while rendering: Reverse for 'profile_detail' > with arguments '('',)' and keyword arguments '{}' not found. Hence it can't find the matching url. -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You received this message because you are subscribed to the Google Groups "Djang

Re: Inverted checkbox value in modelForm field for BooleanField?

2011-05-14 Thread Andy McKay
): def __init__(self, *args, **kw): kw['instance'].click_through = True super(MyForm, self).__init__() -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You received this message because you are subscribed to the Google Groups "Django users" group. To p

Re: [help]django's FloatField can't insert the mysql's double type data.

2011-05-14 Thread Andy McKay
els/fields/#floatfield Not sure off the top of my head why you get that error though. -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: [help]django's FloatField can't insert the mysql's double type data.

2011-05-14 Thread Andy McKay
> Exception Type: TypeError at /admin/main/learndjango/add/ > Exception Value: 'float' object is not callable Please paste your model that is having the problem. -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You received this message because you are subscribed to the

Re: [Django] Error (EXTERNAL IP): /add_comment/10/

2011-05-07 Thread Andy McKay
odeDecodeError: 'ascii' codec can't decode byte 0xe2 in position > 41: ordinal not in range(128) There's some helpful information on this error from Google, here's one of them: http://wiki.python.org/moin/UnicodeDecodeError -- Andy McKay a...@clearwind.ca twitter: @andymckay --

Re: Django password reset modification

2011-05-07 Thread Andy McKay
e are multiple posts on the internet about this. Here's a couple: http://blog.moertel.com/articles/2006/12/15/never-store-passwords-in-a-database http://www.codinghorror.com/blog/2007/09/youre-probably-storing-passwords-incorrectly.html -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You

Re: Django administration page, created a Site -- now what?

2011-05-06 Thread Andy McKay
ib/sites/?from=olddocs The tutorial is a good place to start: http://docs.djangoproject.com/en/dev/intro/tutorial01/ -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this g

Re: Help! Database is locked! Windows developing envrionment, sqlite3, djcelery and djkombu

2011-05-06 Thread Andy McKay
On 2011-05-06, at 7:01 PM, Robert Ray wrote: > I''im using Django 1.3 with Djcelery and Djkombu on Windows7. When I'm > Can anyone give me any help? Thanks in advance! You are using sqlite? Don't use that, use postgresql instead. -- Andy McKay a...@clearwind.ca twitter: @and

Re: selecting all columns from a table (advanced query)

2011-05-05 Thread Andy McKay
model. -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to djang

Re: Hidden rows elements also visible on list filters

2011-05-04 Thread Andy McKay
we are unlikely to be able to help. But here's a bet: http://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.list_filter The example for DecadeBornListFilter shows how you can define a custom queryset and perhaps this will allow you to filter out disabled rows.

Re: removing the source of a OneToOneField relationship

2011-05-03 Thread Andy McKay
On 2011-05-03, at 2:05 PM, Seth Gordon wrote: > I get an exception, complaining that Target.source does not allow > null values. You'll probably want to allow null values on your OneToOne field then: http://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.Field.null --

Re: removing the source of a OneToOneField relationship

2011-05-03 Thread Andy McKay
On 2011-05-03, at 2:05 PM, Seth Gordon wrote: > I get an exception, complaining that Target.source does not allow > null values. You'll probably want to allow null values on your OneToOne field then: http://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.Field.null --

Re: bound form with ModelChoiceField

2011-04-23 Thread Andy McKay
ield back into the object ids. new_dict = form.cleaned_data.copy() new_dict['option'] = new_dict['option'].pk Might work. You should then be able to cleanly store that in a session and repopulate forms with it again later. -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You

Re: bound form with ModelChoiceField

2011-04-21 Thread Andy McKay
oiceField. Since one is a form and one is a field. You can create a ModelForm given a Model and its instance or primary key as outlined here: http://docs.djangoproject.com/en/dev/topics/forms/modelforms/#modelform -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You received thi

Re: Using auth.login() with multiple databases

2011-04-21 Thread Andy McKay
ser database where you can store data particular to you application such as session and profiles since your other databases sound immutable? -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You received this message because you are subscribed to the Google Groups "Django user

Re: checkbox, how to return state back to html

2011-02-03 Thread Andy McKay
to_response('c:/Python27/Scripts/Spokas/web.html', > {'cbSMWord':cbSMWord}, context_instance = RequestContext(request) ) Also, you should not be specifying the full path to templates, let the template loader do that for you. -- Andy McKay a...@clearwind.ca twitter: @andymckay

Re: QUERYDICT immutable

2011-01-29 Thread Andy McKay
response/#httpresponse-objects -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this gro

Re: Word file Display and Save??

2011-01-29 Thread Andy McKay
eField. http://docs.djangoproject.com/en/dev/ref/models/fields/#filefield -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@

Re: "CSRF verification failed" when sending simple GET request using curl

2011-01-19 Thread Andy McKay
n/dev/ref/contrib/csrf/#exceptions -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from thi

Re: Anyone want to take over maintaining Instant Django?

2010-07-13 Thread Andy McKay
and mocked > me when I reported the bug. Is the source for building it in some sort of source control eg: github? -- Andy McKay, @andymckay Django Consulting, Training and Support -- You received this message because you are subscribed to the Google Groups "Django users" group.

Re: python logging and multiple process issue?

2010-07-12 Thread Andy McKay
in logging will be just fine for all but the most complicated of use cases. If you want to do access logging, your web server does that for you. -- Andy McKay, @andymckay Django Consulting, Training and Support -- You received this message because you are subscribed to the Google Groups

Re: Get pk before commit

2010-07-09 Thread Andy McKay
n sync with your files. I would recommend making a UID field on your model (which also doesn't require a transaction) and using that for your filename. -- Andy McKay, @andymckay Django Consulting, Training and Support -- You received this message because you are subscribed to the Google Groups &

Re: News on every page

2010-07-08 Thread Andy McKay
T_PROCESSORS. Middleware is not the appropriate place, a context processor is the appropriate place. -- Andy McKay, @andymckay Django Consulting, Training and Support -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: Parsing xml containing image - rawImage gif

2010-07-05 Thread Andy McKay
ies: http://www.google.ca/search?q=soap+python -- Andy McKay, @andymckay Django Consulting, Training and Support -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. T

Re: Signal emitted after successful login?

2010-06-29 Thread Andy McKay
login django.contrib.auth.login. So you can listen to the save signals on that model. -- Andy McKay, @andymckay Django Consulting, Training and Support -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send em

Re: Django logging

2010-06-23 Thread Andy McKay
og/andy/2268/ etc... Cheers -- Andy McKay, @andymckay Django Consulting, Training and Support -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this

Re: Weekly rss feed

2010-06-21 Thread Andy McKay
he last seven days. -- Andy McKay, @andymckay Django Consulting, Training and Support -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group,

Re: Looking for a Django Developer

2010-05-21 Thread Andy McKay
ng there. http://djangozen.com/jobs is free -- Andy McKay, @andymckay Django Consulting, Training and Support -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To un

Re: Multiple django version on developer machine

2010-05-11 Thread Andy McKay
should look at using virtualenv to isolate your environment: http://pypi.python.org/pypi/virtualenv -- Andy McKay, @andymckay Django Consulting, Training and Support -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: Open source CMS (if based on Django better)

2010-05-07 Thread Andy McKay
u want to do. -- Andy McKay, @andymckay Django Consulting, Training and Support -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this g

Re: multi-language capabilities of Django/Satchmo

2010-04-27 Thread Andy McKay
rface: http://docs.djangoproject.com/en/dev/topics/i18n/ For content this is a great talk from djangoski: http://docs.google.com/fileview?id=0B29qXMz8reouYzJhMjhhZDMtOTQ5MC00NjY3LWIxM2EtY2U3ZmI2NzQzYjk3=en -- Andy McKay, @andymckay Django Consulting, Training and Support -- You received this message

Re: multiple django instances, one database?

2010-04-22 Thread Andy McKay
e can be shared on the same drive, but the > django instances running separately of course (apache/mod_python). > > Is it possible to have two instances accessing the same database? How > do you handle load-balancing? Yes you can. There's lots of options, http://www.apsis.ch/pound/ is but one.

Re: Working for a startup.

2010-04-22 Thread Andy McKay
hem are to do with Rails. -- Andy McKay, @andymckay Django Consulting, Training and Support -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this

Re: DB Adapter for HTML5 Client Database Storage?

2010-04-07 Thread Andy McKay
;) -- Andy McKay, @clearwind Django Consulting, Training and Support -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to dj

Re: How execute erlang code ?

2010-03-11 Thread Andy McKay
and and python): http://code.activestate.com/recipes/534162-an-erlang-port-in-python/ or using the builtin popen functions: http://docs.python.org/library/os.html#os.popen -- Andy McKay, @clearwind -- You received this message because you are subscribed to the Google Groups "Django user

Re: Strange difference between runserver and shell

2010-03-11 Thread Andy McKay
template_name='newssite/writer_archive.html', >template_object_name='stories', Presumably you've used pdb or simple print statements in your code to verify the results that the queryset is empty? After that, look at your templates (this looks like you are using generic

Re: Strange difference between runserver and shell

2010-03-11 Thread Andy McKay
> Does anybody have any clue what the problem might be? Thanks for your help! There should be no difference really between the two. What might help us if you show us the code that the runs from the shell and the code in the view. -- Andy McKay, @clearwind -- You received this message beca

Re: getting request.user from a signal

2010-03-11 Thread Andy McKay
;write a function that accepts a user > argument" untenable. No, but there's lots of other solutions. Marty Alchin solves this nicely with CurrentUserMiddleware: http://bit.ly/9lIxsM I've been wanting to make this into a reusable app for a long time, but the license on that code snippet is

Re: Django marketplace?

2010-03-11 Thread Andy McKay
On 2010-03-11, at 8:50 AM, Tom Evans wrote: > djangogigs.com djangozen.com/jobs as well (and it's free) -- Andy McKay, @clearwind -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: Django in the enterprise?

2010-02-24 Thread Andy McKay
gone extremely well. It's not on djangosites because the NDA denies it. What you might need to consider if you are pitching to management is making sure that training, consulting and support is available from companies (which it is). -- Andy McKay, @clearwind http://clearwind.ca/dj

Re: Optimizing template rendering and database queries

2010-02-23 Thread Andy McKay
> I would like to include the following values on my admin pages, as > part of the base_site: > time_to_query_database > time_to_render_page django-debug-toolbar has all that and more -- Andy McKay, @clearwind http://clearwind.ca/djangoski -- You received this message

Re: Deciding how to start building a search form

2010-02-23 Thread Andy McKay
do full text searches or searches on more than one model at a time, then you will need something like haystack. -- Andy McKay, @clearwind http://clearwind.ca/djangoski -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to thi

Re: Is the user member of a certain group

2010-02-22 Thread Andy McKay
On 2010-02-22, at 2:56 PM, Joakim Hove wrote: > Any tip on how to write the "user_is_member_of_admin_group()" > function? You can access the groups via the ManyRelatedManager, which exposes a queryset: user.groups.filter(...) eg: if user.groups.filter(name="Admin") -

Re: python manage.py test --omit=bad_app_one,bad_app_two

2010-02-17 Thread Andy McKay
levant!) > > How can I knock out a list of apps from the test command line? In the past for this I've defined a custom test runner: http://docs.djangoproject.com/en/dev/ref/settings/#test-runner But I haven't seen anything else that does that. -- Andy McKay, @clearwind http://clea

Re: Dictionary Model Merge

2010-02-15 Thread Andy McKay
or. Without the code that generates that error or the traceback, we can't provide much help. One thing that is useful is model_to_dict, eg: http://www.djangozen.com/blog/useful-django-apis -- Andy McKay, @clearwind http://clearwind.ca/djangoski -- You received this message because you ar

Re: Callback method on session timeout

2010-02-08 Thread Andy McKay
On 2010-02-06, at 4:08 PM, adamjamesdrew wrote: > Does django have the ability to do a callback when a session time out > occurs? No, there is no session time out. Its just that a session isn't valid anymore. -- Andy McKay, @clearwind http://clearwind.ca/djangoski -- You re

Re: Slow admin performance with specific inline

2010-02-08 Thread Andy McKay
Try using the django-debug-toolbar and see if that tells you anything useful. -- Andy McKay, @clearwind http://clearwind.ca/djangoski -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: FieldError with get_object_or_404

2010-02-04 Thread Andy McKay
r, > FieldError: Join on field 'posted_time' not permitted. Did you > misspell 'hour' for the lookup type? There are lookups for year, month and day as documented here: http://docs.djangoproject.com/en/dev/ref/models/querysets/#year But *not* hour or minute. -- Andy McKay, @clearwind http://clea

  1   2   >