** is part of python the python
grammar<http://docs.python.org/release/2.5.2/ref/grammar.txt>.
See
this<http://www.saltycrane.com/blog/2008/01/how-to-use-args-and-kwargs-in-python/>for
more info on how to use * and ** in python
Brian
On Wed, Nov 3, 2010 at 1:52 PM, Thomas M
I would look into django-celery <https://github.com/ask/django-celery> to do
asynchronous tasks. It can also be executed as a webhooks style, see
here<http://ask.github.com/celery/userguide/remote-tasks.html>
.
Brian
On Thu, Nov 4, 2010 at 3:31 AM, Elver Loho wrote:
> Hi,
>
We use Opus <https://github.com/bmbouter/opus> to do our django deployments.
It creates a secure version of the setup described in this thread (with
apache not nginx), and even takes care of deploying the databases also (if
you don't mind postgres).
my 2 cents,
Brian
On Tue, Nov 23
Yes I think a template filter is the right approach. You could always
define a custom template
tag<http://docs.djangoproject.com/en/dev/howto/custom-template-tags/>.
I've had to do this before to display currency information multinationally
before.
Brian
On Mon, Nov 29, 2010 at 8:20
Copying things from request.META to the env parameter of Popen allows
me to get the cgi off the ground. Now I have the problem that the cgi
is generating a cookie and content type, which django returns to the
browser as page content.
Is there a way to pass it back transparently? Or, failing that,
On Jan 14, 7:30 pm, E17 wrote:
> Hi,
>
> in my Django application I need a way to track logged users presence.
>
> User gets an 'online' status when he/she logs in and 'offline' status
> when logs out, it's pretty simple. But what is the best way to handle
> non-logged-out sessions? One need to pe
been recently using
http://github.com/ask/ghettoq for a database backend. This makes dealing with
the queue dependancies much better since you can run it off SQLite for
development. As long as the designer has access to Python 2.5+ (and your code
can run on it) pretty much everything is there
On Feb 3, 1:39 am, Delifisek Tux wrote:
>
> A decent framework eats up your %50 of
> cpu resource. For example that Uber Zend FW gives you 1/6 in a hello world
> app comparing plain php.
Why would you want to write a Hello World program in a framework?
Try writing a very large app in a framework
I'm having trouble seeing PendingDeprecationWarning's on stderr when
using the dev server.
To make sure I'm not crazy, I wrote a simple Python program that looks
like this:
print "** WARNING **"
import warnings
warnings.warn(
"Testing the warnings module!",
Any ideas? Can anyone else try this and report back? Just insert the
code below into a view function and start the dev. server with "python
-Wall manage.py runserver". Thanks.
On Feb 28, 5:28 pm, Brian Neal wrote:
> I'm having trouble seeing PendingDeprecationWarning's on
On Mar 6, 10:29 am, Karen Tracey wrote:
> This appears to be due to the way runserver reloads the process when
> monitoring for source code changes. If you specify --noreload on runserver
> I bet you will see the warnings. The behavior appears to be OS-specific: I
> can recreate what you describe
Before the Django 1.2 beta and the class-based Feed views, I was doing
this to cache my RSS feeds:
urls.py:
from django.contrib.syndication.views import feed as syndication_feed
from django.views.decorators.cache import cache_page
urlpatterns = patterns('',
url(r'^feeds/(?P.*)/$',
cache_
On Mar 7, 10:48 pm, Brian Neal wrote:
> Before the Django 1.2 beta and the class-based Feed views, I was doing
> this to cache my RSS feeds:
>
> urls.py:
> from django.contrib.syndication.views import feed as syndication_feed
> from django.views.decorators.cache import cache_pa
On Mar 19, 8:35 am, Tor Nordam wrote:
> I'm currently writing a blog application in django, and a part of what
> I want to do is allow some HTML in posts and comments. I discovered
> yesterday, more or less by accident, that the markdown filter actually
> allows some HTML.
Are you using it in "sa
On Mar 21, 7:49 am, Bobby Roberts wrote:
> can anyone help me out here? I'm stuck and cannot get the text areas
> to work using ckeditor.
Does any static media work? How are you deploying? mod_python,
mod_wsgi? What is the configuration? Can you access the javascript in
your browser at the URL y
On Apr 6, 5:29 pm, Paweł Roman wrote:
> Hi all,
>
> Django has this DATETIME_FORMAT setting, which allows to format all
> datetime values, whenever they are displayed. But the problem is this
> is a _global_ setting, so whoever uses the application would see all
> the datetimes formatted exactly t
I am on trunk, somewhere around revision 127xx and just updated to
12936. A couple of my views render this one particular template, which
used to take less than a second to see a response. Now it is taking
almost a minute. The Django debug toolbar reports nothing out of the
ordinary in terms of SQL
On Apr 6, 11:53 pm, Russell Keith-Magee
wrote:
> On Wed, Apr 7, 2010 at 12:08 PM, Brian Neal wrote:
> > I am on trunk, somewhere around revision 127xx and just updated to
> > 12936. A couple of my views render this one particular template, which
> > used to take less t
On Apr 8, 5:15 am, UnclaimedBaggage wrote:
> Hi folks,
>
[..]
> Any
> suggestions on the following would be very appreciated:
>
> #1.) For usability's sake, I'd like to have foreign key models
> embedded in the same admin form as the model they're referencing. For
> example, if there's a "products
This is a tough question for sure.
If you prefer Ruby syntax, then to me it seems clear. If it feels
clunky, it won't flow properly and you won't code as well.
Then again, you point out that you built a finished product quickly
and you're happy with it compared to what you built with Rails. Isn
when trying to create the unique constraints during
syncdb.
Does anyone have any information about whether this is just a to do or
if there are deeper underlying issues that need to be addressed within
the gis branch to bring this in?
Thanks
-Brian
--~--~-~--~~~---~--~
.diff since the last patch?
Also the original patch is from 2 years ago and a lot has changed
since then so I'm a little confused as to how I would go about taking
in this patch.
All help is much appreciated,
Brian
--~--~-~--~~~---~--~~
You received this me
lations is the icing on the cake since any arbitrary model in one's
app could then relate to my Location model without introducing any
coupling between the apps. I'll wait for the dust to settle and
release to the community :)
Cheers
-Brian
On Jun 6, 7:52 pm, Justin Bronn <[EMAIL P
Thanks for your help Russ. Turns out that the last .diff fitted in to
the version of django I had so there is no need to add to the ticket.
If anyone else is looking to take the big int patch its very simple.
Cheers again Russ and to everyone who contributed to the ticket...
very helpful
Brian
r use the same line of
logic in a pre or post_delete signal. Sorry, I haven't thought
through the pros/cons with either of these and I'm still waiting for
the coffee to kick in after a long night of network alerts :p
HTH, let me know if you find any elegant solutions.
Cheers
-Brian
On Jun 13,
ou're looking for higher-level design help it will probably be harder
to get answers since we won't know the specific context or
requirements.
Cheers
-Brian
On Jun 14, 10:35 am, "Sells, Fred" <[EMAIL PROTECTED]> wrote:
> I've got a java webstart app that I would lik
w you have uncoupled your presentation from your business or
application logic and you could reuse that same view for other actions
in your application without having to special case the code for how
that data will actually be rendered :)
Cheers
-Brian
On Jun 14, 1:55 pm, "[EMAIL PROTECT
eate the form from several
> _models_ when the user is trying to add new information and 3) how to
> instantiate the multiple save objects from the POSTed form.
>
> Many thanks for your kind assistance in what I know must be quite a
> simple operation.
You might want to check out
anding of both the
technologies and concepts you are dealing with.
-Brian
On Jun 18, 11:11 pm, Kelvin Nicholson <[EMAIL PROTECTED]> wrote:
> > Now, maybe a stupid question but for how long does it take to really
> > understand Django/Python and start actually creating some code
f 24/06/2007). Not sure that this would cause
the error though.
Any help would be great
Cheers
Brian
urls.py...
from django.conf.urls.defaults import *
urlpatterns = patterns('',
(r'^blog/', include('jealousy.blog.urls')),
(r'^gallery/'
Hi Malcom,
Thanks for getting back to me so quickly. Updatting to r5520 has fixed
my problem. Good work on you fix so :)
Thanks again
Brian
On Jun 24, 11:58 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Sun, 2007-06-24 at 10:38 +0000, brian corrigan wrote:
> > Hi al
oach_email`,`coach_phone`,`team_picture`,`_order`)
VALUES
>
> ('2','2005-09-10','2','','','','','',(SELECT COUNT(*) FROM
> `football_team` WHERE `school_id` = '2'))"
>
>
> This error
; ) but django thinks i'm trying to pass
other parameters.
I have a feeling I'm doing this the wrong way? has any one done something
like this before
--
Happy day
-
Brian
--~--~-~--~~~---~--~~
You received this message because you are subscribed
I have not done this before with Django, but I have set up a MySQL
cluster before. It is the same as a standard MySQL server. Just
connect to the management node as your SQL server.
On Jul 6, 3:01 pm, johnny <[EMAIL PROTECTED]> wrote:
> Is it even possible to run Django and MySQL Cluster or I h
I am getting the following error in my application's admin area trying
to add a record for a particular object. It seems to stem from the
fact that I am relating this record to a "member" object, and a member
is OneToOne with User. If I relate the object directly to User as a
foreignkey, I have
If you are using NewForms, you should implement this in the clean()
method for a field. See the newforms docs and unit tests for more
details.
On Jul 16, 4:49 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> OK, fixed the above problem -- figured out that it was related to my
> setting uniqu
into problems, so
here I am :) Am I doing something stupid, or is this a bug?
Thanks,
Brian
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-
Ah... I guess it was maybe a bug that got fixed. I upgraded from 0.96
to the SVN trunk, and the problem went away.
Thanks,
Brian
On Aug 5, 7:34 pm, Brian Duff <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm following the Django tutorial
> athttp://www.djangoproject.com/d
ble_list)])
TypeError: descriptor 'upper' requires a 'str' object but received a
'unicode'
A quick scan through management.py seems to suggest that, true enough,
converter is often str.upper. Any ideas how I can resolve this?
Thanks,
Brian
--~--~-~--~~-
connection, get_introspection_module
On Aug 5, 8:26 pm, Brian Duff <[EMAIL PROTECTED]> wrote:
> I'm trying to follow the django tutorial with the latest SVN trunk (I
> had to upgrade from 0.96 because there appears to be an issue with
> 0.96 and Oracle databases). At the point
&g
with the promotion of
Django and keeping those presentations consistent.
--
Brian Rosner
http://www.brosner.com/blog
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this gro
Django also makes use of "messages" in the django.contrib.auth module
for this purpose. Of course, that only applies if you are using users
and authentication for your site. I think you can use them with
anonymous users though, so I think they will still work for you.
http://www.djangoproject.c
As I understand it, ticket 3297 is closed as resolved. However, I am
still experiencing problems uploading files in newforms as of the
latest svn checkout. Am I incorrect in my assumption that this has
been fixed? Or am I experiencing issues of my own? Thanks.
--~--~-~--~~---
Malcolm.
Resolving it takes newforms forward a giant step.
On Aug 15, 8:51 am, "Jonathan Buchanan" <[EMAIL PROTECTED]>
wrote:
> On 8/15/07, Brian Morton <[EMAIL PROTECTED]> wrote:
>
>
>
> > As I understand it, ticket 3297 is closed as resolved. However, I am
&
I'm not sure I really understand. It sort of sounds like you are
talking about a CharField with a choices argument. Is what you're
looking for more complex? Can you describe it in more detail?
On Aug 16, 4:06 pm, Tim Chase <[EMAIL PROTECTED]> wrote:
> Has there been any work on a "RevisionCont
It sounds like what you need to build is a custom ForeignKey type of
field that creates another table for that field. Then, you can store
an arbitrary number of revisions of that field, along with versioning
information, and a wrapper around diff that can perform the functions
you mention.
On Au
There isn't a solution to your particular problem. Your problem is
that you are accepting invalid data. Nobody can be born on a day that
doesn't exist. I'd recommend verifying that the data be entered into
the database is valid.
On Aug 3, 5:37 am, Bram - Smartelectronix <[EMAIL PROTECTED]>
wro
Err, my bad. I wasn't thinking. I need to stop writing replies after
having a few beers. ;)
On Aug 21, 9:09 pm, Brian Rosner <[EMAIL PROTECTED]> wrote:
> There isn't a solution to your particular problem. Your problem is
> that you are accepting invalid data. Nobody can
> If I added the join table manually would Django still work? Or does it
> need to "know" about the table?
Yes, it would work fine. Django is expecting it and doesn't find it
and throws that error about not finding it. Until a schema evolution
solution gets merged into trunk
class Hardware(models.Model):
blah = models.CharField()
...
#called every time the model instance is saved
def save():
#if you want many hardware history records for a piece of
hardware
history = HardwareHistory.create(hardware=self, ...)
#if you only want
Can we see your context processor code?
On Sep 6, 12:14 pm, Bram - Smartelectronix <[EMAIL PROTECTED]>
wrote:
> Hello Everyone,
>
> I have a request context which sets {'request':request}...
>
> On windows (dev-server) everything is fine and dandy, but on our live
> site (splicemusic.com, Apache2
Also, do you have django.core.context_processors.request in your
context_processors? It looks like you're trying to overwrite a dict
element that already exists.
On Sep 6, 12:14 pm, Bram - Smartelectronix <[EMAIL PROTECTED]>
wrote:
> Hello Everyone,
>
> I have a request context which sets {'requ
Well, by its nature, each Django project has its own DB. Multi-db
support is coming soon, but not in trunk yet.
If these are all applications that belong to the same project, Django
is not designed to handle them on a per-DB basis. The convention
Django uses is a DB for the project and _ for th
/company/website and put the separate apps (based
on function) under the project.
On Sep 6, 4:49 pm, "Adam Jenkins" <[EMAIL PROTECTED]> wrote:
> On 9/6/07, Brian Morton <[EMAIL PROTECTED]> wrote:
>
>
>
> > Well, by its nature, each Django project has its own DB.
What happens if you use a simple or dummy cache?
On Sep 9, 2:51 pm, Sasha Weberov <[EMAIL PROTECTED]> wrote:
> On Sep 9, 6:15 am, Thomas Badran <[EMAIL PROTECTED]> wrote:
>
>
>
> > My best guess would be that you are missing the / at the start and end
> > of the url
>
> > Tom
>
> > On Sat, 2007-0
I would remove your source built code and reinstall python2.5 and the
development package for it. Make sure any other versions of python
are uninstalled unless other packages depend on them.
On Sep 10, 3:11 pm, shabda <[EMAIL PROTECTED]> wrote:
> I am trying to deploy django on a fedora 7 system
uest.user #excluded in PlaceForm
> newplace.save()
Wow, you are so close to making this work :) You are passing in "False"
to commit which will always be a True statement. Remove the quotes to
pass in the boolean value False. It should then work.
>
> Exeption after exe
est.FILES, instance=instance)
if form.is_valid():
form.save()
else:
form = MyModelForm(instance=instance)
return render_to_response("mytemplate.html", {
"form": form,
}, context_instance=RequestContext(request))
--
Brian Rosner
ht
ield1 is filled, field2 is not required.)
As I pointed out above this is still newforms. This type of validation
is very possible since the form clean_FIELD methods are never passed
its own value. It is the job of the developer to pull out the values
from cleaned_data that a clean_FIELD
using the RequestContext to ensure {{
MEDIA_URL }} is displayed correctly in your templates. (This will only
work if you are using HEAD of Django trunk, otherwise you must write
your own context_processor).
--
Brian Rosner
http://oebfare.com
--~--~-~--~~~---~--~---
't
need to be switching between versions very often or it is a production
server, for example.
--
Brian Rosner
http://oebfare.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" gro
port PYTHONPATH=/home/user/django-trunk
--
Brian Rosner
http://oebfare.com
--~--~-~--~~~---~--~~
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@googlegroup
n issue in trac if you can't find
> anything matching.
http://code.djangoproject.com/ticket/5878 -- I am still unsure of the
correct way to fix this, but it is a known issue.
--
Brian Rosner
http://oebfare.com
--~--~-~--~~~---~--~~
You received this mess
Is it bad practice to name a templatetag
file the same as the app? Have I discovered a bug? Suggestions,
workarounds tremendously appreciated.
-Brian
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django
latetags and hence
our import path looks like:
(Pdb) import sys
(Pdb) sys.modules['django.templatetags'].__path__
['C:\\Python25\\lib\\site-packages\\django-svn\\django\\templatetags',
'C:\\Pyth
on25\\lib\\site-packages\\django-svn\\django\\contrib\\admin\
\templatetags',
I ran into the same problem. I also wanted to add for any other users
out there that Django caches the value of the current site so if you
make a change you'll need to restart your server/python instance.
On Jan 7, 10:33 am, RevMatt <[EMAIL PROTECTED]> wrote:
> Figured it out myself. In my djan
It
should be "extra" without the "s".
[1]: http://code.djangoproject.com/ticket/6075
--
Brian Rosner
http://oebfare.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To pos
ge.
I look forward to seeing you at PyCon this year!
[1]: http://code.djangoproject.com/wiki/SprintIdeas
[2]: http://code.djangoproject.com/wiki/SprintPyCon2008
--
Brian Rosner
http://oebfare.com
--~--~-~--~~~---~--~~
You received this message because you are su
b [1] python library.
[1]: http://www.reportlab.org/
--
Brian Rosner
http://oebfare.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to dj
to "mysite.urls". Is that
in fact the correct URLs file?
I would suggest jumping into the python interpreter and importing your
desired settings file, check the __file__/__path__ module attributes
and also do the same with your urls.py file just to make sure you
aren't loading someth
Any chance you were using django-tagging previously and recently
updated to trunk? There are backwards incompatible changes - the
relation names have changed:
http://code.google.com/p/django-tagging/wiki/BackwardsIncompatibleChanges
-Brian
On Feb 20, 4:25 pm, cesco <[EMAIL PROTECTED]>
http://www.djangoproject.com/documentation/templates/#unordered-list
On Feb 21, 4:22 am, shabda <[EMAIL PROTECTED]> wrote:
> I have a model like
>
> class Task(models.Model):
> name = Models.CharField(max_length = 100)
> parent = models.ForeignKey('Task', null = True)
>
> Using this model s
http://code.google.com/p/django-assetpackager/
http://www.djangosnippets.org/snippets/405/
http://www.djangosnippets.org/snippets/524/
Cheers
-Brian
On Feb 23, 7:02 am, "James Bennett" <[EMAIL PROTECTED]> wrote:
> On Sat, Feb 23, 2008 at 8:26 AM, Thierry <[EMAIL PROTEC
In your urlpatterns, you are passing a string for the value of
feed_dict ("feeds"). You need to pass the actual dictionary object
that you setup for yourself:
...{ 'feed_dict' : feeds }
Cheers
-Brian
On Mar 2, 10:39 am, Florian Lindner <[EMAIL PROTECTED]> wrote:
>
Take a look at your url patterns. Your first one is:
(r'^addorder/', add_order),
so 'addorder/results' is going to match to your first url pattern (so
would 'addorder/mydogspot' for that matter). The view to be executed
will be add_order.
Cheers
-Brian
On Mar
Serving static media really has nothing to do with Django. Presumably
your browser is reading the CSS file and making a request back to your
web server for the file. You haven't told us anything about your web
server configuration. What path is being requested to the server for
the image file?
e this has serious implications
for the future scalability and maintenance of your application. This
user group and community are very helpful. If you can describe more
about what you are trying to architect you'll get a lot of great
pointers about best practices and the best manner in which
2019 is an right single quote in unicode. Perhaps that title is
causing the problem? Did you paste it from some editor that would
have created it as that character rather than an apostrophe? Maybe
you should correct that by hand if it was pasted.
On Mar 6, 7:37 pm, "[EMAIL PROTECTED]" <[EMAIL
> "Hold down "Control", or "Command" on a Mac, to select more than one."
>
> and NO select boxes, search input etc!
What revision of newforms-admin are you using? Also, what browser is
this behavior is displayed i
> I gave a look at newforms.models and I see this "InlineFormSet" class,
> but I can't really understand how to use it, nor I can find docs on
> this matter, the only thing I found (don't ask me how) is
> http://code.djangoproject.com/ticket/6632 .. that explains the various
> FormSets (including
Oh, wait, duh, that's what the Many-to-Many relationship is.
Sorry about that. I feel rather dumb now.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to djang
o create them one at a time.
Another way is to take the same SELECT statement and use it as a
subquery to an INSERT, so that your db does all this for you. It
might be preferred to do it this way if you don't want the overhead of
passing all the entries back and forth between db and server.
ms (e.g. display 7 items per page)
>
> How would I go about this?
>
> Thanks
> Duncan
Have you looked at Django's pagination?
http://www.djangoproject.com/documentation/models/pagination/
Brian
--~--~-~--~~~---~--~~
You received this message because
ion to me, I guess.
Maybe it's just a stylistic concern.
Thanks again and sorry for the noise,
Brian
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send e
you're going to point to the
media subdomain in the line like
media.yourdomain.com/style.css. I hope that made sense. :)
This only counts if you're using a real server. I don't know how you
get CSS on the dev server, or if you even can.
--Brian
--~--~-~--~~---
= forms.CharField(widget=forms.RadioSelect)
>
> class Meta:
> model = Survey
>
>
>
> Thanks for any help!
>
> >
>
Greg,
I believe what you want is a ChoiceField in SurveyForm.
--Brian
--~--~-~--~~~---~--~
Also, if you have access to the old DB still, consider exporting the
entire thing out again. Make sure that you include the structural
part as well as the data itself. It should export it directly as a
series of SQL statements. A complete dump will provide information
about the sequences.
--~-
he "manage dumpdata/loaddata" dance to get your data out of
sqlite and into your DB of choice.
-Brian
On Apr 2, 9:04 pm, Simon Oberhammer <[EMAIL PROTECTED]>
wrote:
> > that developer has to inform all others of the changes so they all
> > make the change manually on t
I have run into an interesting problem with newforms. I am trying to
create an arbitrary number of fields on a form based on model data.
This works fine.
class SonglistForm(forms.Form):
def __init__(self, *args, **kwargs):
super(SonglistForm, self).__init__(*args, **kwarg
g for in
cleaned_data. Ideally, I need to capture the song ids that were
selected in some kind of iterable datatype, then loop through them and
look them up in the model to get info for output.
On Apr 11, 6:10 am, "Phil Davis" <[EMAIL PROTECTED]> wrote:
> On 11/04/2008, Brian
> Of course, you'll have to develop a good workflow so that either your
> user is notified on that page when the import is completed (possibly
> through some ajax-y interface either by polling or using a Comet
> system) or, the easy way out, just provide a page that provides a
> status, where your
Does anyone happen to know the proper way to interact with an API that
won't convert trailing UTC time zone specifications?
I'm trying to sync up a Django app with the Ma.gnolia's api, and
Ma.gnolia will not convert UTC adjusted times. The two hour
differential will not allow me to sync up my loc
t app. Since you could take
out the app and still have functionality (assuming that the apps are written
well).
There in lies the problem with asking for legal advice on a technical mailing
list. You could very well get 40 perfectly logical interpretations back.
--Brian Jackson
On Thursday 08 May 2
On May 9, 4:31 am, Nuno Mariz <[EMAIL PROTECTED]> wrote:
> I'm using newforms-admin and I've got a "duplicate key violates unique
> constraint" when I'm added new record(with the same value on field
> that already exists in the db) in admin interface.
> I've an "unique=True" in the field, should
#x27;, wikify)
> def wikify(value):
> return wikilink.sub(r"\1", value)
Did you try calling register.filter('wikify', wikify) after the wikify
method instead of before?
-Rajesh
Brian Hunter
brianhunterstudio.com
--~--~-~--~~~---~--~~
Yo
def clean_name(self):
value = self.cleaned_data["name"]
if name == "Brian":
raise forms.ValidationError, u"You are not allowed to be
named Brian."
return value
class PersonAdmin(admin.ModelAdmin):
form = PersonForm
admin.site
lean_name(self):
> value = self.cleaned_data["name"]
> if name == "Brian":
> raise forms.ValidationError, u"You are not allowed to be named
> Brian."
> return value
Oh, and if name == "Brian" should
elopment closely [2] most pain can be mitigated.
[1]: http://code.djangoproject.com/wiki/NewformsAdminBranch
[2]: http://code.djangoproject.com/log/django/branches/newforms-admin
Brian Rosner
http://oebfare.com
--~--~-~--~~~---~--~~
You received this message because
most of the functionality you
want (using the query string) encapsulated in a template tag. I've
thought a couple of times about trying to do that, but haven't had
enough of a need to actually do it.
--
Brian
--~--~-~--~~~---~--~~
You received this message
sure
that the ORM generates the SQL you would expect from a foreign key.
--
Brian Rosner
http://oebfare.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, sen
401 - 500 of 944 matches
Mail list logo