Hi all,
I have a model with several FloatFields. Based on this, ModelForm
creates some form.FloatFields.These fields require the user to type
'3.2' instead of '3,2', which is the custom here(Sweden). We need to
allow the comma somehow, for obvious usability reasons.
My first thought was to
# stable release:
an "official release" won´t be there until reordering of edit-inlines
is possible.
we are using grappelli for most of our clients - so I´m considering
the trunk "stable". with stable I mean that for all _our_ usecases it
works fine. bookmarks & navigation is pretty new, so there
guys how do i create a .py file?
stupid question i know, but i'm new to django.
I am working on the tutorial and i don't know how to create views.py
thanks in advance
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"D
On Thu, Apr 16, 2009 at 04:04:29PM +0800, Russell Keith-Magee wrote:
> The problem with loading a fixture from stdin is that you have no idea
> what format that fixture is. Currently, fixture format is detected
> from the filename extension
It's impossible to detect anything about the content of
On Apr 17, 9:04 am, Knut Nesheim wrote:
> Hi all,
>
> I have a model with several FloatFields. Based on this, ModelForm
> creates some form.FloatFields.These fields require the user to type
> '3.2' instead of '3,2', which is the custom here(Sweden). We need to
> allow the comma somehow, for
Thanks, that's a nice workaround. I'll give it a thought. Having a
input filed widget instead of select plus some JS for suggested
search. I use jquery.liveSearch.js allready on a title in my model.
On 16 apr., 17:01, Christopher Dodd wrote:
> Yeah, this is a known issue.http://code.djangopro
hi all,
i have a (probably quite simple) problem concerning the use of
intermediary tables.
i am trying to create a list of users.
users are members of different groups and within these groups they can
have several positions/status (e.g. management, staff member, e.g.).
my models look like this:
at first session["a"] is oldvalue,
request A set session["a"] to newvalue, before session.save to db,(as
in django, the session save action occur at end of the request),
meanwhile, request B arrive, but get session["a"] is still the
oldvalue,
how to handle this?
--~--~-~--~~-
> guys how do i create a .py file?
> stupid question i know, but i'm new to django.
> I am working on the tutorial and i don't know how to create views.py
It's just a plain text source code file with a .py extension, nothing
special. Any text editor should do the trick.
Regards,
Wayne
--~--~--
thanks, i guessed that but the question is how to change the
extension?
On 17 Apr, 10:11, Wayne Koorts wrote:
> > guys how do i create a .py file?
> > stupid question i know, but i'm new to django.
> > I am working on the tutorial and i don't know how to create views.py
>
> It's just a plain tex
It depends on your operating system but usually, right-click > rename
> type what you want.
On Apr 17, 2009, at 2:22 AM, 83nini wrote:
>
> thanks, i guessed that but the question is how to change the
> extension?
>
> On 17 Apr, 10:11, Wayne Koorts wrote:
>>> guys how do i create a .py file?
On Fri, Apr 17, 2009 at 12:53:29AM -0700, 83nini wrote:
> guys how do i create a .py file?
>
> I am working on the tutorial and i don't know how to create views.py
First, for your own good and that of other subscribers to this mailing
list, please see Eric S. Raymond's essay, "How To Ask Question
I guess you're coding in Notepad, in which case I'd recommend to look
for another editor.
By the way, if you want to be able to change file extensions on Windows,
open a Windows
Explorer window, then go to Tools -> Folder Options -> View tab ->
uncheck "Hide extension for known file types".
On
thanks for the useful notes guys, you are really of great help.
oh and Phil, i will pay attention to the subject next time i post
something :)
On 17 Apr, 10:28, Phil Mocek
wrote:
> On Fri, Apr 17, 2009 at 12:53:29AM -0700, 83nini wrote:
> > guys how do i create a .py file?
>
> > I am working on
Hi Knut,
Actually, what would help you here is custom model field + form field
+ widget.
For example, the following combination based on Babel (http://
babel.edgewall.org/) could be used:
class DecimalWidget(forms.TextInput):
def render(self, name, value, attrs=None):
locale=get_cur
A while ago I needed a loop like "for(int i=0; i<20; i++)" within a
Django template. Since the builtin for-loop only iterates over lists
and since there was no appropriate template filter, I created a custom
one.
To me it seems as if this technique isn't well known to many users as
you can see he
Ionut G. Stan wrote:
> I guess you're coding in Notepad, in which case I'd recommend to look
> for another editor.
Yup - my favourite for code editing on Windows is PSPad. Free download
from here:
http://www.pspad.com/en/
Compatible with XP, Vista and Windows7
--
Regards
Phil Edwards
Problem finally solved. I have same form action field for both edit/create new:
{{ form.as_p }}
--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
--~--~
I agree on that it's not a good ideo to have actions in GET
parameters. For things like sorting, pagination and the like it's
propably a good idea because you are only changing the view on the
same data. But "add" is a completely new thing. In HTTP terms it
should propably be a PUT request to /pro
session would be created esaily, but could django create some
application variable like asp.net , or provide some special function
for the different period of server, on_server_start()
on_application_start() or something like that?
--~--~-~--~~~---~--~~
You receive
Christian Joergensen schrieb:
> Thomas Guettler wrote:
>> Hi,
>>
>>
>> For forms which display a list of results I use:
>> form=QueryForm(request.GET)
>>
>> queryset=MyModel.objects.filter(**form.cleaned_data)
>>
>> But, now I need to use exclude() instead of filter().
> >
>> I l
On Fri, Apr 17, 2009 at 3:56 PM, Phil Mocek
wrote:
>
> However, due to long-standing conventions, the filename suffix
> ("extension" in MS-DOS parlance) often provides a clue about the format
> of the data within. These conventions allow loaddata to make a
> reasonable guess about the content of
Hi,
I'm trying to retrieve a list of users belonging to a given group but
don't understand how to do it. It must be a sort of many to many query
but I can't get it to work.
I would like to do something like this:
basic_users_list = User.objects.filter(groups__in=Group.objects.get
(name='basic'
/products/by-popularity/
/products/featured/
/products/page/5/
/products/add/
/products/elvis/
/product/in-the-ghetto/
/product/jail-house-rock/
/product/love-me-tender/
On Apr 16, 2:29 pm, Aidas Bendoraitis
wrote:
> Hello,
>
> Recently, we are solving a conceptual question of designing clean ur
Excellent! That seems to work great, although it'd be nice if it was
usable as an {{ attribute }} I guess I can just write a templatetag
from that from the information you've all provided.
Thanks!
On Apr 16, 9:40 pm, BradMcGonigle
wrote:
> Bah! As usual...I figure this out right after posting
Hi Aidas,
17 apr 2009 kl. 13.01 skrev Aidas Bendoraitis [aka Archatas]:
> Actually, what would help you here is custom model field + form field
> + widget.
>
> For example, the following combination based on Babel (http://
> babel.edgewall.org/) could be used:
This looks like a great solution
Hi all,
I'ìm trying to use json encoding to pass data from a django view to
a jquery based grid template. I have a model like this
class Client(models.Model):
name = models.CharField('Nome', max_length=30)
surname = models.CharField('Cognome', max_length=30)
def __unicode__(self
def myfunc(request, event_id):
context_instance=RequestContext(request)
print "Context", context_instance ### Context: [{'perms':
,
'messages': [], 'user': }, {}]
return render_to_response('test.html',
{'user':request.user},context_instance=RequestContext(request))
in tes
On Apr 17, 1:23 pm, Bastien wrote:
> Hi,
>
> I'm trying to retrieve a list of users belonging to a given group but
> don't understand how to do it. It must be a sort of many to many query
> but I can't get it to work.
>
> I would like to do something like this:
>
> basic_users_list = User.object
Hello World!
I'm doing a django presentation in Austria/Eisenstadt, on Fr. 08th May
2009. It's part auf the "Linuxwochen Eisenstadt"
See
http://linuxwochen.at/index.php?option=com_content&view=article&id=42&Itemid=9
for details.
There are a few weeks left for planning and i'm currently doing som
Thanks Daniel, it works!
On Apr 17, 3:18 pm, Daniel Roseman
wrote:
> On Apr 17, 1:23 pm, Bastien wrote:
>
>
>
>
>
> > Hi,
>
> > I'm trying to retrieve a list of users belonging to a given group but
> > don't understand how to do it. It must be a sort of many to many query
> > but I can't get
I'm looking at the following code from the www.djangobook.com :
Ordering notice
Ordering notice
Dear {{ person_name }},
Thanks for placing an order from {{ company }}. It's scheduled to
ship on {{ ship_date|date:"F j, Y" }}.
Here are the items you've ordered:
{% for item in item_list %}
I solved my problem. i was calling wrong template.
On Apr 17, 6:09 pm, Praveen wrote:
> def myfunc(request, event_id):
> context_instance=RequestContext(request)
> print "Context", context_instance ### Context: [{'perms':
> ,
> 'messages': [], 'user': }, {}]
> return rend
ah! I'm new to this stuff and i wonder why it's not mentioned in
the beginners book that i'm reading!!!
On 17 Apr, 15:40, Daniel Roseman
wrote:
> On Apr 17, 2:38 pm, 83nini <83n...@gmail.com> wrote:
>
>
>
>
>
> > I'm looking at the following code from thewww.djangobook.com:
>
> >
> > Orderi
On Apr 17, 2:38 pm, 83nini <83n...@gmail.com> wrote:
> I'm looking at the following code from thewww.djangobook.com:
>
>
> Ordering notice
>
>
>
> Ordering notice
>
> Dear {{ person_name }},
>
> Thanks for placing an order from {{ company }}. It's scheduled to
> ship on {{ ship_date|date:"F j, Y
On Thu, Apr 16, 2009 at 3:56 PM, Thomas Guettler wrote:
>
> Hi,
>
>
> For forms which display a list of results I use:
> form=QueryForm(request.GET)
>
> queryset=MyModel.objects.filter(**form.cleaned_data)
>
> But, now I need to use exclude() instead of filter().
>
> I looked at the
On Fri, Apr 17, 2009 at 3:18 PM, Daniel Roseman
wrote:
>
> On Apr 17, 1:23 pm, Bastien wrote:
>> Hi,
>>
>> I'm trying to retrieve a list of users belonging to a given group but
>> don't understand how to do it. It must be a sort of many to many query
>> but I can't get it to work.
>>
>> I would
To shorten this:
You need a solid understanding of what HTML is and how the Internet works,
to write Webapplications, or dynamic webpages.
Try this: http://www.w3schools.com/html/DEFAULT.asp
As soon as you understand what this means, and as soon as you can
create a small and ugly - static - Home
What you're trying to do is called "Schema migration" or "evolution"
there's been a lot of talk of it in the past. I recommend the South
project for evolution. Very very flexible. Check it out here:
http://south.aeracode.org/
On Apr 17, 1:30 am, Rama Vadakattu wrote:
> OR you can use django-
Hello
Thanks to several people in these forums i've managed to understand
how to make django queries when it comes to generic relations and how
to manage those objects in django admin.
Now my problems start getting more specific.
I have 3 models - polls, questions and choices that are related t
On Fri, Apr 17, 2009 at 1:58 AM, Horacio de Oro wrote:
>
> Hi! I've a problem with Django not validating my 'CharField's. Maybe
> I'm misunderstanding the docs, and Django doesn't do this kind of
> validations?
>
> I've made a simple example. This is the model:
>
> class SimpleModelC(models.Model
Hi I have a HTML website and im looking to use Django-registration
with it.
I have downloaded the registration app, but cannot see how I add it to
my already made website.
Any help would be great.
--~--~-~--~~~---~--~~
You received this message because you are sub
I'm hitting same problem. It seems to me it is a bug in django.
--~--~-~--~~~---~--~~
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
Hello!
The ImageField and FileField URLs are relative to MEDIA_URL
It's important to skip the leading slash, and add an slash to the end of
the path Attribute.
example:
image = models.Imagefield(path="images/")
In the Template use {{MEDIA_URL}}{{image.url}}
On Fri, 17 Apr 2009 08:00:39 -0700
No help?
--~--~-~--~~~---~--~~
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 to
django-users+unsubscr...
On Thu, Apr 16, 2009 at 1:26 PM, jeffhg58 wrote:
>
> I recently installed django 1.1 beta and I needed to run the django
> test suite. So, under the tests directory I executed runtests.py. I
> received some errors when trying to execute all the tests. I was
> expected that all the tests would hav
>
> What database backend are you using?.
>
PostgreSQL 8.3
> Can you see what's the actual DLL definition of the image_content_type
> field? (i.e. does it contain 'NULL' or 'NON NULL').
>
The DLL is OK:
CREATE TABLE "myprojects_simplemodelc" (
"id" serial NOT NULL PRIMARY KEY,
"name" v
> > What database backend are you using?.
postgresql_psycopg2
On Apr 17, 12:51 pm, Horacio de Oro wrote:
> > What database backend are you using?.
>
> PostgreSQL 8.3
>
> > Can you see what's the actual DLL definition of the image_content_type
> > field? (i.e. does it contain 'NULL' or 'NON NUL
Thank buddie...I'll try out
On 14 abr, 16:43, Peter Herndon wrote:
> I've done something similar using jquery and the dynatree plugin,
> though the directory "structure" doesn't actually exist on the file
> system of the server. I'm building my tree from relationships stored
> in the db.
>
> Wo
I think (in v 1.0) you can call session_store.save() -- I'm guessing
that it will save immediately, but I'm not sure:
http://docs.djangoproject.com/en/dev/topics/http/sessions/?from=olddocs#using-sessions-out-of-views
On Apr 16, 10:06 pm, leopay wrote:
> at first session["a"] is oldvalue,
> requ
Sure thing:
===
# Django settings for my project.
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_em...@domain.com'),
)
MANAGERS = ADMINS
DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2',
'postgresql', 'mysql', 'sqlite3' or 'oracle'.
DATABASE_NAME
Can someone tell me the equivalent QuerySet for the following sql:
select city_name
from city
where city_name not in ('Toronto', 'Richmond', 'Montreal')
>From the python code, I will like to store the above 3 cities in a
list.
--~--~-~--~~~---~--~~
You received th
On Fri, Apr 17, 2009 at 1:02 PM, Thierry wrote:
>
> Can someone tell me the equivalent QuerySet for the following sql:
>
> select city_name
> from city
> where city_name not in ('Toronto', 'Richmond', 'Montreal')
>
> From the python code, I will like to store the above 3 cities in a
> list.
> >
>
On Apr 16, 9:29 am, Aidas Bendoraitis
wrote:
> ...and there should be either a black list of words for
> like del.ici.ous and flickr.com does, or there
> should be another way to differentiate between slugs and
> controlling words...
This may be obvious, but in case it's not, options are exten
Karen,
Thanks so much for the explanation! Actually, I was incorrect I used the
development version via SVN revision 10369. I just downloaded the latest
version today. Also, I missed putting in the first error, a cut and paste
problem. I included all the 3 errors are included here
http
Hi,
I am facing a problem which I believe should be a usual issue for
everyone. But I cannot find a way to do it in a straightforward
manner.
I have to select a list of items from table A and delete everyone
of them. Now, there are close to 20K elements which I want to delete.
So, what I do
On Fri, Apr 17, 2009 at 2:47 PM, koranthala wrote:
>
> Hi,
>I am facing a problem which I believe should be a usual issue for
> everyone. But I cannot find a way to do it in a straightforward
> manner.
> I have to select a list of items from table A and delete everyone
> of them. Now, there
On Apr 17, 11:51 pm, Alex Gaynor wrote:
> On Fri, Apr 17, 2009 at 2:47 PM, koranthala wrote:
>
> > Hi,
> > I am facing a problem which I believe should be a usual issue for
> > everyone. But I cannot find a way to do it in a straightforward
> > manner.
> > I have to select a list of items
If I run "./manage.py tests booking" it returns ok but says it ran 0 tests
so I'm obviously not doing something right if it's not running the test at
all. I keep reading the docs but it's not coming to me what I messed up.
--~--~-~--~~~---~--~~
You received this mes
patrickk wrote:
> # stable release:
> an "official release" won´t be there until reordering of edit-inlines
> is possible.
> we are using grappelli for most of our clients - so I´m considering
> the trunk "stable". with stable I mean that for all _our_ usecases it
> works fine. bookmarks & navigat
Hey all,
Thanks for reading. I have gone over and over the section first half
of the chapter about having a simple search form. Here are my views:
from django.shortcuts import render_to_response
from mysite.books.models import Book
def search_form(request):
return render_to_response('search
On Apr 17, 11:57 pm, koranthala wrote:
> On Apr 17, 11:51 pm, Alex Gaynor wrote:
>
>
>
> > On Fri, Apr 17, 2009 at 2:47 PM, koranthala wrote:
>
> > > Hi,
> > > I am facing a problem which I believe should be a usual issue for
> > > everyone. But I cannot find a way to do it in a straightfo
On Fri, 2009-04-17 at 12:45 -0700, LeeRisq wrote:
> Hey all,
>
> Thanks for reading. I have gone over and over the section first half
> of the chapter about having a simple search form. Here are my views:
>
> from django.shortcuts import render_to_response
> from mysite.books.models import Book
On Fri, Apr 17, 2009 at 4:05 PM, koranthala wrote:
>
>
>
> On Apr 17, 11:57 pm, koranthala wrote:
> > On Apr 17, 11:51 pm, Alex Gaynor wrote:
> >
> >
> >
> > > On Fri, Apr 17, 2009 at 2:47 PM, koranthala
> wrote:
> >
> > > > Hi,
> > > >I am facing a problem which I believe should be a usua
On Apr 18, 1:08 am, Alex Gaynor wrote:
> On Fri, Apr 17, 2009 at 4:05 PM, koranthala wrote:
>
> > On Apr 17, 11:57 pm, koranthala wrote:
> > > On Apr 17, 11:51 pm, Alex Gaynor wrote:
>
> > > > On Fri, Apr 17, 2009 at 2:47 PM, koranthala
> > wrote:
>
> > > > > Hi,
> > > > > I am facing a
Hi.
You have named your test incorectly, so django won't see it as a test.
You need to name testCamelCaseName. Camel cases are probably not
required but that's the convention. Try renaming your test.
~Jakob
On Apr 17, 9:04 pm, Daniel Joshua Worth
wrote:
> If I run "./manage.py tests booking" it
On Fri, Apr 17, 2009 at 4:26 PM, google torp wrote:
>
> Hi.
> You have named your test incorectly, so django won't see it as a test.
> You need to name testCamelCaseName. Camel cases are probably not
> required but that's the convention. Try renaming your test.
>
> ~Jakob
>
> On Apr 17, 9:04 pm,
Hi.
Glad it worked out. You can't use [0] when using get as it retrives
an object. You can use it when you use filter as it returns a
queryset instead. That was my point, but using exclude before
get is fine aswell.
~Jakob
On Apr 17, 8:13 am, zayatzz wrote:
> Thanks
>
> using [0] after objects.
Hi everyone,
I have an abstract model called Page. Two classes inherit this, and
there is a ManyToMany field on Page. syncdb is creating the
intermediary tables correctly, and admin shows me the correct values
to the related model.
But, when I go to save the record, none of the m2m data is getti
On Fri, Apr 17, 2009 at 4:48 PM, Brandon Taylor wrote:
>
> Hi everyone,
>
> I have an abstract model called Page. Two classes inherit this, and
> there is a ManyToMany field on Page. syncdb is creating the
> intermediary tables correctly, and admin shows me the correct values
> to the related mode
Hi Alex,
Thanks for the reply. Here's the link: http://dpaste.com/34979/
b
On Apr 17, 3:50 pm, Alex Gaynor wrote:
> On Fri, Apr 17, 2009 at 4:48 PM, Brandon Taylor
> wrote:
>
>
>
> > Hi everyone,
>
> > I have an abstract model called Page. Two classes inherit this, and
> > there is a ManyToMa
Sorry Alex, my bad. I see the error. Doh!
On Apr 17, 3:54 pm, Brandon Taylor wrote:
> Hi Alex,
>
> Thanks for the reply. Here's the link:http://dpaste.com/34979/
>
> b
>
> On Apr 17, 3:50 pm, Alex Gaynor wrote:
>
> > On Fri, Apr 17, 2009 at 4:48 PM, Brandon Taylor
> > wrote:
>
> > > Hi everyon
Ugh. My pastie was bad - had multiple versions of the same file open,
and didn't get the most recent one: http://dpaste.com/34983/
On Apr 17, 3:54 pm, Brandon Taylor wrote:
> Hi Alex,
>
> Thanks for the reply. Here's the link:http://dpaste.com/34979/
>
> b
>
> On Apr 17, 3:50 pm, Alex Gaynor wr
Well the docs use camel case for tests, so figured that was the
convention
in Django. But the there are also some other places where Django
doesn't
quite follow the rules, like using _ in some of the HTML it generates.
Maybe that part of the docs should be cleaned up, I always thought
camel
cases
Of course that worked. I would like to put a plug in for adding that the
tests need to begging with test in the docs. Would have saved me some
trouble. Thank you guys so much for your help.
Daniel Worth
--~--~-~--~~~---~--~~
You received this message because you ar
On Fri, Apr 17, 2009 at 5:28 PM, Daniel Joshua Worth wrote:
> Of course that worked. I would like to put a plug in for adding that the
> tests need to begging with test in the docs. Would have saved me some
> trouble. Thank you guys so much for your help.
>
> Daniel Worth
>
>
> >
>
A cursory revi
hi All,
So I was beating my head against this problem for a couple of hours,
and when I finally found out what I was doing wrong, I beat my self
some more for over looking such a simple mistake. I was starting a
new app, and was adding a form to my view, and then passing this form
to the templat
On Sat, Apr 18, 2009 at 5:32 AM, Alex Gaynor wrote:
>
> On Fri, Apr 17, 2009 at 5:28 PM, Daniel Joshua Worth
> wrote:
>>
>> Of course that worked. I would like to put a plug in for adding that the
>> tests need to begging with test in the docs. Would have saved me some
>> trouble. Thank you guys
>
> No - please don't. The Django docs explicitly state that Django's test
> framework is based on Python's unittest and doctest frameworks, and
> provides links to the docs for those frameworks. It's not our place to
> including "how to use unittest" or "how to use doctest" documentation,
> as we
could any one provide some tips
On Apr 17, 6:02 pm, forrest yang wrote:
> session would be created esaily, but could django create some
> application variable like asp.net , or provide some special function
> for the different period of server, on_server_start()
> on_application_start() or somet
On Thu, Apr 16, 2009 at 3:04 PM, Col Wilson
wrote:
> Thanks all. I have some reading to do, but I have also noticed in the
> meantime that generic views docs (http://docs.djangoproject.com/en/dev/
> ref/generic-views/#ref-generic-views) have a hook into the auth
> system. Look for 'login_required
On Sat, Apr 18, 2009 at 8:06 AM, Daniel Joshua Worth
wrote:
>> No - please don't. The Django docs explicitly state that Django's test
>> framework is based on Python's unittest and doctest frameworks, and
>> provides links to the docs for those frameworks. It's not our place to
>> including "how
On Sat, Apr 18, 2009 at 12:31 AM, Russell Keith-Magee <
freakboy3...@gmail.com> wrote:
>
> On Sat, Apr 18, 2009 at 8:06 AM, Daniel Joshua Worth
> wrote:
> >> No - please don't. The Django docs explicitly state that Django's test
> >> framework is based on Python's unittest and doctest frameworks,
On Apr 18, 1:26 am, koranthala wrote:
> On Apr 18, 1:08 am, Alex Gaynor wrote:
>
>
>
> > On Fri, Apr 17, 2009 at 4:05 PM, koranthala wrote:
>
> > > On Apr 17, 11:57 pm, koranthala wrote:
> > > > On Apr 17, 11:51 pm, Alex Gaynor wrote:
>
> > > > > On Fri, Apr 17, 2009 at 2:47 PM, koranthala
84 matches
Mail list logo