You do this in the validation:
http://docs.djangoproject.com/en/dev/ref/forms/validation/#cleaning-and-validating-fields-that-depend-on-each-other
-leond
On Sep 21, 11:34 pm, lance wrote:
> Newbie question...
>
> In defining my model, I have two CharFields of a given class.
[Off topic suggesting another rich text powerful editor]
You can also try django CK editor
1) which is easy to user
2) which is powerful,fast and more robust than TInyMCE
http://code.google.com/p/django-ck/
3) with every ease you can also integrate directly.
On Sep 22, 6:45 am, taijirobot
There's a pattern I keep running into, and I've been wondering if
anyone who's encountered it before has an opinion on how best to deal
with it:
Imagine you have an app that could theoretically stand on its own --
for now let's say a schedule, but it could be anything (an image
gallery, a blog,
thank you, I missed the line 'form = BlogForm' in admin class, but
after I added this, the tinymce editor still doesn't show, except that
the body textarea is bigger than it used to be.
On Sep 22, 1:42 am, brad wrote:
> > The document says we can get a tinymce editor in
Yes, I am very unconfident about my MEDIA_URL settings too. But I
don't know how to set it in my case that I am running the site on the
localhost.
On Sep 21, 4:37 pm, Daniel Roseman wrote:
>
> Well, I would assume that MEDIA_URL is wrong - it's very unlikely you
> want it
Thanks, Karen. With your help, I manged to fix it.
On Mon, Sep 21, 2009 at 5:52 PM, Karen Tracey wrote:
> On Mon, Sep 21, 2009 at 3:28 PM, Malcolm MacKinnon wrote:
>
>> Hi,
>> I'm new to Django.
>>
> I keep getting a 404 error when I try to pass a "prod"
I understand that there is a Django branch being actively worked on
for connections to multiple DB vendors, or that Django + Elixir may be
a good option. But I'm wondering if building a single data warehouse
may still be a better way to go?
Here's an example of some of the relations I'm going
On Mon, Sep 21, 2009 at 3:28 PM, Malcolm MacKinnon wrote:
> Hi,
> I'm new to Django.
>
I keep getting a 404 error when I try to pass a "prod" parameter to a url.
>
I think it is just this last parameter that is giving me trouble.
>
> Here is my error:
> Page not found (404)
>
You can remove fields from templates (from html). They indeed should
be removed if you don't want them :)
Then we face a problem: some of CommentForm fields are marked as
required. The solution is to subclass CommentForm and set this flag to
False:
class NoEmailForm(CommentForm):
def
On Sep 21, 7:50 am, Jose Sibande wrote:
> Hi,
> I get this error in /var/log/apache2/error.log:
>
> [Mon Sep 21 01:38:14 2009] [error] [client 41.157.12.3] ImportError:
> Could not import settings 'WWlove.settings' (Is it on sys.path? Does
> it have syntax errors?): No
I have the same problem. Any ideas?
--~--~-~--~~~---~--~~
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 group, send email
Try using smth. like siege (http://freshmeat.net/projects/siege/ ,
home page seems to be broken) to check how many requests per second
can your app handle. Then add more django processes/threads in your
mod_wsgi config (or more fastcgi processes, or smth. else) and test
again. Measure memory and
Newbie question...
In defining my model, I have two CharFields of a given class. The
business logic requires that one or both of the fields be filled in.
Either of the fields can be blank as long as the other one isn't.
Is there a Django best practice way to solve this? Should this be
handled
On Mon, Sep 21, 2009 at 5:33 PM, Kevin Bache wrote:
> Thanks for both of your ideas.
>
> Joshua: It is stopping on the first line of code, and I can step through
> the manage.py module and if I recall (I'm not in front of my computer at the
> moment) it catches breakpoints
On Mon, Sep 21, 2009 at 4:51 PM, DjangoDragon wrote:
>
> Whenever I try to compile the po files to mo files using 'python
> django-admin.py compilemessages' command i get the error:
> "sh: msgfmt: not found"
>
> I'm in a Ubuntu 9.04 system.
>
You need to install the
G'day everyone,
What I want to do: To keep my American users happy, I want to localise
my site for en-us locale users. That way, they'll see all the dropped
'u's and past participles and other things that don't exist in 'U.S.
English' (and that U.S. date format and all the other spelling
Whenever I try to compile the po files to mo files using 'python
django-admin.py compilemessages' command i get the error:
"sh: msgfmt: not found"
I'm in a Ubuntu 9.04 system.
Thank you for your time and any help you can give me.
--~--~-~--~~~---~--~~
You
On Sep 21, 10:37 am, Daniel Roseman wrote:
>
> Anything in a child template that is outside of a
> {% block %} is ignored.
>
I usually have a few {% load %} tags in child templates above {% block
%} to bring in needed template tags.
BN
On Sep 21, 8:54 am, Almost George
wrote:
> I'm using the very cool django-filter
> (via:http://github.com/alex/django-filter)
> and either can't seem to wrap my head around the docs, or maybe just
> need a little boost.
>
> When I show the filter form on an
On Mon, Sep 21, 2009 at 3:29 PM, Szymon wrote:
> Isn't "self" refers to existing object?
only if you include it in the parameter list:
class whatever:
def method (self, moreparams...):
... use 'self' instance...
--
Javier
Yes.
self.bar += c
self.save()
Isn't "self" refers to existing object?
On 21 Wrz, 16:18, phoebebright wrote:
> The code looks like it only handles the case of adding a new foo
> object but your comments refer to "old values". Are you also
> expecting this to work
Hi,
I'm new to Django. I keep getting a 404 error when I try to pass a "prod"
parameter to a url. I think it is just this last parameter that is giving me
trouble.
Here is my error:
Page not found (404)Request Method:GETRequest URL:
http://localhost/order_closeouts/imgs/WMS%20DIVA%20PANT%20BLK/
Thanks, got this working and handed it off to the production folks.
On Sat, Sep 19, 2009 at 5:02 AM, Joost Cassee wrote:
>
> On 8 sep, 22:14, DrKen wrote:
>
> > Hi, new to Django and tinyMCE. I'm trying to get the tinyMCE HTML
> > editor working on the
Hi,
I'm new to Django. I keep getting a 404 error when I try to pass a "prod"
parameter to a url. I think it is just this last parameter that is giving me
trouble.
Here is my error:
Page not found (404)Request Method:GETRequest URL:
http://localhost/order_closeouts/imgs/WMS%20DIVA%20PANT%20BLK/
Karen,
Yes absolutely right. Thanks for rescuing me from own stupidity!
On Sep 21, 4:54 pm, Karen Tracey wrote:
> On Mon, Sep 21, 2009 at 11:49 AM, phoebebright
> wrote:
>
>
>
>
>
> > On Sep 21, 3:25 pm, Karen Tracey wrote:
>
2009/9/21 Kevin Bache :
> Thanks for both of your ideas.
>
> Joshua: It is stopping on the first line of code, and I can step through the
> manage.py module and if I recall (I'm not in front of my computer at the
> moment) it catches breakpoints in other files (ex:
Thanks for both of your ideas.
Joshua: It is stopping on the first line of code, and I can step through the
manage.py module and if I recall (I'm not in front of my computer at the
moment) it catches breakpoints in other files (ex: settings.py) in the
initial load. What I can't seem to get is
Hi ,
I am using as_table() function in the django.forms to render my
forms.
Now I want more then one field to appear in the simgle row of html
table For example
Name(label) option(<,>,=) , InputValue()
I want name , option and inputvalue fields to appear in same row when
I call as_table().
I am trying to write to CSV, I was able to do so before, not sure what
the problem is...
When my query returns results, I get this error http://dpaste.com/96399/
Here's my view http://dpaste.com/96398/
If the query is empty it opens the CSV with only the header row...
What am I doing wrong?
> The document says we can get a tinymce editor in the admin site after
> this. But nothing different shows with mine.
Just to clarify, are you trying to get tinymce displaying in your
django admin? If so, you have to tell the admin for your BlogPost
model to use the BlogForm. So do you have
> I too spent a day or so on this seemingly simple problem :(
> Here's my solution...
>
> class EMailAddressForm(forms.Form):
>
> emailType = forms.ChoiceField(required=True,choices=[])
>
> def __init__(self, *args, **kwargs):
> super(forms.Form, self).__init__(*args, **kwargs)
>
> Can you give a more detailed example of your code?
>
This is what basically I'm doing:
class MyForm(forms.Form):
myfield = forms.CharField(widget=forms.Select)
C =[]
u = User.objects.all()
for r in u:
l1 = []
l1.append(r.id)
l1.append(r.username)
I too spent a day or so on this seemingly simple problem :(
Here's my solution...
class EMailAddressForm(forms.Form):
emailType = forms.ChoiceField(required=True,choices=[])
def __init__(self, *args, **kwargs):
super(forms.Form, self).__init__(*args, **kwargs)
choices =
Hm, I thought it was kind of self-evident. Okay, here's the sample
Model definition:
class Records (models.Model):
id = models.IntegerField(primary_key=True)
state = models.TextField()
race = models.TextField()
age = models.IntegerField()
sex = models.TextField()
population =
On Mon, Sep 21, 2009 at 12:04 PM, Rob B (uk) wrote:
>
> Model: http://dpaste.com/96349/
>
> View:
> def game_list(request):
>return render_to_response('games/game_list.html',
> { 'object_list':
>
Model: http://dpaste.com/96349/
View:
def game_list(request):
return render_to_response('games/game_list.html',
{ 'object_list':
GameList.objects.published.all().order_by('position')})
Template error:
AttributeError at /games/
'Manager' object has
On Mon, Sep 21, 2009 at 11:49 AM, phoebebright wrote:
>
> On Sep 21, 3:25 pm, Karen Tracey wrote:
> Karen,
>
> Spot on with the first positional argument I think, but I now get the
> error:
> form = TweetForm(instance=obj)
> TypeError: __init__() got
Can you give a more detailed example of your code?
On Sep 21, 3:25 am, "Leonel Nunez" wrote:
> Hello:
>
> I'm using
>
> form.base_fields['MYFIELD'].widget=widgets.Select(choices=CA)
>
> to fill a tag, all works fine but I can't find how to add a
> SELECTED value, been
On Sep 21, 3:25 pm, Karen Tracey wrote:
> On Mon, Sep 21, 2009 at 10:05 AM, phoebebright
> wrote:
>
>
>
> > Have been stuck on this one for a couple of days so hoping for some
> > enlightenment from some more able django users. Am aware of the
> >
Hi:
I have several Django applications running and I am trying to tidu up
some code.
I am trying to make a generic way of viewing a database table on a web
page using a YUI control.
I am using the Django template to attempt to create the required
javascript for the YUI controls.
I become a bit
On Mon, Sep 21, 2009 at 11:25 AM, Michael Feingold wrote:
>
> I am somewhat confused about the semantics for nested block
> definitions.Let me explain:
> {% block %} tag serves two purposes a) define a hole (along with the
> default value) to be filled later and b) define
Hello,
are there some calculators or best practises or other tools/methods,
how to size server hardware for Django applications from assumed load
(concurrent users, etc.)?
Thanks in advance for any advice.
Jano
--~--~-~--~~~---~--~~
You received this message
I am somewhat confused about the semantics for nested block
definitions.Let me explain:
{% block %} tag serves two purposes a) define a hole (along with the
default value) to be filled later and b) define the content to replace
the current value of the hole.
As long as we are talking about a) I
On Sep 21, 4:25 pm, Michael Feingold wrote:
> I am somewhat confused about the semantics for nested block
> definitions.Let me explain:
> {% block %} tag serves two purposes a) define a hole (along with the
> default value) to be filled later and b) define the content to
Hi django-users
I try to figure out how to upload files using django.
I have two models which are involved here:
Post, which has a user and content.
Attachment, which has a filefield (attachment), a user and a FK to Post.
This is how it should work:
Step 1:
The form is displayed
Gustavo,
You should take a look at these projects:
django-massmedia
http://opensource.washingtontimes.com/projects/django-massmedia/
https://code.launchpad.net/~vcs-imports/django-massmedia/trunk
django-filebrowser
http://code.google.com/p/django-filebrowser/
Photologue
On Mon, Sep 21, 2009 at 10:05 AM, phoebebright wrote:
>
> Have been stuck on this one for a couple of days so hoping for some
> enlightenment from some more able django users. Am aware of the
> 'gotcha' where the model name matches and attribute or one of the Meta
>
Only a guess but maybe mixed case in WWlove is causing a problem?
On Sep 20, 10:50 pm, Jose Sibande wrote:
> Hi,
> I get this error in /var/log/apache2/error.log:
>
> [Mon Sep 21 01:38:14 2009] [error] [client 41.157.12.3] ImportError:
> Could not import settings
The code looks like it only handles the case of adding a new foo
object but your comments refer to "old values". Are you also
expecting this to work for an update?
On Sep 21, 7:35 am, Szymon wrote:
> Hello,
>
> I have strange problem. I will give example. I have model:
>
>
Hi,
i use django-1.1 with django.contrib.auth and django-registration.
When i run the unittests, i become an error. Anybody has an idea?
./manage.py test auth --settings=develsettings
/usr/lib/pymodules/python2.6/registration/models.py:4:
DeprecationWarning: the sha module is deprecated; use
Have been stuck on this one for a couple of days so hoping for some
enlightenment from some more able django users. Am aware of the
'gotcha' where the model name matches and attribute or one of the Meta
values.
I am getting this when a form is instantiated with an existing object
- no problem
I'm using the very cool django-filter (via:
http://github.com/alex/django-filter)
and either can't seem to wrap my head around the docs, or maybe just
need a little boost.
When I show the filter form on an object list page, for a FK field I
get the dropdown that includes a "-" which kind of
hi list,
i used buildout for a while now to create, develop and deploy plone sites.
today i wanted to try it for django because i think being able to have
repetible buildouts for projects is a nice thing and you dont have to
get a headache between your local machine and the server setup.
I hope this link will help u in the case of UI :
http://flowplayer.org/tools/demos/index.html especially the point 7.
Thanks & Regards,
Jiffin Joy Akkarappatty.
On Mon, Sep 21, 2009 at 5:28 PM, gustavo wrote:
>
> Hello friends!
>
> I am changing from php to python.
Hello
In admin panel I created simply jquery ajax function to update second
selectbox if first was changed.
selectbox1 = category1, category2, category3
category1 has: sub1, sub2, sub3
category2 does not have any subcategories
category3 has: sub4, sub5
So when I select category1 I get sub1,
> On Sun, Sep 20, 2009 at 4:22 PM, SaiaGo wrote:
>
> > I'm trying to make an Israeli site (which means it should be written
> > in Hebrew) using the latest SVN and so far Django made it so easy I
> > can't believe it's free. I got a simple magazine app with up and
> > running
El Mon, 21 Sep 2009 04:58:24 -0700 (PDT)
gustavo escribió:
> I am changing from php to python.
> I am building a website to a photographer and I would like to build
> the following functionality: I would like to upload a zip file and
> build a method to explode the
hi,
I am on latest trunk and using latest photologue trunk. When I install it as
per instructions I get the error given below. I haven't a clue as to what that
message means. I know it has nothing to do with unicode as my db is unicode.
If I comment out 'photologue' in installed apps, the app
Hello
Can you guide me where is the best place to put site-wide admin
actions?
Is this right place [for example]: global_actions folder (with 2
files: init.py and admin.py) ?
where admin.py:
from django.contrib import admin
def export_as_pdf(modeladmin, request, queryset):
Hi,
it seems that in the past people have been successful with compiling a
django app via pyinstaller or cx_freeze.
Initial problems connected to missing modules due to django's dynamic
import mechanism were solved by creating a module which statically
imports everything that's needed. This
Hello all,
For a client, we're currently looking at integrating Satchmo with
OpenERP as a backend (so that they can use Satchmo as an online shop,
but OpenERP for all of the stock management and shipping). One approach
we're considering is getting Satchmo to back its Order model directly on
to
On Mon, Sep 21, 2009 at 10:15 AM, Joshua Russo wrote:
>
> On Sep 21, 6:00 am, Kevin Bache wrote:
> > Hi Everyone,
> > I'm a bit of a Django noob so please forgive me if my hope here is
> > swimmingly optimistic:
> >
> > I'd like to be able to set
On Sep 21, 6:00 am, Kevin Bache wrote:
> Hi Everyone,
> I'm a bit of a Django noob so please forgive me if my hope here is
> swimmingly optimistic:
>
> I'd like to be able to set breakpoints in my django project which would be
> triggered by my browser's requests to the
On Sep 21, 8:22 pm, "kelley@gmail.com"
wrote:
> I'm using it, without macports or fink. Although I'm having problems
> with sqlite3 (posted here yesterday), I'd say things are going a lot
> smoother than when I was trying things with my previous system.
>
> I have
I'm using it, without macports or fink. Although I'm having problems
with sqlite3 (posted here yesterday), I'd say things are going a lot
smoother than when I was trying things with my previous system.
I have decided not to put either macports or fink on the machine. So
far, I've not needed
On 21 sep, 06:22, taijirobot wrote:
> What might be the problem?
If it still doesn't work after following Daniel's suggestion, you
might try debugging using Firebug. Problems like this are usually
because the Javascript is not loaded.
Regards,
Joost
On Sep 21, 8:00 am, Kevin Bache wrote:
> Hi Everyone,
> I'm a bit of a Django noob so please forgive me if my hope here is
> swimmingly optimistic:
>
> I'd like to be able to set breakpoints in my django project which would be
> triggered by my browser's requests to the
On Sep 21, 5:22 am, taijirobot wrote:
> Hi, guys,
>
> I'm learning django recently and I am trying to add a rich text editor
> to the places where long formated text like blog post are needed (the
> site is running on local machine with the default django server).
>
>
Hi Everyone,
I'm a bit of a Django noob so please forgive me if my hope here is
swimmingly optimistic:
I'd like to be able to set breakpoints in my django project which would be
triggered by my browser's requests to the integrated Django development
server. Is this possible? I'm using NetBeans
in the meantime, you can translate app names like this:
http://groups.google.com/group/django-users/msg/ef5a723983e56e96
the whole discussion is here:
http://groups.google.com/group/django-users/browse_thread/thread/f8fcbe25e3327c5d/ef5a723983e56e96?#ef5a723983e56e96
it´s over-complicated to
Hello,
I have strange problem. I will give example. I have model:
class foo(models.Model)
bar = models.IntegerField()
and method in it
def add_bar(c):
from something.models import bar_log
b = bar_log(foo=self, cnt=c)
b.save()
self.bar += c
self.save()
... and now the problem.
71 matches
Mail list logo