Caching query results and ManyToMany relationships

2009-07-08 Thread Adam Olsen
Is there a way to do this easily, or should I just cache the parameters manually? -- Adam Olsen SendOutCards.com http://www.vimtips.org http://last.fm/user/synic --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Dja

Re: Caching query results and ManyToMany relationships

2009-07-08 Thread Adam Olsen
the Model class that pulls in the > queryset and caches it on the > model and always use that instead of teh default manager, that way when you > cache the obj if it has a local cache it will be stored. Ok, that's what I'll do. Thanks! -- Adam Olsen SendOutCards.com http://www.vimtips.org h

Multiple Sites with minimal configuration

2009-07-10 Thread Adam Nelson
uses the HttpRequest variables? If so, does anybody know of any best practice examples in urls.py (I'm presuming). Thanks, Adam --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" grou

Re: Design Tools any suggestions?

2009-07-11 Thread Adam N
GraphModels in django-extensions can be helpful. http://code.google.com/p/django-command-extensions/wiki/GraphModels I had a bear of a time installing it on my Mac however. Graphviz isn't Visio or a UML editor though so the utility of that program for model designing is kind of limited. On

Re: Submitting a form

2009-07-29 Thread Adam Yee
Use the model's verbose field name http://docs.djangoproject.com/en/dev/topics/db/models/#id2 On Jul 29, 3:55 pm, When ideas fail wrote: > Is there a way i can change the label for a field in the model form? > > On 29 July, 21:44, When ideas fail

Re: Missing Roles (group of groups)

2009-07-30 Thread Adam Stein
> Are there any other django coders who miss this? > > I know that this can be implemented with only a few lines. But a reusable > solution would be better. > > Thomas > -- Adam Stein @ Xerox Corporation Email: a...@eng.mc.xerox.com Disclaimer: Any/All views ex

Re: how encrypt datetime.now with python?

2009-07-30 Thread Adam Peacock
That will work, as long as the parent doesn't need to go back into a native object easily - if s/he needs to easily get back into a datetime object, use pickle: import pickle import base64 toEncode = pickle.dumps(datetime.now()) encoded = base64.encodestring(toEncode) decoded =

Simple query on a ManyToMany field?

2009-07-30 Thread Adam Olsen
. How can I write a query that will return a list of Card objects that match ALL (not any) of the words? Is there a way to do it in a line or two without traversing all of the card objects? -- Adam Olsen http://www.vimtips.org http://last.fm/user/synic

Re: Simple query on a ManyToMany field?

2009-07-30 Thread Adam Olsen
That did it, thanks! -- Adam Olsen http://www.vimtips.org http://last.fm/user/synic --~--~-~--~~~---~--~~ 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@googl

Re: Template links when Django not domain root

2009-07-31 Thread Adam Yee
till need or want to use the {% url %} tag, you just need to preceed it by a {{ script_name }} (I'm mostly sure, correct me if wrong). You can give script_name to your context with request.META['SCRIPT_NAME'] if it exists. hope this helps, Adam > > > On Jul 31, 6:04 am, Alex Koshelev <da

Re: Customzing form fields in Admin in list_editable mode?

2009-08-06 Thread Adam V.
Bug entered w/ patch: http://code.djangoproject.com/ticket/11651 On Jun 18, 1:24 pm, Alex Gaynor <alex.gay...@gmail.com> wrote: > On Thu, Jun 18, 2009 at 3:21 PM, Adam V. <fla...@gmail.com> wrote: > > > Alex, thanks; that's what I was afraid of. > > If no one el

Re: Pagination in the admin , where is?

2009-08-06 Thread Adam V.
ModelAdmin.list_per_page will let you control how many items appear on a particular admin list: http://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.list_per_page On Aug 6, 7:50 pm, Asinox wrote: > Well, i cant find any about it, i want to

Re: Django comments honeypot hide

2009-08-10 Thread Adam Playford
Any reason not to just hide it with CSS? Something like: #honeypotField { display: none; } Assuming that the field's ID is set to "honeypotField"? (Alternatively, if you're not using an external stylesheet, you could use: style = "display: none;" as a property of the

Form Wizard won't proceed past the second step

2009-08-14 Thread Adam Olsen
this: urlpatterns = patterns('sendoutcards.retail.views', (r'^register/$', forms.RegistrationWizard()), ) My FormWizard, two Forms, and the templates involved are here: http://dpaste.com/hold/80601/ What am I doing wrong? -- Adam Olsen SendOutCards.com http://www.vimtips.org http://last.fm/user/synic

Re: Form Wizard won't proceed past the second step

2009-08-14 Thread Adam Olsen
e = self.data.get(name, None) if code: return code I'm not sure if that's the correct way to go about it, but it's working for now. -- Adam Olsen SendOutCards.com http://www.vimtips.org http://last.fm/user/synic --~--~-~--~~~---~--~~ You received this messag

Using admin to update inherited models

2009-08-20 Thread Adam Nelson
take a Pizza place and change it to a burger place? Is this not the best structure for this situation? I previously was using boolean fields and one model (is_pizza_place) but I'm starting to put alot of logic on the child models - and would prefer to have that logic in the model. Thanks, Adam

Authentication integration with Netegrity SiteMinder?

2009-08-26 Thread Adam Stein
instead because of corporate policy. Figure I would ask to see if anybody has already done this before I try to figure this out from scratch. SiteMinder gives me the login name in an environment variable which I can then tie into the Django user system. -- Adam Stein @ Xerox Corporation Email

Looking for a Django developer

2009-09-02 Thread Adam Endicott
Storybird is adding a Python/Django developer to the team. We're a small group working on a fun, Django-backed site that's just at the initial launch stage. We have more ideas than developer time, so we're looking to expand the team. Details and contact info are at:

Using the login page AND RemoteUserMiddleware depending on user?

2009-09-08 Thread Adam Stein
to use what user is already set to? -- Adam Stein @ Xerox Corporation Email: a...@eng.mc.xerox.com Disclaimer: Any/All views expressed here have been proven to be my own. [http://www.csh.rit.edu/~adam/] --~--~-~--~~~---~--~~ You received this message

Populating ChoiceField values in Form

2009-09-11 Thread Adam Nelson
(filtercriterion__id=1) will return a QuerySet of what I want to end up on the select list. How can I send the numeral '1' as a variable to the TestForm class? Thanks, Adam --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Populating ChoiceField values in Form

2009-09-11 Thread Adam N
> class TestForm(forms.ModelForm): >     category = forms.ModelChoiceField(queryset=TestModel.objects.filter > (filtercriterion__id=1)) > >     class Meta: >         model = TestModel > > In this example, TestModel.objects.filter(filtercriterion__id=1) will > return a QuerySet of what I want to

Re: PyFacebook and python-twitter

2009-09-13 Thread Adam Olsen
faction account. I'm sure it would be no trouble at all to install PyFacebook as well. -- Adam Olsen SendOutCards.com http://www.vimtips.org http://last.fm/user/synic --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Development and deployment wit Git

2009-09-14 Thread Adam N
ever want to leave them, you can just take your repository and move to your own server, or elsewhere. -Adam On Sep 13, 12:55 pm, orschiro <orsch...@googlemail.com> wrote: > Hello guys, > > I'm a single developer but since a VCS like Git has some really nice > features, like the hist

Re: How to define a "has-a" relationship in dJango models

2009-09-17 Thread Adam N
those will do what you want it to do. I personally would extend the User model for your limited need but most profile apps use a ForeignKey field (OneToMany) so as to support multiple profiles per user. Cheers, Adam --~--~-~--~~~---~--~~ You received this message becaus

Re: Can I tell IE not to cache data?

2009-09-17 Thread Adam V.
This is via an AJAX request, I assume? For IE, you'll want to throw a bogus querystring on the end of the URL, to make it different, so that IE won't cache it: client side Javascript: url = whatever the url is normally. var sep = (-1 < url.indexOf("?")) ? "&" : "?" url = url + sep + "__=" +

Re: Writers for a Django Blog

2009-09-19 Thread Adam Olsen
er my own RSS feed with your site, and any entries on my own blog that are tagged with "django", "web", "javascript" or something similar would automatically show up on your site. -- Adam Olsen SendOutCards.com http://www.vimtips.org http://last.fm/user/synic --~--~---

Re: Moving the .py(c|o) files out of the app?

2009-09-28 Thread Adam Stein
iles to be written to? In production, I'm not wild about the idea of > > the app folders being writable by the Apache process. Any guidance? > > Thanks? > > > > -- > > -- Christophe Pettus > > x...@thebuild.com > > > > > > > > > >

Re: Cannot build psycopg2 in x86_64

2009-09-28 Thread Adam V.
If I remember correctly (and I might not be, and my 10.5 box is at work), the Python that comes with 10.5 does not have 64-bit support baked in, which basically means that extensions compiled against it won't either. You'll either need to build a custom Python w/ 64-bit support, or force the

Re: Simple Sitemap

2009-10-12 Thread Adam N
You might as well use django.contrib.sitemaps. It's not difficult to use that app so there's no more efficient way to do this unless you happen to have the sitemaps.xml file already. On Oct 12, 11:32 am, Timbadu wrote: > I need a simple sitemap for 5 URLs. The

Re: invalid sytax when naming url

2009-10-15 Thread Adam Olsen
On Thu, Oct 15, 2009 at 10:14 PM, David <davidkazuh...@gmail.com> wrote: > > I can't figure out why this is invalid syntax... You can't pass a keyword argument to a tuple. It should read: url(r'^$', object_list, list_args, name='list'), -- Adam Olsen SendOutCards.com http://www

Re: Help to choose web-template

2009-10-16 Thread Adam Stein
er or main menu). > > I appreciate any advice. > > -- > regards, > Mihail > > > > -- Adam Stein @ Xerox Corporation Email: a...@eng.mc.xerox.com Disclaimer: Any/All views expressed here have been proven to be my own. [http://www.csh.rit.edu/~adam/] --~--~

Problem with conflicting flatpages between vhosts

2009-10-24 Thread Adam Olsen
still load the flatpage from site1.com. -- Adam Olsen SendOutCards.com http://www.vimtips.org http://last.fm/user/synic --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Darpa challenge

2009-10-29 Thread Adam Nelson
change.com/ I think the first thing that needs to happen is to get a critical mass of users on the site and to use the Q capabilities of the site to figure out what tools we should use next. Cheers, Adam Nelson --~--~-~--~~~---~--~~ You received this message b

Django and PostgreSQL/Slony for load-balancing?

2009-11-03 Thread Adam Seering
) seem to rely on writing data and immediately reading it back. Does anyone else do this type of load-balancing? Any tips? In general, what (if anything) do folks here do for load-balancing? Thanks, Adam --~--~-~--~~~---~--~~ You received this message

Prevent brute-force password attacks?

2009-11-09 Thread Adam Seering
Hi, Does there exist any code for Django to help defeat brute-force login attempts? Something like blocking IP addresses from logging in if they try and fail too many times, etc. Adam --~--~-~--~~~---~--~~ You received this message because you

Re: Prevent brute-force password attacks?

2009-11-11 Thread Adam Seering
make sure we're doing as good a job as we can be), it'd seem reasonable to have a programmatic catch for someone logging into a bunch of accounts in succession after a bunch of failed tries with each. Further thoughts are certainly welcome, though. Adam On 11/9/09 5:06 PM, f4nt wrot

Trouble setting a form field's value in clean()

2009-11-16 Thread Adam Stein
ake 'string2' not required (so it winds up being an empty string), there still doesn't seem to be a way to change the empty string to have a value. While validation passes, the resulting POST data still shows 'string2' as an empty string. I thought that changing and returning the cleaned data would do it

Re: Trouble setting a form field's value in clean()

2009-11-16 Thread Adam Stein
On Mon, 2009-11-16 at 17:57 +0100, Dennis Kaarsemaker wrote: > On Mon, Nov 16, 2009 at 5:12 PM, Adam Stein <a...@eng.mc.xerox.com> wrote: > > Running Django v1.1.1 on Apache v2.2.8 with Firefox v3.5.4. > > > > I have a very simplified and unreal example below to demon

Re: Trouble setting a form field's value in clean()

2009-11-16 Thread Adam Stein
is group, send email to django-us...@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=. > -- Adam Stein @ Xerox Corporation Email: a..

Re: Help with manage.py syncdb

2009-11-17 Thread Adam Knight
it more complicated! Woo! More: http://stackoverflow.com/questions/1380281/set-snow-leopard-to-use-python-2-5-rather-than-2-6 Adam Knight codepoetry - http://www.codepoetry.net/products/ On Nov 16, 2009, at 11:40 PM, jd_python wrote: > What am I possibly doing wrong? -- You recei

Re: How to use subqueries in django

2009-11-17 Thread Adam Knight
pics/db/queries/#complex-lookups-with-q-objects Adam Knight codepoetry - http://www.codepoetry.net/products/ -- 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 unsub

Drupal migration

2009-11-17 Thread Adam Knight
/convertdrupal.py) Adam Knight codepoetry - http://www.codepoetry.net/products/ -- 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: Redirect problems

2009-11-18 Thread Adam Knight
in a server error. > > Any suggestions? > > Thanks. Order matters. urlpatterns = patterns('', (r'^wkw1/$', 'sw1.wkw1.views.index'), ) urlpatterns += patterns('django.views.generic.simple', ('^admin/$', 'redirect_to', {'url': '/admin/wkw1/lawyer/'}), ) urlpatte

Re: Multiple level aggregate

2009-11-18 Thread Adam Knight
ons you want and then apply the aggregate operation to that. Adam Knight codepoetry - http://www.codepoetry.net/products/ -- 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: Django with SQL Server

2008-03-25 Thread Adam V.
> Should I go ahead and swap the backend code out for of these backends? The fact that I created a separate project basically speaks to my suggestion (swap out.) [I would kind of prefer if MS SQL support was dropped entirely from django-svn (unless the upcoming foundation is going to spend some

Re: Should I set up Django locally or on a web server?

2008-05-01 Thread Adam Seering
(MacOS X 10.5) ships Python 2.5, which is the latest version. Adam On Thu, May 1, 2008 at 7:12 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Probably the most painless way to get everything you need for the > production setup is via MacPorts - apache, python, postgres, etc. >

Re: IIS 6 PyISAPIe problems

2008-05-05 Thread Adam Fast
Ben, Where is django? Make sure it's on your pythonpath (or "module search path" as they appear to be calling it below) Adam On Mon, May 5, 2008 at 1:11 PM, shocks <[EMAIL PROTECTED]> wrote: > > Hi > > I have followed the Django IIS installation guide on t

disabling a field

2008-05-06 Thread Adam Findley
So I've been wondering how one goes about disabling a field in newforms. I want it to look something like this: Anyone have any suggestions? I have been digging through google, documentation and widgets, but have been unable to come to a conclusive answer. Thanks, Adam

Re: mod_python vs. mod_wsgi

2008-05-06 Thread Adam Fast
Strangely enough, this link is now dead...and it's not mentioned at the top of their blog either. Maybe they pulled the plug? On Tue, May 6, 2008 at 2:45 PM, Brot <[EMAIL PROTECTED]> wrote: > > Hello, > > today webfaction announced (http://blog.webfaction.com/django-setup- > improvements)

Re: mod_python vs. mod_wsgi

2008-05-06 Thread Adam Fast
nd <[EMAIL PROTECTED]> wrote: > > This is the correct link: > > http://blog.webfaction.com/django-setup-improvements > > This feature is still available in the control panel :-) > > > > > On Tue, 2008-05-06 at 16:18 -0500, Adam Fast wrote: > > Strangely

Re: Django email and BCC recipients

2008-05-13 Thread Adam Fast
. Add a recipient of the sender_email and you should be fine (yes, you will have to delete the messages from that account, but BCCs will work. Alternately, send a single message to each recipient, then you don't need BCCs. Adam On Tue, May 13, 2008 at 1:16 AM, Julien <[EMAIL PROTECTED]>

Re: microsoft sql server 2005

2008-05-19 Thread Adam V.
ache 2.2.6, and mod_python, and I'm working on some "continuous integration" pieces with CruiseControl.NET. If there was any interest I could write up some of our set-up instructions.) -Adam Vandenberg --~--~-~--~~~---~--~~ You received this message becaus

Re: Using ModelForm...not populating my choices

2008-05-20 Thread Adam Gomaa
he docs are somewhat incomplete - they only explain how to set the initial queryset. I've been meaning to write up some documentation explaining the .queryset attribute, so thanks for spurring some action :) Adam On Tue, May 20, 2008 at 8:59 AM, chylld <[EMAIL PROTECTED]> wrote: > > I

Re: downloadable django site example anywhere?

2008-05-20 Thread Adam Fast
Kenneth, http://code.djangoproject.com/svn/djangoproject.com/ Is the URL you want for subversion. The "browser" url uses the web-based browser to look at it file by file. Unfortunately though you won't find a lot of newforms / modelforms stuff there I'm afraid (or lost-theories unless it's

Re: Authentication for whole app

2008-05-20 Thread Adam Gomaa
ceptually, the SSO is done one layer deeper than Django. Individual Django instances are themselves clients to the SSO service (CAS, in this case). Of course, I don't think this has anything to do with what the OP was needing, but your post reminded me of

Re: Testing login required views

2008-05-21 Thread Adam Gomaa
ook for any that are missing @login_required. Course, that's hardly portable... Adam > > Thank you, > > Julien > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To p

Re: Forms from Database Tables with choice selects.

2008-05-21 Thread Adam Gomaa
Lance, it's also not clear to me what exactly you need. Are you using ModelForm? If not, what do you mean by the 'auto generated' form? I think I have a rough idea what you're looking for, but a few more details would go a long way. Adam On Wed, May 21, 2008 at 3:30 PM, Lance F. Squire <[EM

Re: Dev server won't run. (Complete Newbie)

2008-05-27 Thread Adam Fast
:8000 (or no :8000 for port 80) in your web browser from the host machine. Adam On Tue, May 27, 2008 at 1:06 PM, anndr0id <[EMAIL PROTECTED]> wrote: > > On the host machine. VM is just command prompt. > > On May 27, 1:52 pm, Randy Barlow <[EMAIL PROTECTED]> wrote: >>

trying to modify admin

2008-06-09 Thread Adam Fraser
;+str(t.date.day)+"]"] += h.hours return tcHours ...might there be a good way to use these functions to render to a template? I'm still quite new to Django so what might seem obvious to others is still not quite obvious to me. thanks much! Adam --~--~-~--~~-

can't find media

2008-06-12 Thread Adam Fraser
it.js" does not exist Any idea why it may not be finding this? Any help would be much appreciated. Adam --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send e

Re: can't find media

2008-06-12 Thread Adam Fraser
ideas what's causing this? -Adam On Jun 12, 1:10 pm, Jeff Anderson <[EMAIL PROTECTED]> wrote: > Adam Fraser wrote: > > Hi, > > > I'm testing Django locally and I've added the line: > > (r'^projectprofiler/media/(?P.*)$', 'django.views.static.serve', > > {'doc

Re: can't find media

2008-06-12 Thread Adam Fraser
Correction, winter.css is loading... just not base.css. Turns out this is in ./projectprofiler/meda/admin/css That solves it. On Jun 12, 1:36 pm, Adam Fraser <[EMAIL PROTECTED]> wrote: > Hrm, well now the URL resolves and I can see the contents of the file > by going > hereh

User matching query does not exist.

2008-06-17 Thread Adam Fraser
pening? I noticed that the MySQL column name corresponding to models.ForeignKey(User), is actually "user_id"... this is correct though right? -Adam --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "

Re: User matching query does not exist.

2008-06-17 Thread Adam Fraser
Got it... noticed that there was a single invalid user_id in my timecard table in the database. Not sure how this could have happened. -Adam On Jun 17, 2:43 pm, Adam Fraser <[EMAIL PROTECTED]> wrote: > Suddenly, I am getting the following error when I try to look at my > Timecard

Implementing a new idea

2008-06-17 Thread Adam Fraser
have an idea of how I could accomplish this? I am already using a specialized version of the 'change_form.html' template for Projects, so modifications could be made here without affecting other admin change_forms. Any help would be greatly appreciated. -Adam --~--~-~--~~~

Re: Implementing a new idea

2008-06-18 Thread Adam Fraser
I didn't, but you can bet I will now. Thanks for the lead! -Adam On Jun 17, 4:22 pm, Dan <[EMAIL PROTECTED]> wrote: > Did you take a look at Django Signals? You can intercept pre-save and > post-save objects with them. You can use that to grab the data you > wan

Re: Implementing a new idea

2008-06-19 Thread Adam Fraser
ntioned in my first ref. above, but it turns out I couldn't have models importing signals while signals imported models. Otherwise it would have made more sense for me to use signaling for scalability and elegance. -adam On Jun 18, 11:35 am, Adam Fraser <[EMAIL PROTECTED]> wrote: > I didn

Re: Messaging component

2007-11-16 Thread Samuel Adam
I have released my code for a private message system. It's quite powerful, the functions are all displayed in the templates. For example, if you don't want to have message history in the read view, just remove it in the templates. Django is really smart and won't trigger the SQL queries if it

Re: Custom methods for ManyToManyManager

2007-11-16 Thread Samuel Adam
I've added it, line 228 On Nov 16, 3:32 pm, Samuel Adam <[EMAIL PROTECTED]> wrote: > I've been hacking some filtering for related managers, have a look at > the BoxManager > here:http://django-pm.googlecode.com/svn/trunk/myproject/pm/models.py > > My app misses the user.i

Re: Custom methods for ManyToManyManager

2007-11-16 Thread Samuel Adam
I've been hacking some filtering for related managers, have a look at the BoxManager here: http://django-pm.googlecode.com/svn/trunk/myproject/pm/models.py My app misses the user.inbox.new() feature, i will add it soon. :) On Nov 16, 2:18 pm, "Tomi Pieviläinen" <[EMAIL PROTECTED]> wrote: > Hi

Re: design Q: where to put peoples names

2007-11-16 Thread Samuel Adam
Have the "is_active" field of the User model set to False for the users that don't need a login. The auth login will raise an error if an inactive user tries to log in. Always try to use what is there. On Nov 16, 3:02 pm, Carl Karsten <[EMAIL PROTECTED]> wrote: > The user table has first/last

Re: design Q: where to put peoples names

2007-11-16 Thread Samuel Adam
Want more info ? Create a profile model and tie it to the user in settings.py: AUTH_PROFILE_MODULE = 'profile.UserProfile' Then you can use user.get_profile().phone_number for example. http://www.b-list.org/weblog/2006/jun/06/django-tips-extending-user-model/ When i started using Django i

Re: Accessing request.user inside a model methods

2007-11-17 Thread Samuel Adam
http://lucumr.pocoo.org/blogarchive/why-i-cant-stand-threadlocal-and-others On Nov 17, 10:20 am, DanB <[EMAIL PROTECTED]> wrote: > Thxs Alex, > > really helpful info. > > Cheers, > DanB > > On Nov 16, 7:04 pm, Alex Koshelev <[EMAIL PROTECTED]> wrote: > >

Re: How to handle differing timezones?

2007-11-18 Thread Samuel Adam
Heres my take: - Handle every time related data in UTC - Record the user TZ in the UserProfile - Display the user time with a |tz:user template filter I don't have snippets right here but i think Jonathan Buchanan has a clean and similar solution on his forum app:

Re: using "select_related" .Does it works?

2007-11-20 Thread Samuel Adam
The purpose of select_related() is to limit the number of connections to the database server. An analogy would be that if you have a webpage with 4 CSS file inclusions ( >> from pm.models import Message >>> from django.db import connection >>> message = Message.objects.get(pk=1) >>> '%s sent a

Re: GeoDjango Distances

2007-11-22 Thread Samuel Adam
I don't have answers for you but as you're working with geo data, you might find this library useful: http://exogen.case.edu/projects/geopy/ On Nov 22, 7:15 am, Dan <[EMAIL PROTECTED]> wrote: > Hi > > I started using the Geodjango branch, it seems to be working really > well so far, I have a

efficiently search for ManyToMany links?

2007-11-22 Thread Adam Seering
the ManyToMany table directly, I ought to be able to do this in a single query. Is this possible in Django? What would people recommend as a solution in this case? Thanks, Adam --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

{% load %} tag in a base template can't be inherited?

2008-02-06 Thread Adam Stein
This isn't true unless {% load %} doesn't count as a template tag. My derived templates work if I put {% extends %} first or {% load %} first. -- Adam Stein @ Xerox Corporation Email: [EMAIL PROTECTED] Disclaimer: All views expressed here

Re: {% load %} tag in a base template can't be inherited?

2008-02-06 Thread Adam Stein
e page to the 0.96 > documentation. I took the quote from the v0.96 doc (http://www.djangoproject.com/documentation/0.96/templates/). -- Adam Stein @ Xerox Corporation Email: [EMAIL PROTECTED] Disclaimer: All views expressed here

Re: {% load %} tag in a base template can't be inherited?

2008-02-06 Thread Adam Stein
Where would I put this? -- Adam Stein @ Xerox Corporation Email: [EMAIL PROTECTED] Disclaimer: All views expressed here have been proved to be my own. [http://www.csh.rit.edu/~adam/] --~--~-~--~~~---~--~

Re: Getting development environment configured

2008-02-08 Thread Adam Stein
e website > directory itself instead of the PARENT of the website directory in the > PythonPath. Now I just need to tell Apache to not process anything > else with mod_python and I should be good to go. > > Thanks Adam, > b > > On Feb 8, 1:08 pm, Adam Stein <[EMAIL

Re: Having problems changing the default query set for Admin

2008-02-11 Thread Adam Stein
suggestions are welcome. On Mon, 2008-02-11 at 11:17 -0500, Adam Stein wrote: > Using Django v0.96 > > According to what I've been able to find, I can assign my own Manager to > a Model. Setting up my default Manager would then affect the default > query, which includes the one the Admin

Having problems changing the default query set for Admin

2008-02-11 Thread Adam Stein
never was. Am I missing something? Can I affect the query the Admin view uses? -- Adam Stein @ Xerox Corporation Email: [EMAIL PROTECTED] Disclaimer: All views expressed here have been p

Re: Is there a ModelChoiceField() HTML widget that accepts typing?

2008-03-03 Thread Adam Stein
a multiwidget. > > After you've coded up your own, you can tell CharField to use it by > doing something like: > > from django import newforms as forms > class MyForm(forms.Form): > combobox = forms.fields.CharField(widget=MyCustomWidget()) > > On Feb 29, 11:24 a

Re: Django with SQL Server

2008-03-25 Thread Adam V.
Not only is Django's pack-in MS Sql backend broken, but the last set of updates to adodbapi-2.1 to add IronPython support actually broke standard Win32/COM support in some areas. There are some now externally maintained SQL Server backends for (trunk) Django: *

How to create form from odd model

2012-04-30 Thread Adam S
Hi, I am working with an existing database where I am unable to change the schema and having some trouble trying to deal with presenting forms. The structure in question is as follows and all models are unmanaged. class Persons(models.Model): personid =

Re: only utf-8 letters regex pattern

2013-01-16 Thread Adam Mesha
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. > -- Adam Mesha <adam.rai...@gmail.com> Life is either

Re: Django ForeignKey versus ManyToManyField

2013-02-06 Thread Adam Mesha
On Wed, Feb 6, 2013 at 8:48 AM, Daniel Roseman wrote: > On Tuesday, 5 February 2013 22:39:30 UTC-8, vijay shanker wrote: > >> Hi >> I have two models, a Customer model and a WishListItem model (which >> stores products). I have option of either having a ManyToManyField in

Re: Object composition in django

2013-02-13 Thread Adam Mesha
l to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at http://groups.google.com/group/django-users?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- Adam M

Re: Generating pdf from html using Pisa

2013-02-20 Thread Adam Stein
> {% for item in mylist %} > {{item}} > {% endfor %} > > > {%block page_foot%} > Page > > {%endblock%} > > > > > > --

Re: switched to webfaction, would 600GB be an issue?

2013-02-20 Thread Adam Mesha
ving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at http://groups.google.com/group/django-users?hl=en. > For more options, visit https://groups.google.com/groups/opt_out

Re: Django hosting. Need to run executable for my app

2013-04-09 Thread Adam Mesha
rver and compiling your binary in your home directory, then setting up your personal apache instance to talk to it how you want it to. gcc is on the shared servers. -- Adam Mesha - *www.mesha.org* -- You received this message because you are subscribed to the Google Groups "Django users" g

Deploying Django with Chef

2011-11-09 Thread Adam Nelson
All, We just put out a new blog post on how to use Chef to deploy a Django environment on Amazon ec2 (although any remote Python deployment will benefit from the article, not just Django): http://tech.yipit.com/2011/11/09/how-yipit-deploys-django/ Cheers, Adam -- You received this message

Python pre-commit hook for git

2011-11-16 Thread Adam Nelson
Hey all, We just put out a blog post on our Python pre-commit hook for git in case anybody is interested: http://tech.yipit.com/2011/11/16/183772396/ Cheers, Adam --- Adam Nelson CTO, Yipit Join the Yipit Team and work with Python, Django, MongoDB, jQuery, Backbone.js and Sass @ http

Re: displaying images

2011-11-23 Thread Adam Stein
path. Take a look at the source of your rendered page, make sure the image URL is correct and that there is actually an image there (open the URL in it's own browser window/tab). Hopefully that will lead you to the source of your problem. -- Adam Stein @ HCL America Inc.Email: a...@ppdev.m

Boolean test on queryset

2011-11-28 Thread Adam Nelson
with a LIMIT of 1. Instead, the ORM evaluates the entire queryset through the __len__ attribute. Is there a best practice for working around this? Thanks, Adam -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion

Re: Boolean test on queryset

2011-11-28 Thread Adam Nelson
Jirka, That doesn't solve the problem. That will still do a very expensive count() operation on the queryset. In fact, examples.count() is what happens when you do bool(examples) anyway. Thanks, Adam On Mon, Nov 28, 2011 at 8:11 PM, Jirka Vejrazka <jirka.vejra...@gmail.com>wrote: >

Feature Flipping with Gargoyle and Waffle

2011-11-30 Thread Adam Nelson
We just put out a post about feature flipping using Gargoyle or Waffle: http://tech.yipit.com/2011/11/30/getting-to-continuous-deployment-in-django-feature-flipping/ --- Adam Nelson CTO, Yipit Join the Yipit Team and work with Python, Django, MongoDB, jQuery, Backbone.js and Sass @ http

Loading initial data with a post_syncdb hook?

2011-05-08 Thread Adam Seering
Python functions to create each entry.) Is there a good way to do so in the brave new Django 1.3 world? Thanks, Adam -- 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 u

Re: Loading initial data with a post_syncdb hook?

2011-05-08 Thread Adam Seering
On May 8, 7:16 pm, Jacob Kaplan-Moss <ja...@jacobian.org> wrote: > On Sun, May 8, 2011 at 4:25 PM, Adam Seering <aseer...@gmail.com> wrote: > > I have some Python code that generatesinitialdatafor some of my tables; I > > currently call that code from a post_syncdb ho

<    1   2   3   4   5   6   >