New custom field and widget for admin

2008-11-19 Thread Andy McKay
ound object managers and I'm a bit stumped. Any ideas appreciated, I have a feeling I'm going about it all wrong (wouldn't be the first or last time :). Thanks -- Andy McKay Site: www.clearwind.ca Blog: www.agmweb.ca/blog/andy --~--~-~--~~~---~

Re: referencing style sheets in templates

2008-11-19 Thread Andy McKay
27;ve already done this, or are not using runserver, we would likely need some more information. Cheers -- Andy McKay Clearwind Consulting Site: www.clearwind.ca Blog: www.agmweb.ca/blog/andy --~--~-~--~~~---~--~~ You received this message be

Re: Is it possible to display multiple forms in a single template file?

2008-11-20 Thread Andy McKay
L twice, only one of them will ever be active. Remove one of those of URL's, then merge the two views together and pass both form1 and form2 to the template. -- Andy McKay Clearwind Consulting Site: www.clearwind.ca Blog: www.agmweb.ca/blog/andy --~--~-~--~~

Re: del session variables

2008-11-20 Thread Andy McKay
of: clear() and flush() http://docs.djangoproject.com/en/dev/topics/http/sessions/#topics-http-sessions Sounds like one of those might be helpful. -- Andy McKay Clearwind Consulting Site: www.clearwind.ca Blog: www.agmweb.ca/

Re: Django And os.path Behavior

2008-12-05 Thread Andy McKay
ion you've got a string encoded one way, in another its another. Check those strings encodings are what you expect prior to calling them. -- Andy McKay www.clearwind.ca | www.agmweb.ca/blog/andy --~--~-~--~~~---~--~~ You received this message because

Re: specify widget in "Admin"

2009-01-13 Thread Andy McKay
com/en/dev/ref/contrib/admin/#filter-horizontal -- Andy McKay www.clearwind.ca | www.agmweb.ca/blog/andy --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this grou

Re: Created Form - now code works to edit object but add gets NoneType' object is not callable

2009-01-15 Thread Andy Mckay
model = Survey (add in your import statement so it knows what Survey is). Cheers -- Andy McKay ClearWind Consulting: www.clearwind.ca Blog: www.agmweb.ca/blog/andy --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goo

Re: Suspicious Operation/ filestorage problem

2009-01-19 Thread Andy Mckay
> SuspiciousOperation: Attempted access to '/img/avatars/default.gif' > denied. If i remember, it's because there's a / at the beginning, you probably want a relative path. -- Andy McKay ClearWind Consulting: www.clearwind.ca Blo

Re: Is safe unsafe?

2009-02-23 Thread Andy Mckay
ssion to strip only a few, there's lots of hacks that can be done. I use the SGMLParser in Plone, here's an old one: http://code.activestate.com/recipes/52281/ some googling will probably find you more. -- Andy McKay ClearWind C

Re: Static file serve with prior authentication?

2009-02-23 Thread Andy Mckay
for Apache there is an Authentication handler for mod_python that allows you to authenticate a request for a static file. http://docs.djangoproject.com/en/dev/howto/apache-auth/ Other webservers and tools may vary. -- Andy McKay ClearWind Consulting: www.clearwind.ca Blog: www.agmweb

Re: Is safe unsafe?

2009-02-23 Thread Andy Mckay
On 23-Feb-09, at 2:04 PM, Michael Repucci wrote: > Obviously the latter would > be safer, but there's worth in having the added flexibility, provided > I haven't left a huge hole open. What hole is there to leave open? So they upload a .exe, you aren't executing it a

Re: Is safe unsafe?

2009-02-23 Thread Andy Mckay
served. Then you should really be very sure that your web server is not going to be executing files and will just be serving them. Once you are confident of that, problem removed. -- Andy McKay ClearWind Consulting: www.clearwind.ca Blog: www.ag

Re: How can i access UserProfile from User in the views?

2009-03-17 Thread Andy Mckay
ess Not sure why you'd be using myprofile there where in python you used get_profile. -- Andy McKay Clearwind Consulting: www.clearwind.ca Blog: www.agmweb.ca/blog/andy Twitter: twitter.com/clearwind --~--~-~--~~~---~--~~ You received this mess

Re: How can i access UserProfile from User in the views?

2009-03-17 Thread Andy Mckay
request context then you will get the user available: http://docs.djangoproject.com/en/dev/ref/templates/api/?from=olddocs#django-core-context-processors-auth -- Andy McKay Clearwind Consulting: www.clearwind.ca Blog: www.agmweb.ca/blog/andy Twitter: twitt

Re: including text files with django tags?

2009-03-17 Thread Andy Mckay
On 17-Mar-09, at 7:48 PM, codingJoe wrote: > > > > > I have a text file that I want the user to see in a scrolling text > area? I would recommend reading through the django tutorial on the website, since it shows that this is done in python in views and not in a te

Re: Need two response statements on same def

2009-03-18 Thread Andy Mckay
to def Bypub, but I'm not sure how to write > the statements to combine two responses. You can only send one response to a request, so it can be either HTML or a CSV. -- Andy McKay Clearwind Consulting: www.clearwind.ca Blog: www.agmweb.ca/blog/andy Twitter: t

Re: Signals, sites and instances

2009-03-19 Thread Andy Mckay
s a few different ones)? -- Andy McKay Clearwind Consulting: www.clearwind.ca Blog: www.agmweb.ca/blog/andy Twitter: twitter.com/clearwind --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django user

Re: Need two response statements on same def

2009-03-19 Thread Andy Mckay
ve to remember to make the change in the other > view. A view is just a Python function, you can do whatever you'd normally do to refactor Python to refactor views. So move the 87 lines of duplicated code into another function and re-use. -- Andy McKay Clearwind Consul

Re: Map events in space on a django app

2009-03-19 Thread Andy Mckay
ure Javascript to place the pin on a map. You can see javascript I used for my site on http://www.cleartrain.ca, if you really want to see the code behind the scenes, I can share some with you in private. -- Andy McKay Clearwind Consulting: www.clearwind.ca Blog: www.agmweb.ca/blog/a

Re: Django versioning and backup best practice

2009-03-20 Thread Andy Mckay
long with code is quite a fragile way to go. -- Andy McKay Clearwind Consulting: www.clearwind.ca Blog: www.agmweb.ca/blog/andy Twitter: twitter.com/clearwind --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: TypeError: 'module' object is not callable

2009-06-19 Thread Andy McKay
On 19-Jun-09, at 3:38 PM, db_333 wrote: > File "/Library/Python/2.5/site-packages/django/core/handlers/ > wsgi.py", line 228, in __call__ >self.load_middleware() > File "/Library/Python/2.5/site-packages/django/core/handlers/ > base.py", line 47, in load_middleware >mw_instance = mw_cla

Re: active django battery projects

2009-06-19 Thread Andy McKay
There's also a list of plugins at http://djangozen.com/plugins/ -- Andy McKay www.clearwind.ca On 2009-06-19, at 1:14 PM, notcourage wrote: > > I for one would be interested in replies showcasing django battery > projects underway. As a new django user, I'm stumb

Re: djangoplugables.com is down ?

2009-06-22 Thread Andy McKay
Fortunately there other sites that offer a list of plugins, for example: http://djangozen.com/plugins and http://djapp.org. The former has every plugin from djangoplugables on it. On 22-Jun-09, at 8:25 AM, Dunsun wrote: > > Hi, > > I am not able to access djangoplugables.com. > It has been d

Re: How to make email field unique in model User from contrib.auth in Django

2009-07-21 Thread Andy McKay
anything to do with it, it would be rejected, so don't bother :) -- Andy McKay Clearwind Consulting: www.clearwind.ca Blog: www.agmweb.ca/blog/andy Twitter: twitter.com/clearwind --~--~-~--~~~---~--~~ You received this message because you are

Re: Success at using "reusable apps"?

2009-08-16 Thread Andy McKay
ut of course I would still have to > modify threadecomments to take the callback arg) Or sounds like you could write a signal in your own code. -- Andy McKay Clearwind Consulting: www.clearwind.ca Blog: www.agmweb.ca/blog/andy Twitter: twitte

Re: From a relative noob

2009-08-22 Thread Andy McKay
so you are passing a string which MS SQL doesn't know how to convert. > Is there a reason why you cannot simply do the following? > > Some.object.filter(id = var1).filter(value = > var2).filter(Cost__gt=var4) -- Andy McKay Clearwind Consulting: www.clearwind.ca

Re: Test server and Https

2009-08-22 Thread Andy McKay
On 22-Aug-09, at 7:50 AM, Vitaly Babiy wrote: > Hey, > I am working on a site that part of it must be behind HTTPS, is > there any I can run this using the test server? The built in django server does not do HTTPS. Use Apache or some other server to serve HTTPS -- A

Re: Duplicating objects, avoid signals

2009-08-25 Thread Andy McKay
gozen.com/blog/turning-off-django-signals -- Andy McKay Clearwind Consulting: www.clearwind.ca Blog: www.agmweb.ca/blog/andy Twitter: @clearwind --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users

Re: How to define variables used in every page?

2009-09-02 Thread Andy McKay
Look up template context processors. -- Andy McKay www.clearwind.ca On 2009-09-02, at 7:03 PM, "richardcur...@googlemail.com" wrote: > > Hi, > > I want to use two 'global' variables in all pages. Obviously I don't > want to put the same varia

Re: extending objects.get()

2009-09-03 Thread Andy McKay
On 2009-09-03, at 4:40 PM, dwh wrote: >>>> j = Junk.objects.get(cheese='12345') > > The field cheese isn't part of Junk obviously. You can do anything you want in a custom manager. What cheese is and how possible that is, is up to you. -- A

Re: What happened to djangoplugables.com?

2009-09-03 Thread Andy McKay
On 2009-09-03, at 3:47 PM, Anthony wrote: > It's been down for a while. It's been dead for a while. Fortunately I did spider it many months ago and put it into http://djangozen.com/app. -- Andy McKay Clearwind Consulting: www.clearwind.ca Twitte

Re: Serializing with not just the query data but also some additional columns

2009-09-03 Thread Andy McKay
e value, etc, etc, etc. > > It seems that serialization only really lets you serialize a queryset. It does indeed, you would have to extend the built-in ones with your own serializer. -- Andy McKay Clearwind Consulting: www.clearwind.ca T

Re: Last object of a set?

2009-09-03 Thread Andy McKay
gt; > {{ course.coursepart_set.all.LAST.end_date }} > > kind regards, > > -raymond > > -- Andy McKay Clearwind Consulting: www.clearwind.ca Twitter: @clearwind --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: 'function' object has no attribute 'fields' errror on first access to development server

2009-09-03 Thread Andy McKay
d does not appear in admin. > > > -- Andy McKay Clearwind Consulting: www.clearwind.ca Twitter: @clearwind --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: Can I alter a JS file with Django

2009-03-27 Thread Andy Mckay
eJS > > and in views.py I'd gather some stuff and render a file 'jsFile.js' > into which I've stuffed some things using template tags? > > Is that possible? In short yes, that's pretty much how you'd do it. Just make sure to send the correct mime-t

Re: DjangoBook forms

2009-03-30 Thread Andy Mckay
tted an > empty form" it says: > > Can someone tell me how to fix this or mention why it occurs? Line two merely checks for the presence of the field, not its contents so you probably want (untested) if request.GET.get('criteria'): -- Andy McKay Clearwind Co

Re: Script the New App Process

2009-03-30 Thread Andy Mckay
points. Some like rails give you different commands to generate different parts. I think assuming that it has to be just one particular way is wrong. This has been discussed quite a few times before I believe, so maybe do a bit of googling on that first. -- Andy McKay Clearwind Consu

Re: Auto-populate fields in django?

2009-03-30 Thread Andy Mckay
ger / and manipulator > http://www.b-list.org/weblog/2006/nov/02/django-tips-auto-populated-fields/ > , though am wondering if there is another way around !!! > > -- > Hamza > > > > -- Andy McKay Clearwind Consulting: www.clearwind.ca Blog: www.agmweb.

Re: Search in multiple models

2009-04-03 Thread Andy Mckay
inated. [snip] > > I think this is a fairly common need so... what could I do? Use the content types framework http://docs.djangoproject.com/en/dev/ref/contrib/contenttypes/ eg: http://www.agmweb.ca/blog/andy/2195/ -- Andy McKay Clearwind Consulting: www.clearwind.ca Blo

Reusing fields in forms

2009-06-10 Thread Andy McKay
I've got a bunch of fields in a bunch of forms. Some of those fields repeat themselves. So rather than copy and paste them around, I defined the fields in a module and then imported them. Then pulled them into my forms. All well and good. The problem is that the fields are coming out in the wrong

Re: WebFaction + Django Fixture: Help?

2009-06-17 Thread Andy McKay
On 17-Jun-09, at 12:48 PM, Keyton Weissinger wrote: > backends/util.py", line 19, in execute >return self.cursor.execute(sql, params) > DataError: value too long for type character varying(4) > > > Any ideas? The unhelpful answer is that the field is too long. One way to get this is to hav

Re: Does anyone know what happened to djangopluggables.com?

2009-10-21 Thread Andy McKay
> I've been seeing that for a few months now when trying to visit the site. Before djangopluggables has been dead for many months. Before it went offline, I spidered everything into http://djangozen.com/, its been growing slowly since then. -- An

Re: Making the case for Django (vs. Drupal)

2009-10-31 Thread Andy McKay
the CMS problems. Drupal like most CMS's will allow you to do things the Drupal way quite easily. As soon as you stray from that path, you'll be in trouble. I recommend understanding your audience and the difference in tools and how this affects them. -- Andy McKay www.clearw

Re: how to save a forms.ModelForm with extra fields?

2009-11-12 Thread Andy Mckay
ce and the rating instance (I'll > get the user from the context)? Sure that works just fine. When you save the form, you'll save the restaurant instance. You can then get the rating from the forms.cleaned_data and save that however you'd like. -- Andy McKay @clearwi

Re: Help a Rails refugee - how to do site specific layouts?

2009-11-12 Thread Andy Mckay
7;s always "include" http://docs.djangoproject.com/en/dev/topics/templates/#template-inheritance -- Andy McKay @clearwind Training: http://clearwind.ca/training/ Zen: http://djangozen.com -- You received this message because you are subscribed to the Google Groups "Django

Re: ManyToOne to auth.models.User

2009-11-15 Thread Andy Mckay
put the year on that. Or use model inheritance. Or make a foreign key on another model to the User object (as Dennis noted) and then use reverse lookups. Personally I would recommend making a profile, you'll likely be adding more to it. -- Andy McKay, @clearwind Training: http://

Re: Stucked in template language

2009-11-15 Thread Andy McKay
better off formatting all your data in the view, its easier to write and unit test in Python. -- Andy McKay, @clearwind Training: http://clearwind.ca/training/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to thi

Re: Redirect

2009-11-15 Thread Andy McKay
On 09-11-15 9:35 AM, Zeynel wrote: > how do i redirect www.swimswith.com to www.swimswith.com/admin/ http://docs.djangoproject.com/en/dev/ref/generic-views/#django-views-generic-simple-redirect-to First hit in Google. -- Andy McKay, @clearwind Training: http://clearwind.ca/train

Re: DB table hook/callback

2009-11-16 Thread Andy McKay
ing for any changes on the table and then does some work (in this case updating navigation and search). This lets me stay in the Django ORM as much as possible, with the addition of just one trigger. -- Andy McKay, @clearwind Training: http://clearwind.ca/training/ -- You received this mess

Re: Django and reportlab table question

2009-11-16 Thread Andy McKay
= [] for vehicle in vehicles: data.append([vehicle.ve_name, vehicle.ve_type]) Then expand. Looping through your query set and your models is pretty much the same be it reportlab or not. -- Andy McKay, @clearwind Training: http://clearwind.ca/training/ -- You received this message because you

Re: Apache/mod_wsgi woes

2009-11-19 Thread Andy McKay
python. If you installed mod_wsgi through a package manager, which Python does it use 2.5 or 2.6 (I don't know the answer to that, but the traceback might). Do you have multiple pythons on your machine? -- Andy McKay, @clearwind Training: http://clearwind.ca/training/ -- You received

Re: FAQ?

2009-11-19 Thread Andy McKay
On 09-11-19 7:57 AM, Carl Zmola wrote: > Does anyone want to take a stab at an FAQ? There are a lot of repeated > questions on the list. How about http://docs.djangoproject.com/en/dev/faq/ -- Andy McKay, @clearwind Training: http://clearwind.ca/training/ -- You received this m

Re: querySet + select distinct

2009-11-19 Thread Andy McKay
using values in the filter eg: Disposal.objects.values("mydate").filter(mydate__year__gte=2008).distinct() The problem is the default django query selects all the fields, messing up the distinct part. http://docs.djangoproject.com/en/dev/ref/models/querysets/#values-fields --

Re: Write debug error to file

2009-11-26 Thread Andy McKay
You should take a look at Arecibo which has been used by a few Facebook apps for that very readson. It has full Django libraries and if you don't use it a full example of how to use middleware to process an error. http://areciboapp.com -- Andy McKay www.clearwind.ca On 2009-

Re: Error when generating PDF

2009-11-26 Thread Andy McKay
You are passing through None to reportlab, not a string. Follow the traceback and you will find the line in your code where the error occurs. -- Andy McKay www.clearwind.ca On 2009-11-26, at 5:40 AM, adelaide_mike wrote: > In my report generating view I have this (snip): >

Re: Newbie: is it possible to re-render a tag/filter after adding it to the web page as string

2009-11-26 Thread Andy McKay
> Can anyone tell me how I can load the content and execute/render the > javascript, css styling, template tags/filters? You really shouldn't be doing this. One string is everything on your page? You can use the Template library to re-render a template and that's discussed in the templating d

Re: Newbie: is it possible to re-render a tag/filter after adding it to the web page as string

2009-11-27 Thread Andy McKay
into the HTML area and magic would happen. Sadly it didn't work out very well. I would recommend a simple "add map to this page" button myself that twiddles a model attribute. -- Andy McKay, @clearwind Training: http://clearwind.ca/training/ Whistler conference: http://c

Registration open for DjangoSki Conference, March 2-4 2010

2009-12-03 Thread Andy McKay
p://www.clearwind.ca/djangoski/keynotes.html [2] http://www.clearwind.ca/djangoski/keynotes.html#pre [3] http://www.clearwind.ca/djangoski/when.html [4] http://www.clearwind.ca/djangoski/register.html [5] ...and oh, it's snowing like crazy: http://bit.ly/8goJIc -- Andy McKay, @cl

Re: Performance monitoring

2009-12-09 Thread Andy McKay
wrote to track the time of each sql query. But I would classify both as debugging tools. Is there anything specific you are looking for? -- Andy McKay, @clearwind Training: http://clearwind.ca/training/ Whistler conference: http://clearwind.ca/djangoski/ -- You received this message b

Re: Performance monitoring

2009-12-09 Thread Andy McKay
ou were looking for I could help more. Like I say I've run a sql query recording tool, its v. simple. But most of the time I rely on system tools like munin or monit. -- Andy McKay, @clearwind Training: http://clearwind.ca/training/ Whistler conference: http://clearwind.ca/djangos

Re: Howto output rows as HTML columns instead?

2009-12-13 Thread Andy McKay
the data just the way you want to work easily in your template and that's just (hopefully) simple Python data structure manipulation. Good luck fitting all those 000's in for their expenses for the duck pond and the adult movies ;) -- Andy McKay, @clearwind Whistler confe

Re: Filter (AND excluding empty values)

2009-12-13 Thread Andy McKay
ry is meaningful on property this would be: Property.objects.filter(category=c)... All I can really say is: http://docs.djangoproject.com/en/dev/ref/models/querysets/ > OR doesn't work properly as well as AND If you want help you will need to be more specific. "doesn'

Re: Filter (AND excluding empty values)

2009-12-14 Thread Andy McKay
A filter can take a python dictionary. So all you have to do is: Property.objects.filter(**some_dictionary) All you have to do is populate that dictionary. You can do that by accessing request.get, but the best way is to pass that into a django form. -- Andy McKay, @clearwind

Re: Working for a startup.

2010-04-22 Thread Andy McKay
is going better. And I bet few of them 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...@googlegr

Re: multiple django instances, one database?

2010-04-22 Thread Andy McKay
ango code 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

Re: multi-language capabilities of Django/Satchmo

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

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

2010-05-07 Thread Andy McKay
at you 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

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 thi

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: Weekly rss feed

2010-06-21 Thread Andy McKay
and only show posts in the 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 uns

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: 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: Parsing xml containing image - rawImage gif

2010-07-05 Thread Andy McKay
ibraries: 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.c

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 thi

Re: Get pk before commit

2010-07-09 Thread Andy McKay
key in 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 G

Re: python logging and multiple process issue?

2010-07-12 Thread Andy McKay
python's built 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

Re: Anyone want to take over maintaining Instant Django?

2010-07-13 Thread Andy McKay
ows installer, 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 use

Re: Historical Records from "Pro Django" - not working with multiple foreign keys?

2010-01-05 Thread Andy McKay
this manner? I hit the same problems with that feature. In the end number of relationships and tables it created got so complicated, that we gave up on it. We used http://code.google.com/p/django-reversion/ instead, but there are other choices. -- Andy McKay, @clearwind Whistler confere

Re: Historical Records from "Pro Django" - not working with multiple foreign keys?

2010-01-05 Thread Andy McKay
ather than changing the thread mid stream. -- Andy McKay, @clearwind Whistler conference: 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 django-us...@googl

Re: 500 internal error when posting

2010-01-07 Thread Andy McKay
You really need to find a way to get the traceback, without that its really hard to say what the problem is. Tools like http://areciboapp.com are useful for this, but just setting DEBUG=True and restarting your Apache/whatever should be enough. -- Andy McKay, @clearwind Whistler conference

Re: Seeking Django developer for contract work

2010-01-08 Thread Andy McKay
companies directly. -- Andy McKay, @clearwind Whistler conference: 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 django-us...@googlegroups.com. To unsubscribe f

Re: Register signal on all objects

2010-01-09 Thread Andy McKay
/#connecting-to-signals-sent-by-specific-senders -- Andy McKay, @clearwind Whistler conference: 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 django-us...@googlegrou

Djangoski Early Bird - time running out

2010-01-13 Thread Andy McKay
Time is running out for the DjangoSki Early Bird, sign up soon: http://www.clearwind.ca/djangoski/register.html -- Andy McKay, @clearwind Whistler conference: http://clearwind.ca/djangoski/ -- You received this message because you are subscribed to the Google Groups "Django users&q

Re: permalinks from cron job

2010-01-18 Thread Andy McKay
You can set a prefix here: http://code.djangoproject.com/browser/django/trunk/django/core/urlresolvers.py#L364 -- 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

Re: Gathering performance statistics

2010-02-02 Thread Andy McKay
y the way you want to go. -- 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 django-us...@googlegroups.com. To unsubscribe from this group

Re: FieldError with get_object_or_404

2010-02-04 Thread Andy McKay
error, > 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,

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: 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: Dictionary Model Merge

2010-02-15 Thread Andy McKay
e' error. 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 b

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 h

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: Deciding how to start building a search form

2010-02-23 Thread Andy McKay
ed to 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 t

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 bec

Re: Django in the enterprise?

2010-02-24 Thread Andy McKay
o and its 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://clear

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

Re: getting request.user from a signal

2010-03-11 Thread Andy McKay
e 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

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: 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 loo

Re: How execute erlang code ?

2010-03-11 Thread Andy McKay
r erland 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

Re: DB Adapter for HTML5 Client Database Storage?

2010-04-07 Thread Andy McKay
ugh for me ;) -- 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 em

  1   2   >