Please post here entire view code
On Wed, Dec 31, 2008 at 8:18 AM, Chuck22 wrote:
>
> class ContactForm(forms.Form):
> email = forms.EmailField(required=True,
> widget=forms.TextInput(attrs=
> {'size':'30'}),
>
class ContactForm(forms.Form):
email = forms.EmailField(required=True,
widget=forms.TextInput(attrs=
{'size':'30'}),
error_messages={'required':'Please fill
out your Email'})
...
in my form html file:
...
label
I want a calendar on simple html page.. i do now want to use widget.
In a plain html page how we may display calendar.
Karen Tracey wrote:
> On Tue, Dec 30, 2008 at 7:51 AM, Praveen
> wrote:
>
> >
> > Hi All,
> > I want to use calendar in my html template as the
I'm trying to build a model that will store the counts of each of 10
possible choices, e.g.:
v1 = models.IntegerField(default=0)
v2 = models.IntegerField(default=0)
v3 = models.IntegerField(default=0)
...
v10 = models.IntegerField(default=0)
I'd prefer to represent this as
i'm confused on the --settings option on manage.py.
if i have a project call foo, i'd have in ./foo/settings.py
to run: python manage.py runserver 8080
let's say i have a bar.settings.py which contains different values
(like test database to use or something), i'm trying to run:
python
Thanks for your response.
I should have been more clear. I'm looking for examples of views/forms
to manage the children of a parent child model. Eg how to add/change/
delete a book on a book list.
I don't recall the Django tutorial covering this and I just looked
again. It appears to focus more
figured out the issue was with the * not including a port :)
now, pages aren't actually working...
NameVirtualHost *:80
ServerName www.site.net
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE
On Dec 30, 7:15 am, janedenone wrote:
> Hi,
>
> this must be really simple, but all the references to ordering fields
> did not explain how to do this: How can I change the order of entries
> in foreign key lists in the admin change view?
>
> Kind regards,
> Jan
On Wed, Dec 31, 2008 at 5:11 AM, Info Cascade
wrote:
>
> Hi --
>
> I am getting intermittent errors on certain database queries on our
> production server.
> I am having a hard time duplicating them (most of the time they run
> okay, only sometimes on the production
I think that
>>> print my_query_set.query.as_sql()
should do the trick.
Thanks,
Eric Florenzano
On Dec 30, 12:11 pm, Info Cascade
wrote:
> Hi --
>
> I am getting intermittent errors on certain database queries on our
> production server.
> I am having a hard
On Wed, Dec 31, 2008 at 4:27 AM, psj wrote:
>
> Django's base serializers only serialize a model's local fields, not
> inherited ones, which seems odd at first blush (if an Employee is a
> Person, and a Person has a name, wouldn't I be likely to want to see
> the
On Dec 30, 8:22 pm, ldm999 wrote:
> Eg:
> Lists (books, movies, restaurants) and multiple items per list.
>
> Web forms would allow user to:
> - Add/change/delete lists
> - Add/change/delete list items
>
> TIA
Have you actually read the tutorial on the Django site? The
Eg:
Lists (books, movies, restaurants) and multiple items per list.
Web forms would allow user to:
- Add/change/delete lists
- Add/change/delete list items
TIA
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
and i don't want one to access another's django installation...
and the following doesn't seem to work
NameVirtualHost *
ServerName www.website.net
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE
The numbers have different values because the shapefiles have data in
different coordinate systems. It looks like the data for that
shapefile is actually for the 3435 SRID:
http://spatialreference.org/ref/epsg/3435/
(3084 a NAD83 projection for all of Texas!).
Unfortunately, most shapefiles
Hi,
One of our django applications does not use django's ORM. Is there a
way to run
./manage.py test my_app
Such that it does not perform test database setup?
Thanks,
Bo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
On Dec 31, 8:41 am, tosh wrote:
> it depends on the url structure of your site really
>
> if you don't need your django site to load from the root you could
> just do something like
>
>
> SetHandler None
>
Don't need SetHandler None at root needed if mounting at sub
it depends on the url structure of your site really
if you don't need your django site to load from the root you could
just do something like
SetHandler None
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE Test.settings
yes. there was only .pyc file . Ie for settings.py.
On Dec 30, 3:29 pm, "Karen Tracey" wrote:
> On Tue, Dec 30, 2008 at 2:49 PM, sudha wrote:
>
> > I'm a total newbie to django. I have to test some of ui models. When I
> > run manage.py test; Django
Hello list,
Today I started using FormWizard and could not find a clean way to populate
a choices field based on previously submitted forms, I ended up overriding
the render method like this(The only changed line is the one highlited):
{{{
class CountryForm(forms.Form):
country =
hi guys
i would like to build an application interface in a given django
application using the ContentType class and GenericRelations. the
basic architecture shall be given by two tables: one organizing to be
plugged resources (Resources), i.e. tables of other apps, using a
On Tue, Dec 30, 2008 at 2:49 PM, sudha wrote:
>
> I'm a total newbie to django. I have to test some of ui models. When I
> run manage.py test; Django complains as follows:
> File "build/bdist.linux-x86_64/egg/MySQLdb/connections.py", line 35,
> in defaulterrorhandler
>
On Tue, Dec 30, 2008 at 2:37 PM, Peter wrote:
> > (You don't say what version of Django you are using.)
>
> Sorry - 1.0 final
>
> > What you describe
> > sounds similar to a few problems that have been reported.
>
> Ah yes. I looked. Thanks. Nasty.
>
> > but I believe the
I think what you're trying to do can be accomplished with the
queryset's .extra() method.
something like
Level.objects.all().extra(select={'unlocked':'count(**matching rows in
the join table**) > 0'})
-Andre
On Dec 30, 7:04 am, Deniz Dogan wrote:
> Hi
>
> I have a
Hi --
I am getting intermittent errors on certain database queries on our
production server.
I am having a hard time duplicating them (most of the time they run
okay, only sometimes on the production server am I receiving exception
messages),
so I want to log the SQL query itself and see what it
I'm a total newbie to django. I have to test some of ui models. When I
run manage.py test; Django complains as follows:
File "build/bdist.linux-x86_64/egg/MySQLdb/connections.py", line 35,
in defaulterrorhandler
_mysql_exceptions.OperationalError: (1059, "Identifier name
Thanks Karen - I think that got it. At least it's looking better than
it has been. Apparently the missing field from 'cleaned_data' was
caused by the wonky way I had it set up before.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
> (You don't say what version of Django you are using.)
Sorry - 1.0 final
> What you describe
> sounds similar to a few problems that have been reported.
Ah yes. I looked. Thanks. Nasty.
> but I believe the only way to
> completely ensure you do not see this issue with PostgreSQL at present
Thank you Ana, I checked that out - but I don't understand how it
works (at least not without looking at the
other models).
Is Django less solid with Django than MySQL? I mean my example is a
trivial 'text book' example
and it did not work with PostgreSQL
-- Peter
On Dec 30, 6:49 pm, Ana
Django's base serializers only serialize a model's local fields, not
inherited ones, which seems odd at first blush (if an Employee is a
Person, and a Person has a name, wouldn't I be likely to want to see
the Employees' names by default?)
This looks straightforward to work around, but just
On Tue, Dec 30, 2008 at 2:21 PM, hotani wrote:
>
> -- Update --
>
> If I make the clean method for 'county', it works. I guess county
> comes after case_no so both are accessible by that time. Weird, but I
> can deal with it. However, that brings me to the 2nd issue with this
>
Thank you for your interest in Django. You may also post this job offer on
djangogigs.com
Much Success
James
On Mon, Dec 29, 2008 at 8:00 PM, Pancrazio wrote:
>
> Hi group!
>
> we are a startup working on a community-based music production
> website.
>
> We are
Which host are you using? I am on dreamhost and it works very nice. also try
searching on google your hosts name and django to see if someone created a
tutorial on it.
On Tue, Dec 30, 2008 at 12:57 AM, James Gregory wrote:
>
> I tried using the guide here:
>
-- Update --
If I make the clean method for 'county', it works. I guess county
comes after case_no so both are accessible by that time. Weird, but I
can deal with it. However, that brings me to the 2nd issue with this
process: Whatever is accessed in the clean method is no longer
accessible for
Hello Ramdas,
Thanks! I will work on it.
Ana
On Dec 30, 10:54 am, "Ramdas S" wrote:
> The models need to be rewritten. It might be a better idea use a DateField,
> you need to not worry about having a seperate foreignkey for month and year.
>
> Try using a slug, instead of
I have 2 fields I'm working with in a custom clean method:
- case_no
- county
the clean method is for case_no, so I have this:
--
def clean_case_no(self):
d = self.cleaned_data
form_case_no = d['case_no']
form_county = d['county']
...
--
The form fails with KeyError on 'county'. How
The models need to be rewritten. It might be a better idea use a DateField,
you need to not worry about having a seperate foreignkey for month and year.
Try using a slug, instead of searching based pubtitles. Check the models
documentation, it will help you.
Here are some tips, pubtitle,
Hello Peter,
I use Postgres and have success creating a manytomany table. See:
http://dpaste.com/103824/
Ana
On Dec 30, 10:29 am, Peter wrote:
> I have two models: Person and Telephone. A person can have many
> telephones but a telephone belongs to at most one person.
On Tue, Dec 30, 2008 at 1:29 PM, Peter wrote:
>
> I have two models: Person and Telephone. A person can have many
> telephones but a telephone belongs to at most one person. The models
> are:
>
> [snipped]
> Using PostgreSQL this allows me a single phone number for a person.
Hello Ramdas,
The model is here: http://dpaste.com/103815/
The URL is here: http://dpaste.com/103816/
I've got quite a mess trying to figure out how to move between
templates. I'm having a very hard time finding practical examples of
this stage of Django. The admin and database piece was
I have two models: Person and Telephone. A person can have many
telephones but a telephone belongs to at most one person. The models
are:
class Person(models.Model):
name = models.CharField(max_length=50)
def __unicode__(self):
return self.name
class Telephone(models.Model):
fsafety/search_detail283, this does not make sense. Your regular
expression in urls clearly is looking for a number. Can you dpaste the
models and urls.py also
Thanks
Ramdas
On Tue, Dec 30, 2008 at 11:23 PM, Ana wrote:
>
> Hello,
>
> Please see the following:
>
>
Hello,
Please see the following:
http://dpaste.com/103798/
Thank you,
Anna
--~--~-~--~~~---~--~~
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
Hi all,
I have some issues with django permissions model. Please bear in mind
that I have just started learning django so feel free to correct me if
I'm wrong :)
First of all it was hard to find how one can add a custom permission
to list of permissions of a model instance.
I ended up with a
On Tue, Dec 30, 2008 at 7:51 AM, Praveen wrote:
>
> Hi All,
> I want to use calendar in my html template as the default admin
> interface uses.
>
http://docs.djangoproject.com/en/dev/topics/forms/media/#form-media
Karen
On Tue, Dec 30, 2008 at 7:22 AM, janedenone wrote:
>
> Hi,
>
> I was looking for a way to customize the error message when trying to
> submit an existing value for a unique field (using a ModelForm).
> According to this request
Hi All,
I want to use calendar in my html template as the default admin
interface uses.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
You might want to check if the context being passed to your template
is a regular Context or a RequestContext. Only RequestContexts have
the request.user available. Check the context_instance parameter in
render_to_response:
Hi,
I was looking for a way to customize the error message when trying to
submit an existing value for a unique field (using a ModelForm).
According to this request (http://code.djangoproject.com/ticket/8913),
I am not the first one to look for such a feature, and I'm happy to
wait for it.
My
Hi,
this must be really simple, but all the references to ordering fields
did not explain how to do this: How can I change the order of entries
in foreign key lists in the admin change view?
Kind regards,
Jan
--~--~-~--~~~---~--~~
You received this message
Hi
I have a user profile which has a many-to-many relationship to a model
Level. The relationship is called "unlocked" and says which levels a
specific user has unlocked. Now I wish to retrieve all the levels but
"joined" with the user's unlocked levels, so that I get a QuerySet
containing
I have got the reason.
just set FORCE_SCRIPT_NAME = '' in settings.py
On Tue, Dec 30, 2008 at 10:41 AM, khsing wrote:
>
> I have done via this link
> http://docs.djangoproject.com/en/dev/howto/deployment/fastcgi/
>
> The login form is appeared, but the action of login
The first query looks at the restaurant attribute in the place model,
and gets all that have a NULL value in that field. Now I don't know
the restaurant/place setup, the docs I read uses book/auther examples.
It looks like that the restaurant field is ForeignKey, and should be
able to work the
How do you put messages to log?
On Tue, Dec 30, 2008 at 7:08 AM, CG wrote:
>
> Hi, all I am using Django 1.02 + lighttpd , and I run my django app in
> fastCGI mode using the following
>
> runfcgi method=prefork socket=/tmp/socket.sock
> pidfile=/var/run/process.pid
Hi,
I am having a problem that seems like a ghost. I can find where it's
comming from. It doesn't happen all the time. But what happens is
sometimes when I go to a page. instead of loading the page, the
browsers askes me if I would like to download a file called untyped
binary data.
I am
Just a tip if you're not familiar with SQL, you can get django-
evolution. It works with syncdb, in that syncdb will detect when an
"evolution" of the db is needed like in the example above. It can't do
everything, but it can do a lot if things for you, with some simple
commands.
A second thing.
56 matches
Mail list logo