Re: Dictionary key-value pair

2008-08-28 Thread David Zhou
other tables. Following will give you an idea of > what I am trying to do. Thanks Since it looks like you're basically using the dictionary like a list of tuples, why not make it a list of tuples? It should preserve ordering too, that way. --- David Z

Re: CSS error in change_password.html

2008-09-01 Thread David Zhou
t. or something similar. I think you should open a ticket for it. But an easier way to do it is to just use clearfix: --- David Zhou [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "

Re: problem with passing dict object to django template

2008-09-02 Thread David Zhou
On Sep 2, 2008, at 1:34 PM, Matt Berg wrote: > In my template, I want to be able to iterate through the crops with > info like this: > > {{ ci.[crop.id].total }} Are you using this within another loop? Where's crop.id coming from? --- David Zhou

Re: django web hosting

2008-09-02 Thread David Zhou
I've had pretty good experiences with WebFction. David Sent from my iPhone On Sep 2, 2008, at 7:30 PM, Ed Wong <[EMAIL PROTECTED]> wrote: > > hi all, > > i am looking for a good web host for my django website. does anyone > su

Re: django web hosting

2008-09-02 Thread David Zhou
am looking for a good web host for my django website. does anyone > suggest a good host? thanks. > > > > > > -- > Nikos Delibaltadakis > > > --- David Zhou [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message bec

Re: How to display Html in my screen

2008-09-02 Thread David Zhou
t? Django autoescapes. See: http://docs.djangoproject.com/en/dev/topics/templates/#how-to-turn-it-off --- David Zhou [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" gro

Re: S3 tutorial for File Storage Refactor?

2008-09-04 Thread David Larlet
Hi Jay, Thanks for the patch, I need to spend more time on this but I had pushed your correction. Any feedback is really appreciated. Best, David Le 2 sept. 08 à 18:22, shadfc a écrit : > To fix the corrupt images error, add > content.open() > to the top of _save() on the S3Stor

Re: ANN: Updated Django Cheat Sheet

2008-09-04 Thread David Larlet
nter will thank you ;-). Best, David --~--~-~--~~~---~--~~ 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 gr

MediaTemple Django Containers

2008-09-04 Thread David Zhou
Are now available according to their homepage: http://mediatemple.net/webhosting/gs/django.html Was anyone in the beta? I've not used them, so I'm wondering what the experience was like. --- David Zhou [EMAIL PROTECTED] --~--~-~--~~~---~--~~ Yo

DjangoCon location + carpool

2008-09-05 Thread David Scott
Where exactly at Google is DjangoCon going to be taking place tomorrow and Sunday? Will it be well marked? I'll be driving down from San Francisco (16th/Guerrero) in case anyone wants to carpool. David --~--~-~--~~~---~--~~ You received this message becaus

Re: Introducing django-cms

2008-09-08 Thread David Zhou
e set up which allows you to play around with the admin > interface. > > The software is still in development and we would appreciate any > feedback and contributions. > > Greetings from Switzerland, > > Thomas Stei

Re: disable delete checkbox in Inline formset

2008-09-08 Thread David Zhou
viously I can > disable the "Can delete" permission, but the ugly box is still there. Have you tried editing the admin templates to not show the checkbox? --- David Zhou [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are

Re: Double Slash in URL

2008-09-08 Thread David Zhou
t is to allow variable amounts of slashes -- like: (r'^test/+$', 'modwork.views.test.index'), --- David Zhou [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django use

Re: disable delete checkbox in Inline formset

2008-09-08 Thread David Zhou
On Sep 8, 2008, at 2:55 PM, Kurczak wrote: > On 8 Wrz, 20:37, David Zhou <[EMAIL PROTECTED]> wrote: >> On Sep 8, 2008, at 2:30 PM, Kurczak wrote: >> >>> Is there any way to disable/remove the delete checkbox for inline >>> formsets ( in admin) ? >

Re: Internal server error upgarding from 0.97 to 1.0

2008-09-09 Thread David Zhou
gednewforms-adminintotrunk Specifically, the "Changed prepopulate_from to be defined in the Admin class, not database field classes" section. --- David Zhou [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribe

Unittest for Formwizard

2008-09-11 Thread David Reynolds
Hi, I am attempting to write a unit test for a Formwizard, but I can't seem to make it work. Has anyone else attempted this or does anyone have any pointers? I think the problem might be the hash not matching, between the steps. -- David Reynolds [EMAIL PROT

Re: request.POST.get is not working

2008-09-11 Thread David Reynolds
Me.. Check your javascript is being called, by sticking an alert in the function? Check your development log to see if the post is going through correctly? Print the contents of request.POST to see if the data is getting through? All/one of these should be useful for debugging what is going on. --

Re: Filtering ManyToManyField

2008-09-11 Thread David Reynolds
els.py#L458 -- David Reynolds [EMAIL PROTECTED] --~--~-~--~~~---~--~~ 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: Unittest for Formwizard

2008-09-11 Thread David Reynolds
actual wizard is working fine, I'm just trying to work out how I can make a test against it... -- David Reynolds [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" gr

Re: Restricting views

2008-09-11 Thread David Zhou
d permissions. I usually do so anyway, in case I need to change how permission works in the future. --- David Zhou [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" grou

Re: ***SPAM*** A trick to force autoreloading, in case of changes in views.py

2008-09-12 Thread David Thole
es it. If you're using apache - do you mind if I ask what advantages you have with Apache that the built in web server doesn't have? Not questioning, just very curious is all. -David http://www.thedarktrumpet.com On Sep 12, 11:00 am, n00m <[EMAIL PROTECTED]> wrote: > On Sep 12, 6:

Re: Map API's and Django, preferences?

2008-09-15 Thread David Christiansen
l method. It seems to be working pretty well so far, though I could decrease server load by only querying the polygons that haven't been queried before. Have you written Javascript before? -David On Sep 13, 4:15 pm, TiNo <[EMAIL PROTECTED]> wrote: > I wanted to do the same. I dec

Re: Running into errors using S3 backend for Django

2008-09-14 Thread David Zhou
n't support absolute paths. Sounds like you just need to define that method for the S3 backend. It's falling back on the base method that spits out the exception. --- David Zhou [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this messa

Re: Running into errors using S3 backend for Django

2008-09-15 Thread David Larlet
Le 15 sept. 08 à 07:16, David Zhou a écrit : > On Sep 15, 2008, at 1:01 AM, vinay wrote: > >> File "/usr/lib/python2.5/site-packages/django/core/files/ >> storage.py", line 81, in path >> raise NotImplementedError("This backend doesn't support absol

Re: The User mess

2008-09-15 Thread David Larlet
2008/6/23 ricardo soares <[EMAIL PROTECTED]> > > > 2008/6/13, ricardo soares <[EMAIL PROTECTED]>: >> >> >> >> 2008/5/28, ricardo soares <[EMAIL PROTECTED]>: >>> >>> Welcome to Casino Fantasy™ We are part of the largest, longest-running >>> and most popular group of International online casinos. Ou

Re: Map API's and Django, preferences?

2008-09-15 Thread David Christiansen
Here's what my code looks like to get information from the server to display on the map: function update_locations () { bounds = map.getBounds(); sw = bounds.getSouthWest(); ne = bounds.getNorthEast(); $.getJSON('/locations/locations/', {'lat1':sw.lat(), 'long1':sw.lng

Re: Recommendations for local web dev on Mac OS X 10.5 vs. developing against WebFaction Linux box

2008-09-15 Thread David Zhou
, if you're used to VIM at all, MacVim (http://code.google.com/p/macvim/) is pretty awesome. --- David Zhou [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To p

Re: Map API's and Django, preferences?

2008-09-16 Thread David Christiansen
On Sep 15, 5:05 pm, chiggsy <[EMAIL PROTECTED]> wrote: > It makes a fair bit of sense.. I've heard a lot of good things about > jquery. If you could post the view later I think I'll be off and > running. Thank you for the help with this. I find the difficulty > with web coding is beginnings...

Re: Absolute URL vs Relative URL, or ~ ?

2008-09-16 Thread David Reynolds
e "/mysite/" to "/v2/" (and the other settings to reflect your settings) and you should be away. -- David Reynolds [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Djang

Recursively rendering in template

2008-09-24 Thread David Koblas
I'm not sure if this is possible to do without writing a templatetag (ok, that's my theory). Basic idea is that I have a tree structure that I want to render into a template, the one example that I found pre-rendered a template into a template variable and then rendered it into the page. What

Duplicate files being created on ImageField.save

2008-09-26 Thread David Christiansen
I'm in the process of developing a site in Django that includes the following in the models.py: def image_path(page, filename): return "content_images/page/%s/original/%s" % (page.pk, filename) def image_scaled_path(page,filename): return "content_images/page/%s/scaled/%s" % (page.pk, fil

Re: actual django stack

2008-09-26 Thread David Zhou
ation stuff or additional security > hardening. This will probably be the case for many teams since Nginx > is so new. I've also heard good things about WSGI -- though I haven't heavily tested its stability compared to, say, mod_python. --- David Zhou [EMAIL PROTECTED] --~--~

Re: Admin field custom validation

2008-09-29 Thread David Reynolds
missal (if I use clean_logo) 'NoneType' object is > unsubscriptable. > > Does that make sense ? In clean() you must return self.cleaned_data and similarly in clean_logo() you must return self.cleaned_data['logo'] or else you will get the blank field in your database

Re: Duplicate files being created on ImageField.save

2008-09-29 Thread David Christiansen
> > I had a similar issue. > > The fix i have found on the web is to wrap your action in an if > statement to make sure you only do it once > > Something like > >       def save(self): >          if not image_scaled: >             scaled_name = os.path.split(self.image_original.name)[-1] >      

Re: Anti-spam suggestions (strange case)

2008-09-29 Thread David Reynolds
On 24 Sep 2008, at 3:40 pm, Grigory Fateyev wrote: > Maybe create new field w/ captcha validation? http://smileychris.tactful.co.nz/ramblings/recaptcha/ .. is a good place to start. -- David Reynolds [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received t

Re: Highlight current active page

2008-09-30 Thread David Reynolds
list of pages in your context. -- David Reynolds [EMAIL PROTECTED] --~--~-~--~~~---~--~~ 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

Django model version control

2008-10-01 Thread David Hall
I've just released an open-source version control application for Django. It is available for download from Google code. http://code.google.com/p/django-reversion/ Features include: - Roll back to any point in a model's history - an unlimited undo facility! - Recover deleted models - never

Re: Django model version control

2008-10-01 Thread David Hall
-reversion deals with maintaining versions of the model data. It does not integrate with subversion. Instead, it uses the django serialization framework to store serialized models in a special database table. David. David Hall wrote: > I've just released an open-source version control app

Re: Django model version control

2008-10-02 Thread David Hall
e() ...bar.save() This will group the two changes together. They can then be rolled back as a single unit. David. Marek Stępniowski wrote: > On Wed, Oct 1, 2008 at 5:25 PM, David Hall <[EMAIL PROTECTED]> wrote: >> I've just released an open-source version control applicati

Re: Django model version control

2008-10-02 Thread David Hall
tool. David. Bas van Oostveen wrote: > But your schema's will most likely change over time. And sometimes in > significant ways which do not have a likely default; e.g. splitting a > full_name field into a first_name and last_name field or visa-versa. > > Now after applying th

Re: Django model version control

2008-10-04 Thread David Hall
your schema. This makes it very easy to integrate with existing projects. David. Bas van Oostveen wrote: > > That is exactly what i did for a project :) > > When you register a model for versioning, automagicly a new model is > created which the original model + an 'versi

Re: Django model version control

2008-10-04 Thread David Hall
a candidate for the currently-inactive fullhistory branch. As such, your feedback and suggestions are vital to making this application as bombproof as possible. David. David Hall wrote: > I've just released an open-source version control application for > Django. It is available for

Re: Why does MySql gives warning? Incorrect string value: '\xE6\x9D\xB1\xE8\xA8\xBC...' for column 'title' at row 1

2008-10-06 Thread David Reynolds
e don't get all of those hyphens appearing all over the place? -- David Reynolds [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: Django model version control

2008-10-06 Thread David Hall
Hi Jonknee, Thanks for the bug report, I've uploaded a patch which should take care of that problem. I've taken the liberty of inviting you to a django-reversion Google discussion group. If you are interested in improving the system, I'd love to hear your feedback and c

Re: seeking help in model design...

2008-10-07 Thread David Hall
he Djano admin application. To traverse the tree, use the Node model. Once you have got to your required location in the tree, use node.job or node.shot to get the rest of the information. David. paul wrote: > hi, > > I'm designing my first django app and would appreciate any

Re: seeking help in model design...

2008-10-07 Thread David Hall
nt and Node.children. Traversing the tree using Job.parent, Job.children, Shot.parent or Shot.children will not work. I've implemented the first example in one of my own apps, and it does work! :P David. paul wrote: > hi david, > > many thanks for your help there. i initially tri

Re: random quote help

2008-10-08 Thread David Reynolds
bably what you want -- David Reynolds [EMAIL PROTECTED] --~--~-~--~~~---~--~~ 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 f

Ordering in Admin Interface

2008-10-08 Thread David Christiansen
Hello all, We are currently working on a project in which we would like to order the list of model instances on the admin interface by two separate parameters. So far, the second has been ignored. We've tried the following: 1. Setting the ordering attribute of the ModelAdmin subclass. The docu

Re: Using Javascript

2008-10-08 Thread David Reynolds
On 8 Oct 2008, at 3:18 pm, Johnny wrote: > Someone's got an idea? Write a django view that returns JSON and use your Javascript to call that. You should be able to parse the JSON from javascript. -- David Reynolds [EMAIL P

Re: Ordering in Admin Interface

2008-10-09 Thread David Christiansen
ing when someone clicks the column headers? I'll poke around and find a dirty hack. Thanks for the pointer on the ChangeList.get_ordering()! -David Christiansen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "

macports and django problem

2008-10-12 Thread David Koppstein
/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/X11R6/bin:/Users/david/bin:/sw/bin:/sw/sbin:/Users/david/godi/bin:/Users/david/godi/sbin:/usr/local/smlnj-110.67/bin:/opt/local/bin:/opt/local/sbin Has anyone installed Django successfully using MacPorts? I really like the idea of MacP

Re: macports and django problem

2008-10-12 Thread David Koppstein
omputer, though :-(. Does anyone know if the BSDs have this problem? I'm thinking of switching rather soon. David Jarek Zgoda wrote: > Wiadomość napisana w dniu 2008-10-12, o godz. 17:26, przez David > Koppstein: > > >> I have updated my $PATH variable properly: &g

Re: How can I check which view is being called in response to a specific Url?

2008-10-13 Thread David Reynolds
r as set by the XViewMiddleware should tell you what view is being called by a URL -- David Reynolds [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this gr

Re: Which IDE do you choose with django?

2008-10-14 Thread David Reynolds
On 13 Oct 2008, at 7:09 pm, Django users wrote: >> I am a newbie of django, and want to know which IDE is suit for >> django? >> >> thank your Textmate on OS X -- David Reynolds [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received

Re: Generating a file from lots of data

2008-10-15 Thread David Reynolds
goproject.com/en/dev/howto/outputting-csv/#using- > the-python-csv-library I think I thought I'd be able to make a more flexible output - I may have been wrong. Do you think the csv module would be quicker? Thanks, David -- David Reynolds [EMAIL PROTECTED] --~--~-~--~---

Generating a file from lots of data

2008-10-15 Thread David Reynolds
any more information is needed please let me know. Thanks, David 0 - http://docs.djangoproject.com/en/dev/howto/outputting-csv/#using- the-template-system -- David Reynolds [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are

Re: Generating a file from lots of data

2008-10-16 Thread David Reynolds
he AddressBook model details, so a query is run for each row as it is added to the csv output to get the Address details. Is there anyway I can optimise this with the ORM or am I looking at writing some custom SQL or denormalising the data? Thanks for any advice

Re: Generating a file from lots of data

2008-10-16 Thread David Reynolds
dex is used for a > join... Well, this starts getting complicated and sslightly OT - you > may want to seek more help on the topic on a more appropriate > neswgroup anyway...) Also noted. Many thanks for your help Bruno. Thanks, David -- David Reynolds [EMAIL PROTECTED] --~--~

Re: How to get a page in Django?

2008-10-17 Thread David Reynolds
On 17 Oct 2008, at 5:08 am, Gnarlodious wrote: > I don't know anything about Python except for how to run SQLite > commands. Mostly my strong point is HTML&CSS. If you familiar with another programming language, may I suggest Dive into Python? http://diveintopython.org/ --

Re: Django-OAuth Issue

2009-01-19 Thread David Larlet
Chris, It seems that oauth_token argument is missing from your response. Do you still have errors with your code? Do not hesitate to contact me directly if that's the case, I do not want to spam this mailing-list with custom apps support. Regards, David Le 14 janv. 09 à 05:49, Ch

Re: proper way to use S3Storage and Django ImageField

2009-01-19 Thread David Larlet
serprofile/cs1.jpg > > Any suggestions? Hi Aaron, Sorry for my late answer, I was on holidays, what about instance.url()? (that's the recommended way to do, .path() is for local storages) Regards, David --~--~-~--~~~---~--~~ You received this message bec

Re: proper way to use S3Storage and Django ImageField

2009-01-19 Thread David Larlet
Le 20 janv. 09 à 01:48, Aaron Lee a écrit : > Thanks David, but it seems awkward to call > > avatar.image.storage.url(str(avatar.image)) > > to retrieve the URL for an ImageField. > Do you have a better way? avatar.image.url should work (without parenthesis, that's a

Model.save() vs. ManyToMany

2009-01-21 Thread David Gordon
s db stuff going on? Perhaps I could force it to flush before I run my update methods? thanks, David --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send ema

Re: Model.save() vs. ManyToMany

2009-01-21 Thread David Gordon
lso noticed that if I entered values for components myself in the admin interface, they would appear, but I couldn't see any reference to them in the SQL printed from Xeme.save(). That's how I got the idea it may be happening elsewhere. thanks for your help, David --~--~-~--~~

Re: Cannot serve static files

2009-01-22 Thread David Zhou
On Thu, Jan 22, 2009 at 10:53 AM, john wrote: > > No matter what i do i can't get my css to load. 100% Frustrated with > Django. My index page loads when i request http://127.0.0.1:8000/ but > it is not styled. Django dev server returns 404 in console for "GET / > css/styles.css HTTP/1.1" Try do

Re: Model.save() vs. ManyToMany

2009-01-22 Thread David Gordon
may be happening elsewhere. Thanks to anyone who can explain this for me - is it expected behaviour or am I doing something wrong? thanks, David --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users

Re: Django-OAuth Issue

2009-01-25 Thread David Larlet
Hello Chris, Le 25 janv. 09 à 02:40, Chris a écrit : > > Hello David sorry for the late response. I think that I found a minor > bug with django-oauth. > > So I tried Malcolm Tredinnick's recommendation and used the client > oauth library found here: > http://oauth.goog

sites framework with multiple machines

2009-01-27 Thread David Lindquist
I have a client that maintains several hundred small web sites running on dozens of different machines all over the world. These sites have common data (footers, privacy policy pages, etc.) he would like to manage through a single CMS. Currently, he uploads all the changes manually using F

Modifying pythonpath in settings.py

2009-02-18 Thread David Zhou
I've been doing the following for a while, but I'm not sure if it has unintended side effects: #settings.py import os, sys sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)), 'apps')) I keep pluggable apps in an svn repo, and do checkouts of the ones I need in the apps folde

Re: Modifying pythonpath in settings.py

2009-02-18 Thread David Zhou
b 19, 2009 at 12:10 AM, David Zhou wrote: > I've been doing the following for a while, but I'm not sure if it has > unintended side effects: > > #settings.py > import os, sys > sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)), > 'apps'

Removing fields in a form subclass

2009-02-20 Thread David Zhou
Suppose I had this form: class BaseForm(forms.Form): field1 = forms.CharField(...) field2 = forms.Charfield(...) And then in a subclass, I had: class SubForm(BaseForm): field1 = forms.EmailField(...) What's a good way to remove field2 in SubForm? Setting field2 = None didn't work.

Re: Removing fields in a form subclass

2009-02-20 Thread David Zhou
Do you mean del self.fields['field2'] in SubForm's __init__? -- dz On Fri, Feb 20, 2009 at 10:39 AM, Alex Koshelev wrote: > Try this: > > del SubForm.fields['fields2'] > > > On Fri, Feb 20, 2009 at 6:15 PM, David Zhou wrote: >> >> S

Re: Removing fields in a form subclass

2009-02-20 Thread David Zhou
(BaseForm): > field1 = forms.EmailField(...) > > del SubForm.base_fields['fields2'] > > On Fri, Feb 20, 2009 at 6:45 PM, Alex Koshelev wrote: >> >> No. Place this code right after the SubForm definition. >> >> On Fri, Feb 20, 2009 at 6:42 PM, David Zho

Re: Removing fields in a form subclass

2009-02-20 Thread David Zhou
edinnick wrote: > > On Fri, 2009-02-20 at 10:15 -0500, David Zhou wrote: >> Suppose I had this form: >> >> class BaseForm(forms.Form): >> field1 = forms.CharField(...) >> field2 = forms.Charfield(...) >> >> And then in a subclass, I had:

Re: trying to get whether image is wider or deeper in templatetag

2009-02-20 Thread David MacDougall
.split() if len(bits) == 2: photoobj = bits[1] varname = 'image_is_vertical' elif len(bits) == 4: photoobj = bits[1] varname = bits[3] else: raise template.TemplateSyntaxError, "'%s' tag takes either one or two arguments"

Re: trying to get whether image is wider or deeper in templatetag

2009-02-22 Thread David MacDougall
lm Tredinnick wrote: > On Fri, 2009-02-20 at 22:03 -0800, David MacDougall wrote: > > Hi Malcolm, > > Thanks for your patient guidance. I took your advice on a better name > > for the variable. Now it should return true if the image_is_vertical. > >  I am getting a lot clos

Re: how to use django ORM in standalone script ?

2009-02-23 Thread David Reynolds
aw sql. What should I import to plug in django in > standalone script that runs from command line ? I find this useful for when I need to make a standalone script: http://www.b-list.org/weblog/2007/sep/22/standalone-django-scripts/ -- David Reynolds da.

Re: Hosting an Email server and receiving all mails pertaining to @mysite.com

2009-02-23 Thread David Reynolds
koverflow but > didn't receive any help. Please help me. Thankyou. I don't believe this is related to the usage of Django. You may be better off looking for a Postfix usergroup or mailing list. -- David Reynolds da...@reynoldsfamily.org.uk --~--~-~--~~~-

Re: Delete "hook" for admin

2009-02-23 Thread David Reynolds
uot;cleaner" or "proper" way to do > this? A hook to do what exactly? If you mean what I think you mean then you can override the delete() method on the Model, or you can use Signals. -- David Reynolds da...@reynoldsfamily.org.uk --~--~-~--~~~---~--

Re: trying to get whether image is wider or deeper in templatetag

2009-02-23 Thread David MacDougall
photoobj = bits[1] varname = bits[3] else: raise template.TemplateSyntaxError, "'%s' tag takes either one or two arguments" % bits[0] return WideOrDeepNode(photoobj,varname) On Feb 22, 7:30 pm, Malcolm Tredinnick wrote: > On Sun, 2009-02-22 at

Re: multiple S3 buckets using David Larlet's S3Storage.py

2009-03-09 Thread David Larlet
Le 7 mars 09 à 05:33, wynfred a écrit : > > David Larlet's Amazon S3 wrapper for Django seems widely used, and I'm > inclined to use it. However, there's something in the documentation > that confuses me: > http://code.welldev.org/django-storages/wiki/S3Storage

Validating interdependent inlines

2009-03-11 Thread David Gouldin
I have an admin class with a couple of inlines, and I need to validate that either one or the other has at least one instance populated. Since each inline has its own separate form in newforms admin, I'm having difficulty determining how to validate inlines that depend on each other. Any suggesti

Re: Validating interdependent inlines

2009-03-11 Thread David Gouldin
: > On Wed, Mar 11, 2009 at 6:40 AM, David Gouldin wrote: > > > I have an admin class with a couple of inlines, and I need to validate > > that either one or the other has at least one instance populated. > > Since each inline has its own separate form in newforms admin, I&#

Re: OT: svn and '$Id$'

2009-03-24 Thread David Lindquist
On Mar 24, 2009, at 10:09 AM, Alan wrote: > Hi there, > > It's a bit off topic but I guess appropriate anyway. > > So I want to use '$Id$' in my *.py files where '$Id$' got replaced > when I commit my files via svn. > > But I googled and I still couldn't make it work. Can somebody tell > to m

Re: OT: svn and '$Id$'

2009-03-24 Thread David Lindquist
On Mar 24, 2009, at 10:09 AM, Alan wrote: > Hi there, > > It's a bit off topic but I guess appropriate anyway. > > So I want to use '$Id$' in my *.py files where '$Id$' got replaced > when I commit my files via svn. > > But I googled and I still couldn't make it work. Can somebody tell > to m

Re: Why won't my form validate?

2009-03-24 Thread David Zhou
If it's not valid, then something likely threw a validation error. What does the error say? -- dz On Tue, Mar 24, 2009 at 3:11 PM, Theme Park Photo, LLC wrote: > > It has data! It was created from an existing instance...and all the > fields have values > > 'body': u'hello there', 'allow_comme

Re: Why won't my form validate?

2009-03-24 Thread David Zhou
ting a ModelForm from an existing > instance would give it valid data, but that's not the case. (Though > the Django Documentation doesn't say this: > http://docs.djangoproject.com/en/dev/topics/forms/modelforms/ ) > > > On Mar 24, 12:15 pm, David Zhou wrote: >> If it&#

Re: marrying django to twitter

2009-06-30 Thread David Zhou
On Tue, Jun 30, 2009 at 11:21 PM, Kenneth Gonsalves wrote: > > has anyone succeeded in marrying django to twitter - that is broadcasting > updates in the django db to twitter? I did see one post on the subject in the > archives, but there was no information as to whether the operation was > succe

Bug in manage.py?

2009-07-13 Thread David Lindquist
Hi Everyone, I discovered by accident that if you have an app with the same name as the project, then `python manage.py shell` (and similar commands) cannot import the settings file. I assume this is due to how Django updates sys.path. I would expect Django update sys.path to look in the project

Re: Bug in manage.py?

2009-07-13 Thread David Lindquist
D'oh! OK, I am an idiot. I did not create the app with `manage.py startapp`. I simply created the directory on the command line. Django does in fact complain. Guess I got what I deserved ;) On Jul 13, 4:01 pm, David Lindquist wrote: > Hi Everyone, > > I discovered by accident th

Re: easy way of display an user bar?

2009-07-28 Thread David Christiansen
If you're using the standard context processors, then just make sure to use RequestContext and you'll have a user variable in your template context. The only downside is that this will _only_ work when you're using RequestContext, so your template should probably do something like {% if user %}{{

subclassed ModelForms initial values behavior changed from 1.1beta to 1.1

2009-08-01 Thread David Haas
Hi: I'm hoping to get some feedback on a little change in behavior I'm seeing when initializing ModelForms between 1.1-beta & the official 1.1 release. The quick and dirty explanation is this: I have a ModelForm which is a subclass of another ModelForm. The parent ModelForm has the fields attri

Re: subclassed ModelForms initial values behavior changed from 1.1beta to 1.1

2009-08-01 Thread David Haas
s wrote: > On Sat, Aug 1, 2009 at 8:28 PM, David Haas wrote: > > > Hi: > > > I'm hoping to get some feedback on a little change in behavior I'm > > seeing when initializing ModelForms between 1.1-beta & the official > > 1.1 release. > > > The

Re: Using email instead of username in extended "User" model?

2009-08-02 Thread David Koblas
Just to add my $0.02 cents to this, I too would like a better way to extend django.contrib.auth.models.User than the current approach. The two biggest "problems" that I have are: * Everything depends on django.contrib.auth.models.User -- which means that while you could swap out your authenti

Re: subclassed ModelForms initial values behavior changed from 1.1beta to 1.1

2009-08-02 Thread David Haas
ie into this somehow, eventually, maybe. If you agree with that, though, then currently both ModelForms & ModelFormsets initialization is broken, because neither fills in the values. - D On Aug 2, 6:24 am, Russell Keith-Magee wrote: > On Sun, Aug 2, 2009 at 12:58 PM, David Haas wrote: &

Re: subclassed ModelForms initial values behavior changed from 1.1beta to 1.1

2009-08-07 Thread David Haas
Fair enough. I've got some style questions about the best way to do what I want to do, but they're probably not so relevant here. Something that might be relevant is this . . . is it worth submitting a documentation patch for this issue? I was thinking something on this page: http://docs.django

Re: How to get rid of the 'u'? Seems to be everyhere :)

2009-08-08 Thread David Zhou
See: http://diveintopython.org/xml_processing/unicode.html -- dz On Sat, Aug 8, 2009 at 11:27 PM, Joshua Partogi wrote: > u' stands for Python unicode. > > On Sun, Aug 9, 2009 at 12:03 PM, strotos wrote: >> >> Hey all, >> >> I am very new to Django and am having a bit of trouble with somethi

Re: logic in templates

2009-08-12 Thread David Zhou
The easiest way is probably moving that list to the view. For example customers = Customer.objects... sellers = Seller.objects... filtered_list = [pair for pair in zip(sellers, customers) if pair[0].customer_id == pair[1].id] Then pass filtered_list into the template context. Inside the templ

Re: digg style pagination

2009-08-14 Thread David Zhou
http://tinyurl.com/mj29fw -- dz On Fri, Aug 14, 2009 at 2:54 PM, sniper wrote: > > I am trying to do pagination. Just wanted to know if there is a > shortcut to show digg style pagination or i have to write my own? > I am asking this because in the admin page, the list page uses digg > style p

Re: Using glovar vars

2009-08-17 Thread David Zhou
For what you describe, you're not looking for "global" variables in the sense that you want some value persisted in the same process. You're looking at session variables, which are variables persisted for a specific user session. See: http://docs.djangoproject.com/en/dev/topics/http/sessions/ H

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