Re: Urlconf page not found question

2008-10-26 Thread David Rodrigues
Or if you have ^accounts in parent urls.py file, then perhaps the '$' at the end of the ^login/$ expression is problematic, as the dollar sign represents the end of a line, I believe. On Oct 26, 2008, at 10:02 AM, Daniel Roseman wrote: > > On Oct 26, 1:23 pm, ehpmail <[EMAIL PROTECTED]> wrot

Re: Where is my Django?

2008-10-27 Thread David Reynolds
On 23 Oct 2008, at 5:32 pm, leonel wrote: > dpkg -l python-django shows all the package contents .. No, dpkg -l gives you a list of packages your system knows about it must be dpkg -L python-django as I noted before ;) -- David Reynolds [EMAIL PROTEC

FormWizard and ChoiceFields

2008-10-28 Thread David koblas
I've recently discovered FormWizard -- trying to replace my own "Wizard" in some code. I've got the following flow -- roughly : 1) authentication info (username/password) 2) use auth info to get a list of things -- present list in choice field... 3) given that choice, present anothe

Re: Migrate app from MySQL to PostgreSQL

2008-10-30 Thread David Christiansen
Why not just dump the data using manage.py dumpdata, switch your settings file to point to the new DB, run syncdb, and then use manage.py loaddata to get it all back? That should be pretty easy. -David Christiansen On Oct 30, 2:39 am, "Naitik Shah" <[EMAIL PROTECTED]> wrote: &

Re: Beginner on Django and web developing

2008-11-03 Thread David Zhou
ty out of date at this point, and some sections -- like the Admin site -- will simply not work. Your best bet is to go through the tutorials on the Django documentation site. David Zhou [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message be

Re: Beginner on Django and web developing

2008-11-03 Thread David Zhou
o is that a lot of the older documentation and literature may no longer apply. The good news is that once you learn Django 1.0, there shouldn't be any future breaking changes for some time. -- --- David Zhou [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received

Re: saving multiple versions of an uploaded image

2008-11-05 Thread David Christiansen
It's also worth looking into the sorl.thumbnail library. This has an ImageWithThumbnailField that does this work for you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, s

including javascript in templates

2008-11-06 Thread David Sáez
Hi, I'm a newbie to django and I'm dealing with some configuration stuff that is making me going crazy. My problem is very simple and I have a temporal solution, but I guess there might be a better way to do it. So... there goes the question... ¿ How do I include javascript in a basic template ?

Re: including javascript in templates

2008-11-06 Thread David Sáez
.35 skrev David Sáez: > > > > > > > Hi, I'm a newbie to django and I'm dealing with some configuration > > stuff that is making me going crazy. My problem is very simple and I > > have a temporal solution, but I guess there might be a better way to > >

allowing tags on __str__ def

2008-11-09 Thread David Rodrigues
Hi all. Does anyone know a way to allow html tags to remain un-escaped when using the __str__ def in a model class? I tried using "allow_tags = True" but that was silently ignored by Django. I am using version .96 of Django and unfortunately I cannot upgrade just yet. Thanks for your help.

Re: ' Change History' for audit, compliance

2008-11-11 Thread David Zhou
e data , the old value and the new value etc > That's a debatable point, but it would be fairly easy to create a Change model, and either define save() methods or use pre/post save signals to populate changes so that you have a change hist

Re: ' Change History' for audit, compliance

2008-11-11 Thread David Hall
use to write your own views and template tags. Check it out here: http://code.google.com/p/django-reversion/ Best wishes, David. Low Kian Seong wrote: > Is it possible to record and show more information such as who changed > a field from what original value to what new value? >

Re: Recursive function

2008-11-12 Thread David Christiansen
27;re describing, and it is quite effective and easy. -David Christiansen --~--~-~--~~~---~--~~ 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

Custom joins on multiple columns with Q objects

2008-11-14 Thread David Elias
I'm using with Django 0.96 a custom Q object to make joins between models, here's an example: class Product(models.Model): group = models.IntegerField() # primary key code = models.CharField() # primary key name = models.CharField() ... class CartItem(models.Model): product_g

Re: Custom joins on multiple columns with Q objects

2008-11-15 Thread David Elias
Malcolm Tredinnick wrote: > At some point in the future, multi-valued ON constraints might make an > appearance (for example, multi-column primary key queries are possibly > easier to write), but they might not, too. The slight preference for > doing so at some point is that there are a couple of

Re: Multithreaded Dev Server

2008-11-15 Thread David Zhou
the second > request just hangs until the file upload completes, preventing the > status update. Is there any way to make the dev server multi-threaded? It's probably easier to just use apache at that point. -- --- David Zhou [EMAIL PROTECTED] --~--~-~--~~~---

Re: Multithreaded Dev Server

2008-11-15 Thread David Zhou
e one of the pure python servers out there. See: http://www.eflorenzano.com/blog/post/hosting-django-site-pure-python/ -- --- David Zhou [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Djang

Re: Best way for making a "Poll"?

2008-11-16 Thread David Zhou
topics/forms/#customizing-the-form-template -- --- David Zhou [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.c

Re: cascading drop down lists

2008-11-16 Thread David Zhou
ev/ref/contrib/formtools/form-wizard/#django.contrib.formtools.wizard.FormWizard.process_step -- --- David Zhou [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@googleg

Re: In forms, how add dynamic initial values out of reach for clients?

2008-11-16 Thread David Zhou
isitors/clients. > ... > How should i solve this? I've tried numerous ways but none of them > really worked. http://docs.djangoproject.com/en/dev/topics/forms/modelforms/#using-a-subset-of-fields-on-the-form --- David Zhou [EMAIL PROTECTED] --~--~-~--~~~---

Re: avoid cascade delete

2008-11-16 Thread David Zhou
gt; How do I avoid the default behavior that does a cascade delete. Of > course I could use the cursor but would am hoping there is some option > I don't know of for delete(). Try using clear() prior to deleting: http://docs.djangoproject.com/en/dev/topics/db/queries/#following-relation

Re: avoid cascade delete

2008-11-16 Thread David Zhou
On Mon, Nov 17, 2008 at 2:34 AM, David Zhou <[EMAIL PROTECTED]> wrote: > On Mon, Nov 17, 2008 at 2:21 AM, Merrick <[EMAIL PROTECTED]> wrote: >> >> How do I avoid the default behavior that does a cascade delete. Of >> course I could use the cursor but would am

Re: avoid cascade delete

2008-11-17 Thread David Zhou
e. And, IMO, the vast majority of foreign key use cases do benefit from an auto cascading delete. For the specific Links/Groups example, personally I'd just do it with a many to many relation. It's entirely feasible that in the future, Links will need the ability to associ

Re: Passing values to template

2008-11-17 Thread David Zhou
is other > than mixing objects and dictionaries in the list? What about making it a list of tuples, and including a type? {'articles': [('single', ), ('multiple', {1: , 2: }), ('single', )]} Then you could just do a {% for type, article in articles %}, and

Re: Custom joins on multiple columns with Q objects

2008-11-18 Thread David Elias
Another thing i can't resolve is construct contraints based in another model other than the query original one. With 0.96 i just passed the Options object - "q_filter.get_sql (other_model._meta)". Now I've tried: class QJoin(object): ... def add_to_query(self, query, used_aliases):

Re: Multiple types of output (HTML, JS), same view.

2008-11-18 Thread David Zhou
ibility is to give the decoration a "block" parameter, to render a specific block from a template. So you could have something like: @render_view('js', 'template.html', block='js_block') def view: pass -- --- David Zhou [EMAIL PROTECTED] --~--~

Re: Passing values to template

2008-11-18 Thread David Zhou
ist has different 'types' of renderings. My way put that logic into me template, but ideally, as Bruno said, each 'type' should be able to dispatch its own specific render. -- --- David Zhou [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You rec

Re: serving static file via django

2008-11-18 Thread David Zhou
of using > this view in a production env ? Have you considered using request/response signals? http://docs.djangoproject.com/en/dev/ref/signals/#module-django.core.signals -- --- David Zhou [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this messa

Re: Show image (but not ImageField) in admin?

2008-11-18 Thread David Zhou
> CharField instead of ImageField, but then how do I go about showing it > inline? fieldsets.description doesn't allow anything but text. You can write your only readonly image widget, and apply it in the admin by specifying your own form: http://docs.djangoproject.com/en/dev/ref/contr

Re: serving static file via django

2008-11-18 Thread David Zhou
On Tue, Nov 18, 2008 at 9:40 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > david, > > can you illustrate how ? sorry -- havent worked with django signals > earlier I might be misunderstanding your need to track requests to that file, but if you're using it to t

Re: form issue

2008-11-18 Thread David Zhou
I'm getting the following error: > > global name 'form' is not defined > > > am I missing something? > > > -- --- David Zhou [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups &q

Re: serving static file via django

2008-11-18 Thread David Zhou
7;s solely used to track hits? Is there any reason you can't track your hits in views prior to template rendering? On Wed, Nov 19, 2008 at 12:34 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > david, > > its a biz requirement for me to track what http requests are being &

Re: serving static file via django

2008-11-18 Thread David Zhou
it its ok inproduction env though.. Do you not know which pages the gif will live on? Why not grab visitor data in the views of the pages that use the transparent gif? -- --- David Zhou [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because

Re: serving static file via django

2008-11-20 Thread David Christiansen
I can send you a sample of something where I do something similar. -David Christiansen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users

Re: Why are models referenced without a capital letter in templates

2008-11-23 Thread David Zhou
s > first letter is automatically converted to lower case. > > Am I on the right lines here? If so, what happens if you declare your > classes with all lower case letters in models.py? > > > Thanks, > > > -- --- David Zhou [EMAIL PROTECTED] --~--~-~--~~-

Re: Why are models referenced without a capital letter in templates

2008-11-23 Thread David Zhou
and how they pass things to the template context. -- --- David Zhou [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

Disabling Admin validation

2008-11-24 Thread David Reynolds
Hi, Does anyone know of an easy way to disable the admin areas validation of my model admin classes without setting DEBUG to False which does it, but is not much use in development. Thanks, David -- David Reynolds [EMAIL PROTECTED

Re: parameter not getting passed to view function

2008-11-24 Thread David Zhou
T" > > urls.py >(r'^hello/(?P)\S+/$', 'swamiji.poll.views.hello') Check your URL regexp and grouping. -- --- David Zhou [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups &

Re: Executing raw Python

2008-11-24 Thread David Zhou
t;> >> Thanks, >> Alex >> > >> > > > -- > Adi J. Sieker mobile: +49 - 178 - 88 5 88 13 > Freelance developer web:http://www.sieker.info/profile > SAP-Developer > > > > -- --- David Zhou [EMAIL PROTECTED] --~--~-~--~~--

Re: Injecting stuff to an existing list?

2008-11-25 Thread David Zhou
} for person {{person}} {% endfor %} Personally, if the current age of a person is something you'll be using often, I'd add it to the model. -- --- David Zhou [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: Injecting stuff to an existing list?

2008-11-25 Thread David Zhou
On Tue, Nov 25, 2008 at 9:05 AM, Steve Holden <[EMAIL PROTECTED]> wrote: > > David Zhou wrote: >> On Tue, Nov 25, 2008 at 3:55 AM, sajal <[EMAIL PROTECTED]> wrote: > [...] >> >> Personally, if the current age of a person is something you'll be >>

Does Django have a function that can be called by every view function ?

2008-11-30 Thread David Shieh
I have used Django for several months , and it really attacts me . I love it. But when I use it more , I found a problem troubles me , that is , I can't find a way to make a function be called by every view function automatically . I used CakePHP , it have a function named beforeFilter() . It wil

Re: Does Django have a function that can be called by every view function ?

2008-11-30 Thread David Shieh
pass some parameters to every views function . Any suggestions ? On Dec 1, 11:49 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Sun, 2008-11-30 at 19:41 -0800, David Shieh wrote: > > [...] > > > I have searched for some information . I know that middleware can

Re: Does Django have a function that can be called by every view function ?

2008-11-30 Thread David Shieh
2008-11-30 at 21:48 -0800, David Shieh wrote: > > Thanks , Malcolm , > > > I think your solution can resolve my problem.But does it a bit > > complex ? > > In fact , what I really want is a view function that will be called by > > every view function. > >

Re: Does Django have a function that can be called by every view function ?

2008-11-30 Thread David Shieh
yeah , I will consider about middleware , and I am also thinking about write a class that contains the functions I need , and other funcions just inherit it , will it work ? On Dec 1, 2:41 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Sun, 2008-11-30 at 22:35 -0800, David Sh

Re: Does Django have a function that can be called by every view function ?

2008-11-30 Thread David Shieh
nse . Right now , I can't test it , but if django won't initiate the views.py as a class , this method will make no sense. On Dec 1, 2:52 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Sun, 2008-11-30 at 22:46 -0800, David Shieh wrote: > > yeah , I will consid

Re: Does Django have a function that can be called by every view function ?

2008-11-30 Thread David Shieh
I have found a post in here : http://davyd.livejournal.com/262859.html this is the way this author resolves this problem. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, s

Re: Does Django have a function that can be called by every view function ?

2008-11-30 Thread David Zhou
On Mon, Dec 1, 2008 at 2:23 AM, David Shieh <[EMAIL PROTECTED]> wrote: > I dont' know whether this make any sense . > Right now , I can't test it , but if django won't initiate the > views.py as a class , this method will make no sense. Why not write a dec

Re: Does Django have a function that can be called by every view function ?

2008-12-01 Thread David Shieh
Thanks , David Zhou , I will find some information for decorator And also , I will surf for middleware . Thank you very much , Malcolm. On Dec 1, 3:55 pm, "David Zhou" <[EMAIL PROTECTED]> wrote: > On Mon, Dec 1, 2008 at 2:23 AM, David Shieh <[EMAIL PROTECTED]> wrote:

Re: printing from the admin?

2008-12-01 Thread David Zhou
it with a custom CSS file but I hope there is a simple way. > Is there? If you want the layout to be print optimized, the easiest way is going to be using some custom admin templates that use some custom CSS. -- --- David Zhou [EMAIL PROTECTED] --~--~-~--~~~---~

Re: Does Django have a function that can be called by every view function ?

2008-12-01 Thread David Shieh
Thank you , guys ~ Your help are really good for me ~ On Dec 1, 11:23 pm, Jon Loyens <[EMAIL PROTECTED]> wrote: > Another +1 for decorators.  In fact, the example David S uses > authentication and logins as an example of what he wants to do and its > already handled as a decora

Re: how to create json from template?

2008-12-02 Thread David Zhou
On Wed, Dec 3, 2008 at 1:17 AM, Alex Koshelev <[EMAIL PROTECTED]> wrote: > > To trim last colon wrap it with if statement: > > {% if forloop.revcounter0 %},{% endif %} You can also do: {% if not forloop.last %},{% endif %} Which, IMO, is slightly more clear. --- David Zho

Re: cursors and raw sql

2008-12-04 Thread David Zhou
or? Assuming it's following standard Python database API practices, you can, if you want, but it's optional. -- --- David Zhou [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Dja

Re: Django is changing my html!

2008-12-04 Thread David Zhou
ht, since you had the inside the . Fix the markup, and it'll be fine, doctype and all. -- --- David Zhou [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. T

Re: Populating form from instance not working

2008-12-05 Thread David Zhou
djangoproject.com/en/dev/topics/forms/modelforms/ What does your form class look like? -- --- David Zhou [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post

Re: Ruby on Rails vs Django

2008-12-05 Thread David Zhou
iffer much more than Python and Ruby. > There are "small" differences between Python and Ruby, but the core > philosophies and structures of Rails and Django on the other hand are > completely unrelated and pretty much incompatible. What do you think are the core philosophies of Rails and

Re:

2008-12-05 Thread David Zhou
them in a new tab or anything of that nature? -- --- David Zhou [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@goog

Re: keep html

2008-12-07 Thread David Zhou
browsers have some such way to see the raw html > for a page.) Or am I misunderstanding your question? If the question is getting at the actual admin site templates, see: http://docs.djangoproject.com/en/dev/ref/contrib/admin/#overriding-admin-templates -- --- David Zhou [EMAIL PROTECTED]

Re: Displaying image stored in models.ImageField

2008-12-09 Thread David Christiansen
Hello Craig, Just make sure not to use this in production. For your production site, you should really conifigure Apache or lighttpd or some other dedicated web server for the static content. The Django view isn't that efficient at it. -David Christiansen On Dec 8, 10:46 pm, "

Generate a simple news archive list?

2008-12-10 Thread David Lindquist
Hello, I am building a simple news app for my employer's website. I am using Django's date-based generic views for the various pages. I want to have a sidebar listing the archive by year and month like this: 2008 - November - December 2009 - January with each item linking to its view (year, m

Re: Generate a simple news archive list?

2008-12-10 Thread David Lindquist
Perfect! I can't believe I overlooked that in the documentation. Thanks Brian On Dec 10, 2:15 pm, Brian Neal <[EMAIL PROTECTED]> wrote: > On Dec 10, 2:31 pm, David Lindquist <[EMAIL PROTECTED]> wrote: > > > > > Hello, > > I am building a simple news

Re: How can I report a new user?

2008-12-11 Thread David Reynolds
was always suggested as being better - not sure if that is still true though. -- David Reynolds [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post t

Re: No documentation link on admin interface.

2008-12-12 Thread David Lindquist
On Dec 12, 2008, at 5:05 PM, waltbrad wrote: > > I'm using 1.0 -- I keep reading that there is supposed to be one in > the upper right hand corner. I finally had to use Google images to > find an illustration. > > But I don't have that link displayed. I do have the "change > password / logout"

order by field length?

2008-12-16 Thread David Lindquist
I encountered a scenario where I need to query the database for a list of names sorted by length. In SQL this is easy: SELECT name from distributors_distributor ORDER BY LENGTH(name) Instead of writing raw SQL in my view, I am doing this: names = [x['name'] for x in Distributor.objects.values

Re: order by field length?

2008-12-16 Thread David Lindquist
Perfect. Exactly what I needed. Thank you Russ On Dec 16, 5:22 pm, "Russell Keith-Magee" wrote: > On Wed, Dec 17, 2008 at 9:04 AM, David Lindquist > > wrote: > > > I encountered a scenario where I need to query the database for a > > list of names sor

Re: TextMate Django Bundle

2008-12-22 Thread David Reynolds
On 17 Dec 2008, at 23:00, felix wrote: > and thanks to whoever made this ! very useful. The maintainer is PBX / Paul Bissex -- David Reynolds da...@reynoldsfamily.org.uk --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Inline admin forms

2009-01-02 Thread David Fokkema
view but then I really have to build my own admin resembling template. Or do I? And maybe, knowing which parts to override, this might be easy? Does someone know of the Django-Way (tm) to do something like this? Thanks! Regards, David --~--~-~--~~~---~--~~ You recei

Re: Do you recommend "Practical Django Projects"?

2009-01-05 Thread David Zhou
ems to me that "The Definitive Guide To Django" is more organized >> and covers a lot of materials. >> What do you think? > > As the author, I recommend waiting a couple months. Are you planning to update Practical Django Projects to 1.0? -- --- David Zhou da...@nodnod.n

Overriding Model's save method: error propagation

2009-01-05 Thread David Fokkema
iting? There was nothing wrong with the entered data, so it validates just fine, but I need to warn the user that the password was not synced with the other database. Thanks! Regards, David --~--~-~--~~~---~--~~ You received this message because you are subscrib

Re: Do you recommend "Practical Django Projects"?

2009-01-05 Thread David Zhou
On Mon, Jan 5, 2009 at 3:57 AM, Kenneth Gonsalves wrote: > > On Monday 05 Jan 2009 2:10:34 pm David Zhou wrote: >> >> and covers a lot of materials. >> >> What do you think? >> > >> > As the author, I recommend waiting a couple months. >> &

Re: Your IDE of choice

2009-01-06 Thread David Marko
I really like PyScripter http://pyscripter.googlepages.com/ , its very fast and has many, many features. They even have a small readme for Django debugging, here http://pyscripter.googlepages.com/django David http://www.tcl-digitrade.com

Returning large files from a view

2009-01-07 Thread David Lindquist
I would like to return a binary file from a view, and so far I have something like this: def my_file(request): file_data = open("/path/to/file", "rb").read() response = HttpResponse(file_data, mimetype="application/ whatever") response['Content-Disposition'] = 'attachment; file

Re: Returning large files from a view

2009-01-07 Thread David Lindquist
On Jan 7, 2009, at 4:15 PM, bruno desthuilliers wrote: > > On 7 jan, 23:37, David Lindquist wrote: >> I would like to return a binary file from a view, and so far I have >> something like this: >> >> def my_file(request): >> file_data = open("/pat

Re: Django too slow

2009-01-07 Thread David Zhou
o avoid so that it becomes faster First thing you need to do is figure out where the slowness originates. Is it from DB access? XML generation? If it's from DB access, include the code you're using to fetch data. If XML generation, likewise. -- --- Da

Where are all the Django jobs?

2009-01-10 Thread David Lindquist
First, I understand that the world economy is in a slump, and that the job market as a whole has not fared well of late. But even before the recent downturn, I noticed that there are precious few jobs in Django development (yes, I know about DjangoGigs.com). A simple keyword search on popu

Re: why 'No module named safestring'?

2009-01-11 Thread David Zhou
.com/browser/django/tags/releases/0.96/django/utils -- --- David Zhou da...@nodnod.net --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegro

Re: Templates Cant find the CSS file

2009-01-12 Thread David Zhou
re? See: http://docs.djangoproject.com/en/dev/howto/static-files/ And if you're using mod_python, also see: http://docs.djangoproject.com/en/dev/howto/deployment/modpython/#serving-media-files -- --- David Zhou da...@nodnod.net --~--~-~--~~~---~--~~ You r

Re: newforms library.

2009-01-12 Thread David Zhou
> original forms and allow for easier migration. seki, this is why it's always been recommended to do "import newforms as forms", since that allowed easier migration when newforms was renamed and replaced forms. -- --- David Zhou da...@nodnod.net --~--~-~--~~---

Re: CSS is not updated?

2009-01-12 Thread David Zhou
hen I spend an inordinate amount of time wondering why my changes aren't working when I was editing the wrong copy of the file the entire time. -- --- David Zhou da...@nodnod.net --~--~-~--~~~---~--~~ You received this message because you are subscribed t

Re: overriding Model.save(), do I need to override Model.create() also?

2009-01-12 Thread David Zhou
t's considered best practice. -- --- David Zhou da...@nodnod.net --~--~-~--~~~---~--~~ 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.

Re: new django user - no images appear on my site :(

2009-01-12 Thread David Zhou
et a Django error? If so, what is it? -- --- David Zhou da...@nodnod.net --~--~-~--~~~---~--~~ 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.

Re: Where are all the Django jobs?

2009-01-12 Thread David Lindquist
n who > influences what gets used in various situations. It's in those > situations that you'll get to grab your favorite tool: Django. > > Jon Loyens > Thinktiv, Inc. > > On Jan 11, 1:14 am, Malcolm Tredinnick > wrote: >> On Sat, 2009-01-10 at 15:38 -0700, D

Re: django 0.96 cancel template render automatically escape?

2009-01-12 Thread David Zhou
autoescaping later on. What you put in your template is what you got. -- --- David Zhou da...@nodnod.net --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this g

list all context variables?

2009-01-14 Thread David Lindquist
Is there an easy way to see a list of all the context variables and their values available in a given template? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send emai

Re: documentation offline, which CSS?

2008-07-15 Thread David Larlet
h a neat css. Unfortunately, it seems that it's not possible anymore to build the docs this way, I'll try to get that feature back in trunk. Cheers, David [0] http://sphinx.pocoo.org --~--~-~--~~~---~--~~ You received this message because you are subscrib

Re: Django has "save_model", but what about "delete_model"?

2008-08-19 Thread David Zhou
ngoproject.com/browser/django/trunk/django/contrib/admin/options.py?rev=8266#L404 --- David Zhou [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: Django has "save_model", but what about "delete_model"?

2008-08-19 Thread David Zhou
On Aug 19, 2008, at 1:02 PM, David Zhou wrote: > > On Aug 19, 2008, at 12:48 PM, Huuuze wrote: > >> The latest Django beta added this method to the admin models: >> >>>> save_model(self, request, obj, form, change) >> >> I have a business case where

Re: override model.save - prevent saving (admin)

2008-08-22 Thread David Zhou
entation/admin/#adding-custom-validation-to-the-admin --- David Zhou [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-use

Re: FileStorage S3Storage Error importing storage module S3Storage

2008-08-25 Thread David Larlet
to contact me with more details if you need help. Django do not require anymore to be patched for the use of storages since the merge of file storage refactoring (r8244). Best, David Le 23 août 08 à 23:42, tom a écrit : > > Hi, > > I am trying to move all my FileFields and ImageFiel

Re: S3 tutorial for File Storage Refactor?

2008-08-25 Thread David Larlet
you set. > You can continue to use upload_to to prefix the filename within the > bucket. > > Now, I've noticed a few bugs, both of which I've notified David (the > author) of: > 1) if you call object.filefield.size, this code will download the > entire file from

Re: Hosting with support for Satchmo webstore

2008-08-25 Thread David Zhou
on: http://brianmckinney.net/blog/2007/aug/22/installing-satchmo-webfaction/ --- David Zhou [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: Making Custom Model Methods to Work

2008-08-25 Thread David Zhou
ting}), what are these two things opposite of the > colon? That's a Python dictionary, with 'my_meeting' as the key, and the my_meeting object as the value. See: http://docs.python.org/dev/tutorial/datastructures.html#dictionaries --- David Zhou [EMAIL PROTECTED] --~--~--

Re: how to get {% url %} working with {% blocktrans %}?

2008-08-25 Thread David Larlet
;t work for me. > > could someone help me, please! Hi Viktor, You can have a look at this patch http://code.djangoproject.com/ticket/7239 the latest comment point to the discussion on the devel mailing- list, there is no decision yet about the

Re: Inherited models in new forms admin

2008-08-26 Thread David Zhou
hat sounds acceptable for one > table, but now add a few more subclasses and give them a few > subclasses > of their own and it rapidly becomes horribly inefficient without > trying > very hard). Would it work if a ModelAdmin defined its own queryset() method that app

Re: site using Django/mod_python/apache2 randomly showing "It worked!" page

2008-08-27 Thread David Zhou
xpected page is shown. The remaining 1/10 > times the "It worked!" page pops up. Searching for this problem seems > a bit difficult. Any idea on what could be happening? Did you restart the server after making your changes? ---

Re: How to handle platform dependent settings?

2008-08-27 Thread David Zhou
anage that in my SVN repository. ... > Is there a better way? Does this cause a performance hit, or is > settings.py and urls.py processed only once? If it's mostly paths that you need to change, check out: http://rob.cogit8.org/blog/2008/Jun/20/django-and-relativity/

Re: Storing some media files on web server and some on external a/v server

2008-08-28 Thread David Zhou
ct.com/en/dev/ref/models/fields/#django.db.models.FileField Then you can write your own method that returns the proper path. --- David Zhou [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Dj

Re: Dictionary key-value pair

2008-08-28 Thread David Zhou
s there any other way to render > bunch of key-value items from a view in a desired order? Thanks for > help What are you trying to do, specifically? If order is important, why bother with a key? Why not just store all the values in a list? --- Davi

Re: request: auth_user User model, not enough characters in email

2008-08-28 Thread David Zhou
ess. If you have a recent version from trunk, you should be able to define your own length via max_length: http://docs.djangoproject.com/en/dev/ref/models/fields/#emailfield --- David Zhou [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this messag

Re: Dictionary key-value pair

2008-08-28 Thread David Zhou
#x27;phone': 723872, 'Total Friends': 20, 'Avg Rating' : > 3.6} > so when I render I would these to appear in order. Can you post the relevant view and template code? But if it's just those fields, why not refer to them explicitly? Such as: {{dict_variabe.nam

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