Whoops, I think I misstated my use case. A better description:
All the fields are required, but I don't want to return a
forms.ValidationError if the entire form is blank, but I do if it is
partially filled, I simply want to drop it.
Perhaps this is simply bad design. Upon further consideration
Hi Shawn,
I am referring to forms.ModelForm, I think it might apply to forms as
well, but I can't think of a good use case off the top of my head.
I suppose I might have an uncommon use case. I display a form that has
several optional parts (that have different models) that can be
dynamically
Hi,
after some discussion with XIa Kai and I tried to delete the .db file
and rebuild it. it works now!
Br, Chen Gang
On Fri, 2009-12-25 at 03:53 +0100, ext Xia Kai(夏恺) wrote:
> Hi,
>
> It seemed that you have run syncdb before your adding the phone_num to the
> model.
>
> As the table is
I am trying to get my little django hello world example site working
based on cherokee + uwsgi + django config.
I want to add detailed instructions to my How-to-Guide. Can you see
how/where to make adjustments?
I if have a url of www.example.com and the following directory
structure:
Hi,
It seemed that you have run syncdb before your adding the phone_num to the
model.
As the table is already created in the database, you may have to delete the
table and create it again.
Xia Kai(夏恺)
xia...@gmail.com
http://blog.xiaket.org
Sorry about the multiple posts, my new Macbook (I'm just setting it up -
I'm normally a Linux desktop person :) has a different email than I had
used to register with the django-users group, and I kept getting
undelivered-mail rejections from Google - I didn't realize it posted
anyway - sorry.
Hi,
thanks for the quick reply.
Actually I call "python manage.py syncdb " and I just didn't mention it
in previous mail. I can save other type of models defined in my
models.py. Is this a bug (my poor guess)?
Br. Chen Gang
On Fri, 2009-12-25 at 03:17 +0100, ext Xia Kai(夏恺) wrote:
> Hi,
>
>
Thanks for the quick response, I figured i would have to do something
similar to what you mentioned. I just wanted to make sure there wasent a
specific way it should be done when using django.
Ben
Łukasz Balcerzak wrote:
> Hi,
>
> For relative paths, os.path module will do the trick - it is
Hi,
It seemed that your db is not created, try to use
python manage.py syncdb
to create the database.
manage.py sql would only print the statements which would be used to created
the database:
---
What about www.librehosting.com?
On Dec 24, 2009, at 2:26 PM, JeffH wrote:
> Tried DreamHost, which is OK for shared static sites; fuggetaboutit
> vis a vis Django. I've been using http://www.valcatohosting.com/. They
> have some good getting started docs and excellent support. Good for
> low
Hi everybody,
I'm trying to create a populated form for users to edit information
already stored in the database. Everything is working except for the
ModelChoiceField. I read that you should give the form constructor the
ID of the model you are using but that isn't working. Nor does giving
it
Hi,
I am really new to this tool... and need you help about this issue,
thanks in advance!
I create models.py like this,
...
class Sms_detailed(models.Model):
group = models.CharField(max_length=15)
phone_num = models.CharField(max_length=15)
IMEI =
> OK, I have Cherokee and uwsgi installed and running.
> Now I am hung up on configuring a domain to resolve to a django
> project/app.
> Leonel: Can you share or point to any configuration details? I have
> reviewed the cherokee admin docs and tried the wizard.
> Thank you :)
>
> --
>
Just
On Thu, Dec 24, 2009 at 7:08 PM, zweb wrote:
> Any way to avoid this 301 MOVED PERMANENTLY ?
As always, the documentation is your friend:
http://docs.djangoproject.com/en/1.1/ref/middleware/#module-django.middleware.common
--
"Bureaucrat Conrad, you are technically
in fire bug I see my program issue
http://localhost:8000/readme?startIndex=0=25 301 MOVED
PERMANENTLY
http://localhost:8000/readme/?startIndex=0=25 200 OK
Any way to avoid this 301 MOVED PERMANENTLY ?
--
You received this message because you are subscribed to the Google Groups
"Django
I'm trying to use initial data with an inline_formset and I get this
>>> fs = SectionFormSet(initial=section_initial)
Traceback (most recent call last):
File "", line 1, in
TypeError: __init__() got an unexpected keyword argument 'initial'
>>>
But inline formsets extend formsets, which take
Hi,
For relative paths, os.path module will do the trick - it is platform
independent. Use os.path's ``join``/``split`` methods and ``sep`` attribute. If
you are depending on absolute paths (which probably for both platforms would
just differ) you may simply call platform.system() and write a
here is my django code:
{{ output_integrate.arg_vals }}
{% for i,o in output_integrate.arg_vals %}
{{ i }}
hi,
while working on templates weird problem occured:
when templates are being rendered (i guess), in code, right before the
doctype, strange character is being placed. I call it "strange"
because if I select it, copy it and try to paste nothing is pasted.
This "dot" is seen only if I do "view
Hey all,
Im fairly new to django and iv got a quick question on what the
proper way to set up a django web application is when in a cross
platform deployment environment (such as setting up paths, ect). Im
currently using the Apache wsgi -> django connector on both
environments. Im
Tried DreamHost, which is OK for shared static sites; fuggetaboutit
vis a vis Django. I've been using http://www.valcatohosting.com/. They
have some good getting started docs and excellent support. Good for
low volume shared hosting. For a large upcoming project, I'm looking
at either Linode or
OK, I have Cherokee and uwsgi installed and running.
Now I am hung up on configuring a domain to resolve to a django
project/app.
Leonel: Can you share or point to any configuration details? I have
reviewed the cherokee admin docs and tried the wizard.
Thank you :)
--
You received this message
On Thu, Dec 24, 2009 at 5:24 PM, hotani wrote:
> I have close to 600 users split by 20 or so offices. We have a
> helpdesk form (using ModelForm) which displays an initial user list
> based on the office, or no users if an office is not selected.
>
> An AJAX function on the
Maybe I'm getting closer, maybe not. What I did was create a bunch of
different subclasses of ServiceRequest, then created a bunch of
inlines within the admin interface for each type. The admin user has
to be smart enough to pick the right kind on their own, but that's OK.
I did it like this:
#
On Dec 24, 2009, at 2:51 PM, Aristotle Miternan wrote:
> Hello all,
>
>I'm fairly new to Django and I noticed a curious behavior of
> forms. I noticed that there is no simple way to test a form for a form
> not being filled at all. I think it might be a semi-common use case
> that you might
Hi All,
My django site is served up with the following in Apache's config:
WSGIScriptAlias /studio /django/studio/bin/django.wsgi
My urls.py looks like:
urlpatterns += patterns(
'django.contrib',
(r'^admin/', include(admin.site.urls)),
(r'^accounts/login/$', 'auth.views.login'),
Hello all,
I'm fairly new to Django and I noticed a curious behavior of
forms. I noticed that there is no simple way to test a form for a form
not being filled at all. I think it might be a semi-common use case
that you might want to simply not generate a new model instance if a
form has no
On Thu, Dec 24, 2009 at 11:40 AM, twister wrote:
> it seems to me that "(r'^admin/(.*)', admin.site.root)" in the urls.py
> cannot match the unicode url string u'admin/'.
No, that's not the actual problem. But without seeing the
configuration you're using for the server, it's
On Dec 24, 4:24 pm, hotani wrote:
> I have close to 600 users split by 20 or so offices. We have a
> helpdesk form (using ModelForm) which displays an initial user list
> based on the office, or no users if an office is not selected.
>
> An AJAX function on the front end
well, I am using Django1.1.1 for my new site and was doing some basic
testing. It is merely an empty site with only "admin" application. The
server is debian lenny with python2.5, the default charset is UTF-8.
The client is windows xp chinese version, with firefox3.6 and IE8.
If I start the
Progress but no cigar...
I ran:
sudo make -f Makefile.Linux.Py26
And it returned:
rm -f utils.o socket.o pymodule.o main.o
gcc -c `python2.6-config --cflags` `xml2-config --cflags` utils.c
gcc -c `python2.6-config --cflags` `xml2-config --cflags` socket.c
gcc -c `python2.6-config --cflags`
I have close to 600 users split by 20 or so offices. We have a
helpdesk form (using ModelForm) which displays an initial user list
based on the office, or no users if an office is not selected.
An AJAX function on the front end dynamically changes users in the
drop-down based on the office
> Having a problem with installing uwsgi. Any suggestions?
>
> $ sudo wget http://projects.unbit.it/downloads/uwsgi-0.9.3.tar.gz
> $ sudo tar xf uwsgi-0.9.3.tar.gz
> $ cd uwsgi-0.9.3
> $ sudo make -f Makefile.Linux.Py26
>
> rm -f utils.o socket.o pymodule.o main.o
> gcc -c `python2.6-config
> Hello Leonel,
>
> I watched the Cherokee Videos and will give it a crack. Here is a new
> Google Doc that I will use to document the process. If anyone else
> reading this has experience with building out a VPS with Cherokee and
> Django along with other key packages, please take a look and
Having a problem with installing uwsgi. Any suggestions?
$ sudo wget http://projects.unbit.it/downloads/uwsgi-0.9.3.tar.gz
$ sudo tar xf uwsgi-0.9.3.tar.gz
$ cd uwsgi-0.9.3
$ sudo make -f Makefile.Linux.Py26
rm -f utils.o socket.o pymodule.o main.o
gcc -c `python2.6-config --cflags` `xml2-config
On Dec 23, 5:13 am, Eric Abrahamsen wrote:
>
> I'm using memcached with the cache_page decorator, and it simply wasn't
> caching
> views.
> CACHE_MIDDLEWARE_KEY_PREFIX = 'blah'
> CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True
> CACHE_BACKEND = 'memcached://XX.XX.XX.XXX:6905/'
>
>
> Some simple tutorial (other than the one on Django website).
>
I have been learning with the offical website tutorial,it is excellent !,why
don't you try it ?
> If some Django evangelist can guild me I will be INDEBTED!
>
> Regards,
> Datta
>
>
--
Regards,
S.Selvam
--
You received this
On Thu, Dec 24, 2009 at 2:58 PM, S.Selvam wrote:
>
>
> On Thu, Dec 24, 2009 at 2:52 PM, Raffaele Salmaso <
> raffaele.salm...@gmail.com> wrote:
>
>> S.Selvam wrote:
>> > Hi all,
>> >
>> > I have a a need to decide the database dynamically.On submitting the
>> > form,i
Hello Leonel,
I watched the Cherokee Videos and will give it a crack. Here is a new
Google Doc that I will use to document the process. If anyone else
reading this has experience with building out a VPS with Cherokee and
Django along with other key packages, please take a look and share
your
Absolutely. Django and everybody who works on it has made my life
richer in both the metaphoric and literal senses.
Thanks!
On Dec 24, 4:05 am, Gabriel Gunderson wrote:
> On Wed, Dec 23, 2009 at 2:52 PM, Ariel Nunez wrote:
> > Thanks one more time, I
On Dec 24, 2009, at 1:57 AM, Peter Rowell wrote:
>> CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True
>
> I know this is a silly question, but have your tried this *as an
> anonymous user*? I ask because it's easy to forget you are logged in.
> When in doubt use something like Firefox's Web Developer
On Dec 24, 6:37 am, dhruvg wrote:
> hey..
>
> i have two lists - lets call them A and B, both of which have the same
> number of elements.
>
> i want to output a table with two columns (one column which will have
> rows containing elements of A and one column which will have
hey..
i have two lists - lets call them A and B, both of which have the same
number of elements.
i want to output a table with two columns (one column which will have
rows containing elements of A and one column which will have rows
contains elements of B)
at first it seems trivial - just use
On Thu, Dec 24, 2009 at 2:52 PM, Raffaele Salmaso <
raffaele.salm...@gmail.com> wrote:
> S.Selvam wrote:
> > Hi all,
> >
> > I have a a need to decide the database dynamically.On submitting the
> > form,i would check a parameter action in my views.py.
> >
> > if action=="dummy":
> >
S.Selvam wrote:
> Hi all,
>
> I have a a need to decide the database dynamically.On submitting the
> form,i would check a parameter action in my views.py.
>
> if action=="dummy":
>DATABASE_NAME=maindb_tmp
> else:
>DATABASE_NAME=maindb
>
> But that does not work,it always chooses
Thanks for reply.
I see, that in this case, i will use replacement system of Unicode
characters to ASCII.
On Dec 23, 6:09 pm, Bill Freeman wrote:
> I haven't done any python programing with variable, function, class,
> and attribute names
--
You received this message
On Dec 23, 11:24 pm, Daniel Roseman wrote:
> On Dec 23, 11:14 pm, maxweld wrote:
>
> > I am pretty sure that it is not loading the custom template tags
> > {{ load i18n admin_modify adminmedia %}
>
> If that's a cut and paste, you have the opening
Hi all,
I have a a need to decide the database dynamically.On submitting the
form,i would check a parameter action in my views.py.
if action=="dummy":
DATABASE_NAME=maindb_tmp
else:
DATABASE_NAME=maindb
But that does not work,it always chooses table from maindb.
How could i force it
48 matches
Mail list logo