Hi,
I've got a ModelForm, and the model for it contains a birth date field
(as a DateField):
class FiremanForm(ModelForm):
class Meta:
model = Fireman
Currently a single text box is rendered to enter the date, but I'd
like to have a drop down list for day, month, year.
I'm
http://docs.djangoproject.com/en/dev/topics/forms/modelforms/
This lists PhoneNumberField as being a field type, but in the models
documentation,
http://docs.djangoproject.com/en/dev/ref/models/fields/#ref-models-fields
there is no such field.
Does anybody know if this field exists? I'd quite
m working with the latest patch from #6231 and so the widget is now
> useful for me. But I hope that this patch find it's way into django
> trunk!
>
> ~Bernd
>
> On Jan 5, 11:00 pm, DragonSlayre <lssay...@gmail.com> wrote:
>
> > Hi,
>
> > I've got a Mo
Thanks :)
On Jan 6, 12:46 pm, "Karen Tracey" <kmtra...@gmail.com> wrote:
> On Mon, Jan 5, 2009 at 5:33 PM, DragonSlayre <lssay...@gmail.com> wrote:
>
> >http://docs.djangoproject.com/en/dev/topics/forms/modelforms/
>
> > This lists PhoneNumberFie
rm(forms.ModelForm):
> birth_date = forms.DateField(widget=widgets.SelectDateWidget())
>
> On Jan 6, 12:11 am, DragonSlayre <lssay...@gmail.com> wrote:
>
> > I've tried using it, but I'm still quite new to django - I put it into
> > my model file for now, and made my mod
I'm trying to generate a form with a user's details, so that they can
change the details they've submitted.
One of my forms is a ModelForm, which is the profile of the User
object. I also want to show the first name, last name and email from
the User object, so I've created a form for that
Thank you thank you thank you
Cheers Malcolm, you're the best!
On Jan 9, 2:31 pm, Malcolm Tredinnick <malc...@pointy-stick.com>
wrote:
> On Thu, 2009-01-08 at 17:09 -0800, DragonSlayre wrote:
> > I'm trying to generate a form with a user's details, so that they can
> &g
I'm using django-thumbs (http://code.google.com/p/django-thumbs/) to
create some thumbnails for my site:
class Image(models.Model):
title = models.CharField(max_length=50, blank=True, null=True)
caption = models.CharField(max_length=100, blank=True, null=True)
photo =
)
and
> MEDIA_URL = 'static/'
to:
MEDIA_URL = '/site_media/'
I think I get it now - the media_root is where django uploads images
to, and the media_url is where the images will be linked from. -
hopefully that is what they mean :)
On Jan 17, 6:06 pm, DragonSlayre <lssay...@gmail.com>
Yeah, that makes good sense - I tried finding out info on
djangoproject but didn't quite understand what they were for.
Thanks
On Jan 17, 7:04 pm, Malcolm Tredinnick <malc...@pointy-stick.com>
wrote:
> On Fri, 2009-01-16 at 21:06 -0800, DragonSlayre wrote:
> > I'm using djan
Hi,
As I'm relatively new to python and django, I'm unsure how to get the
date and time out of a DateTimeField.
How I usually work with this sort of thing is to 'python manage.py
shell' and then import whatever class i'm interested in and then do a
dir() on the object to find out what methods
Thanks for the tips, the help thing looks real - well... helpful! lol
--~--~-~--~~~---~--~~
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
Hi,
I've seen some posts from a while back, but didn't find any real
solution when searching to find out how to put multiple images (or any
field for that matter) into a form (mainly a ModelForm)
Basically what I want to have is a form that has a one to many
relationship from a post to images,
0, 5:48 pm, DragonSlayre <lssay...@gmail.com> wrote:
> Hi,
>
> I've seen some posts from a while back, but didn't find any real
> solution when searching to find out how to put multiple images (or any
> field for that matter) into a form (mainly a ModelForm)
>
> Ba
to
choose an image. - is there anyway to tell the foreignkey field to
render the items pointed to by the foreign key, rather than just
render a drop down list?
On Jan 21, 3:14 am, "Karen Tracey" <kmtra...@gmail.com> wrote:
> On Tue, Jan 20, 2009 at 2:28 AM, DragonSlay
I've just done a fresh install of python 2.6 and django 1.0.2, and
sqlite3 in ubuntu, and I've cloned my repository, and tried python
manage.py runserver, but then I get this error:
File "/usr/local/lib/python2.6/site-packages/django/db/backends/
sqlite3/base.py", line 27, in
raise
25, 3:22 pm, DragonSlayre <lssay...@gmail.com> wrote:
> I've just done a fresh install of python 2.6 and django 1.0.2, and
> sqlite3 in ubuntu, and I've cloned my repository, and tried python
> manage.py runserver, but then I get this error:
>
> File "/usr/local/lib/python2
Importing sqlite3 fails as well (if I type this into a python
shell)
import sqlite3
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.6/sqlite3/__init__.py", line 24, in
from dbapi2 import *
File "/usr/local/lib/python2.6/sqlite3/dbapi2.py",
Just doing some exploring - noticing that:
* /usr/lib/python2.5/site-packages has a pysqlite2 folder as well as a
PIL folder
* /usr/local/lib/python2.6/site-packages has just django in it
I'm not sure how the whole site-packages things work, or why python
2.5 is in /usr/lib/ and python 2.6 is
On Jan 25, 6:04 pm, Steve Holden wrote:
>
> When you install something by running
>
> python setup.py install
>
> it gets installed into the python that is used to run setup.py. It looks
> like you had /usr/local/bin on your path when you installed django, but
> not when
Hi,
I've made a total mess of python (I installed python2.6 from source,
installed python 2.6 from an installer (http://jaredforsyth.com/
content/install-python-26-ubuntu)). The source version installed
into /usr/local/, and the installer version installed into /usr/.
After installing python
Ok, well I reinstalled ubuntu.
It'd still be good to know how to change python versions easily, if
anybody knows how to do this - it seems like it's not documented
anywhere :(
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
On Jan 27, 1:41 pm, wrote:
> Does this help? Found via google and ubuntu
> forums.https://launchpad.net/~doko/+archive
>
> Sorry, I run Debian (which ubuntu is based on), I just apt-get install all of
> the
> available python versions and then run /usr/bin/python to
On Jan 27, 3:15 pm, Steve Holden <holden...@gmail.com> wrote:
> DragonSlayre wrote:
> That's most easily done by controlling your PATH so the the version you
> want to prefer is found first when python is called for.
>
> regards
&g
RE Steve - I tried earlier to change the PYTHONHOME variable (seen in
the man pages - http://linux.die.net/man/1/python), the python path
urls changed, but they were a bit screwed up.
The way I changed it was by editing the .bashrc (hidden) file in my
home directory. I think I wrote something
On Jan 27, 4:11 pm, Steve Holden <holden...@gmail.com> wrote:
> DragonSlayre wrote:
>
> > On Jan 27, 3:15 pm, Steve Holden <holden...@gmail.com> wrote:
>
> >> DragonSlayre wrote:
> > How do you do this?
>
> http://www.swc.scipy.org/lec/shell
Thanks Waylan -
http://achinghead.com/archive/83/installing-multiple-versions-python/
is just what I needed.
Thanks Shaleh,
I appreciate the detailed explanation :)
Yes - the shell is something that I have to get more familiar with -
I've only really recently started using ubuntu for
I've created a dynamic form to allow users to upload images, and I'm
trying to validate the form. - it displays fine, but when I validate
and return a response, I get either a Key Error at the line (data =
self.cleaned_data[dataName] ) in _clean_photo or I get a render error
in my template at {{
I'm guessing that you might have tried to do a ForeignKey(User) for
the other_invited. If that is the case, then I think you need to add
a related_name e.g. ForeignKey(User,
related_name="group_invited_to"). You may have to do a related name
for the creator as well.
I hope that helps.
On Jan
Hi,
I'm at the final stage in one of my django developments, and am trying
to get my site live.
I've been following instructions on
http://www.jeffbaier.com/2007/07/26/installing-django-on-an-ubuntu-linux-server/
but got the following error:
File
Solved my problem - data = self.cleaned_data[dataName] should have
been:
data = self.cleaned_data.get(dataName)
Silly me
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group,
Hi, I'm new to django/python, and I'm testing out eclipse for
development.
I'm using pydev, and managed to run my app, but then when I go to the
web page, I get:
ImportError at /time/
No module named urls
Request Method: GET
Request URL:http://localhost:8080/time/
Exception Type:
version, then I should probably find out why my version doesn't
support rename.
Louis
On Oct 22, 2:03 pm, Jeff Anderson <[EMAIL PROTECTED]> wrote:
> DragonSlayre wrote:
> > Hi, I'm new to django/python, and I'm testing out eclipse for
> > development.
>
> > I'm using py
Hey, I'm getting started with a friend in developing a site with
Django, and we're both new to this, so I am wondering what people use
to manage all their files, and for looking at documentation etc.
Having come from a Java background, I'm used to great documentation,
and suspect that Java is
Well maybe the problem is that the answer is not obvious
On Nov 25, 3:42 am, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote:
> On Tuesday 25 November 2008 01:57:09 pm DragonSlayre wrote:
>
> > How do you develop your django projects, and where do you go when you
> > ne
Hi,
for some reason my hyperlink is not coming out as I expect it to.
Here is my code in my template:
{% for category in categories %}
{{ category.name }}
{% endfor %}
The outcome is the following html code:
Books
I've checked and I only have one 'little'
If the problem is inside my view, shouldn't the output generated look
more like this though:
Books
What i don't understand, is how 1) ' ' is showing up, and 2) why it doesn't have the
tags inside.
For 1, I can understand how the problem might be in my view, but
www.openrpg.com
>
> On Thu, Dec 4, 2008 at 7:58 PM, Malcolm Tredinnick
>
> <[EMAIL PROTECTED]> wrote:
>
> > On Thu, 2008-12-04 at 18:49 -0800, DragonSlayre wrote:
> >> Hi,
>
> >> for some reason my hyperlink is not coming out as I expect it to.
> >>
Hi,
I've seen some code with the following in, but can't find what the
string 'date added' is representing in the documentation.
What is the string for?
models.DateTimeField('date added')
Thank you!
I know it's easy, but it'd take me forever to find out.
Thanks a lot !
On Dec 10, 1:24 pm, friggstad <[EMAIL PROTECTED]> wrote:
> It is the human-friendly name used in the admin.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group,
Hi,
I've just made a new 'Student' model, and was trying to create a new
Student in the admin interface, and I got the following error:
Environment:
Request Method: POST
Request URL: http://localhost:8000/admin/student/student/add/
Django Version: 1.0.2 final
Python Version: 2.5.2
Installed
Oh ok, thanks a lot!!
Yes, I'm learning python too at the same time as django...
On Dec 10, 4:35 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Tue, 2008-12-09 at 19:23 -0800, DragonSlayre wrote:
> > Hi,
>
> > I've just made a new 'Student' model, and wa
Hi,
I'm currently working with django-registration, and have the following
url pattern (it's included from my other url pattern):
url(r'^register/$',
register,
name='registration_register',
),
This calls a view:
url(r'^register/$',
register,
{'extra_context' : {'currentmaintab' :
'account'}},
name='registration_register',
),
It would have been nice if you could have told me straight up.
I've got a profile model which has a django.contrib.auth.models.User
as a foreign key.
I am trying to assign the User object to my profile model after I've
checked that the user is valid and that the profile contents are also
valid.
Once I've saved my user object, I then call
profile_form.user
Ok - I'm digging deeper, and I realise that my form doesn't have a
user, as it's excluded from the form using exclude = ('user').
I'll carry on looking...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django
com>
wrote:
> On Dec 19, 8:28 pm, nbv4 <cp368...@ohio.edu> wrote:> On Dec 19, 3:15 pm,
> DragonSlayre <lssay...@gmail.com> wrote:
>
> > > profile_form.user = user;
> > > profile_form.save()
>
> > The problem is that you can't assign fields in
Actually, it seems a bit redundant doesn't it? I see there is a
get_profile, but nothing to set it anyway. I guess it's derived
information from the database Yay! such simple solutions, I'm so
happy to be able to register.
On Dec 20, 9:42 am, DragonSlayre <lssay...@gmail.com> wrote:
I've created my own form:
Login:
Username:
Password:
I am mappying /accounts/login/ to a view of mine, which is then
calling:
if request.method == 'POST':
username = request.POST['login_username']
I have no idea why I'm getting the error - "Key 'login_username' not
:03 -0800, DragonSlayre wrote:
> > I've created my own form:
>
> >
> > Login:
> > Username:
> >
> > Password:
> >
> >
> >
>
> > I am mappying /accounts/login/ to a view of mine, which is then
> > calling:
>
> >
50 matches
Mail list logo