Hi Folks,
I'm not sure if this is a bug, but it seems like if I do a test with {%
ifequal %} for a string with spaces in it, I get a TemplateSyntaxError:
'ifequal' takes two arguments. Here's my code:
{% for tower in towers %}
{% ifequal tower.country "United Kingdom" %}
document.towers.elements
Eric,
could you be a bit more specific about what kind of "J2EE" the
application was originally written in?
Was it using Struts, Spring, EJBs (which version), Hibernate, JSF...?
Or Just plain old JSPs+Servlets?
S.
Eric Walstad wrote:
> Jacob,
>
> Thanks very much for organizing, and paying f
I've now updated this on the Wiki.
Graham King wrote:
> In the RemovingTheMagic wiki page the SQL to upgrade
> django_content_type is given as:
>
> UPDATE django_content_type SET name='group' WHERE model='group';
> UPDATE django_content_type SET name='user' WHERE model='user';
>
> Th
> Okay point taken - I'll stop trying to be 'elegant' and just live with
> the problem and deal with managing this with a 'VehicleType' model and
> several redundant fields.
>
> It is slightly anoying though!
Annoying? I work on Windows, you insensitive clod!
Cheers,
--
Carlos Yoder
[EMAIL PROTE
Hi all,I have the following to models:class Codec(models.Model): name = models.CharField(maxlength=200) desc = models.TextField() type = models.CharField(maxlength=32,choices=CODEC_TYPES, radio_admin=True,default="WM")
def __str__(self): return self.desc class Admin: p
Christian Schneider wrote:
> I can do Codec.objects.all()[0].format_set.all() but when I do
> Format.objects.all()[0].codec.all() I get the following traceback:
> File "/usr/lib/python2.3/site-packages/django/db/models/query.py", line
> 780, in lookup_inner
> raise TypeError, "Cannot resolve
On 5/10/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
Exactly. That's precisely what I pointed out in the (now closed)ticket for this feature request. Settings files are pure Python for areason -- this sort of flexibility.Let's move onto more pressing improvements to the framework, shall we?
It wo
On 5/10/06, Michael Radziej <[EMAIL PROTECTED]> wrote:
Christian Schneider wrote:> I can do Codec.objects.all()[0].format_set.all() but when I do> Format.objects.all()[0].codec.all() I get the following traceback:> File "/usr/lib/python2.3/site-packages/django/db/models/query.py", line
> 780, in
Hi,
My problem was a stupid error on my own. You haven't, by chance, created
a field named "id" and haven't set primary=True?
Michael
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post t
Hi,
I wonder what it the purpose of the sites app in django.contrib ? It
does not
seem to be used that much ... or is it supposed to be a base on which things
can be built ?
--
Z.
--~--~-~--~~~---~--~~
You received this message because you are subscrib
Jorge,
Thanks a lot for help.It works.
L.
--~--~-~--~~~---~--~~
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
Hi,
I'm trying to implement a complicated sequence of updates inside a
form-handling view, and I realized that it might be best to do it
inside a Postgresql function. In fact, I've already found sample code
for a postgres function that's almost exactly what I need.
My question is, how do I
On Wed, 2006-05-10 at 06:20 -0700, mazurin wrote:
>
> Hi,
>
> I'm trying to implement a complicated sequence of updates inside a
> form-handling view, and I realized that it might be best to do it
> inside a Postgresql function. In fact, I've already found sample code
> for a postgres function
Michael,On 5/10/06, Michael Radziej <[EMAIL PROTECTED]> wrote:
Hi,My problem was a stupid error on my own. You haven't, by chance, createda field named "id" and haven't set primary=True?no, unfortunately not.chris
--~--~-~--~~~---~--~~
You received this message be
Christian Schneider wrote:
> Michael,
>
> On 5/10/06, Michael Radziej <[EMAIL PROTECTED]> wrote:
>>
>> Hi,
>>
>> My problem was a stupid error on my own. You haven't, by chance, created
>> a field named "id" and haven't set primary=True?
>
>
> no, unfortunately not.
Since this stuff is tested
On 5/10/06, Michael Radziej <[EMAIL PROTECTED]> wrote:
Since this stuff is tested in the automated test suite, you could tryrunning these. Would be interesting whether they break for you, too.There's a file runtests.py, start this. It will use your settings to
access the database server, but create
Christian Schneider wrote:
> thanks for the hint. Running the tests gives me 17 errors. While most of
> them are due to my German localisation, like got "1 Tag" expected "1 day",
> there are also errors like the following:
>
> 'transactions' module: API test failed
> =
On 5/10/06, mazurin <[EMAIL PROTECTED]> wrote:
> My question is, how do I add the CREATE FUNCTION statement to
> Django's db-creating process? For initial data, I know that I just make
> a bunch of .sql files that have the same name as the models, and put
> them inside the sql/ directory. Is the
> I understand that Django maintains two parallel hierarchies of field
> classes, one related to models that correspond to table columns and one
> that maps these fields to forms so that they can be edited in the admin
> interface. This works ok most of the time, but what if one wants to
> have an
Hi all,
I'm going to setup a (small) site using django and I need to decide on
a basic hosting plan.
I'm considering both dreamhost and bluehost and I can't quite decide.
Do you have any recommendations?
Thanks in advance,
Marco
--~--~-~--~~~---~--~~
You received
Personally I prefer DreamHost because of svn and jabber (very useful
stuff for me).
On 5/10/06, panta <[EMAIL PROTECTED]> wrote:
>
> Hi all,
> I'm going to setup a (small) site using django and I need to decide on
> a basic hosting plan.
> I'm considering both dreamhost and bluehost and I can't q
I recently set up Apache and mod_python to play with Django. My server
is also using mod_php all with a MySQL database. I was noticing weird
bugginess -- the admin page sometimes would be there, then sometimes
give errors, etc. The fine folks on IRC helped me to realize that I
need to restart A
Hmm - were you drunk when you posted this?
--~--~-~--~~~---~--~~
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, sen
Hi group,
I just started working on my 1st django app.
Since I rely extensively on my IDE (SPE!) I want to make sure these run
smoothly together. When executing:
from django.conf import global_settings
in the shell of my IDE, it wouldnt import right, so I added the
following statement to
django.c
He is using a common joke found in the slashdot community. See
http://en.wikipedia.org/wiki/Slashdot_culture
But then again, this is not slashdot. So yeah, maybe he was drunk.
On 5/10/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Hmm - were you drunk when you posted this?
>
>
> >
>
--~-
Actually I had to solve this yesterday and found that there is an
easier and cleaner way based around adding a context processor.
The simple option is to add "django.core.context_processors.auth" to
TEMPLATE_CONTEXT_PROCESSORS in your settings file. This makes 'user'
available in all template con
I'd love to know more too and can't find anything relevant in the
developer's group.
--~--~-~--~~~---~--~~
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@googlegrou
HI all,I'm a relative newbie to django, but so far I'm mightily impressed (particularly with the speed of development).I've just run into my first serious problem when trying to get comments functioning though. Here's what I've done:
added 'django.contrib.comments' to my INSTALLED_APPSrun 'python
On Wednesday 10 May 2006 02:09, [EMAIL PROTECTED] wrote:
> Eric,
>
> could you be a bit more specific about what kind of "J2EE" the
> application was originally written in?
>
> Was it using Struts, Spring, EJBs (which version), Hibernate, JSF...?
> Or Just plain old JSPs+Servlets?
>
> S.
Hi Sté
With comments installed you can use the comments template tags to
attach a comment thread to any object in the template.
For example, for a hypothetical blog post, the template code to get
the list of free comments for the object might look like this:
{% load comments %}
{% get_free_comment_list
It's generally used as a ManyToMany in other apps to assign objects
(blog posts, stories, e.g.) to be published to one or more sites at a
time.
On 5/10/06, Zeuxis <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I wonder what it the purpose of the sites app in django.contrib ? It
> does not
> seem
hi,
I am just starting up with django and got stuck in this error when I
try to access my app url. the admin url works fine.
here is my urls.py:
from django.conf.urls.defaults import *
urlpatterns = patterns('',
# Example:
(r'^databaseImport/$', include('epigrassWeb.databaseImport')),
epigrassWeb/databaseImport.py should contain:
urlpatterns = (
... module-specific URLs ...
)
On 5/10/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> hi,
>
> I am just starting up with django and got stuck in this error when I
> try to access my app url. the admin url works fine.
>
> here is
the problem is the dollar sign at the end of the expression, get rid of it
On 5/10/06, Vladimir Pouzanov <[EMAIL PROTECTED]> wrote:
>
> epigrassWeb/databaseImport.py should contain:
> urlpatterns = (
> ... module-specific URLs ...
> )
>
> On 5/10/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
nowhere in the documentation is is said to add a urlpatterns variable
inside the application main module... The urls should be defined in the
urls.py. remember that the url pattern for the admin script works...
--~--~-~--~~~---~--~~
You received this message becau
I tried that and it does not 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
On 5/10/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> nowhere in the documentation is is said to add a urlpatterns variable
> inside the application main module... The urls should be defined in the
> urls.py. remember that the url pattern for the admin script works...
When you do 'include',
Here's my urls.py:
from django.conf.urls.defaults import *
urlpatterns = patterns('',
# Admin
(r'^admin/', include('django.contrib.admin.urls')),
# News
(r'^news/', include('cmh.apps.news.urls')),
...
apps/news/urls.py:
from django.conf.urls.defaults import *
urlpatterns = patt
> When you do 'include', the thing being included must be a valid
> URLConf, which means it must generate a 'urlpatterns'. The
> documentation does not explicitly state this, I assume because it
> hopes that by that point in the documentation it's understood what is
> meant by the term "URLConf".
Hello,
I am trying to get a SelectField to render with a default value, i.e.,
a pre-selected choice.
With the current SelectField implementation, this is not possible. I
see this issue has been addressed before but was closed as "wontfix"
with this reason:
"This is not in the scope of the form
Here is the scenario:
I create my models, call up the admin interface, insert some records.
so far, so good.
back to admin man page I click on the database I have just edited to
see my records.
It then show me a table with as many blank lines as records in my
database. The title of this table i
Hello all,
I'm new to Django. :)
I'm following the online tutorial. I'm created a application called
"browser" and I'm writing my models. And I'm running into a subclassing
problem. Here is my code:
from django.db import models
class BasicContact:
contact_name = models.CharField(maxlength=
On Wed, 2006-05-10 at 14:25 -0700, [EMAIL PROTECTED] wrote:
> Here is the scenario:
>
> I create my models, call up the admin interface, insert some records.
>
> so far, so good.
>
> back to admin man page I click on the database I have just edited to
> see my records.
> It then show me a table
On Wednesday 10 May 2006 17:13, jelle wrote:
> Am I having a wrong expectation in what extent my IDE can run django,
> or am I overlooking something here?
You can't create model classes interactively, due to the way the
metaclass works. There is a ticket about this:
http://code.djangoproject.
subclassing currently does not work, it is still in development
On 5/10/06, Alex <[EMAIL PROTECTED]> wrote:
>
> Hello all,
>
> I'm new to Django. :)
>
> I'm following the online tutorial. I'm created a application called
> "browser" and I'm writing my models. And I'm running into a subclassing
> p
Honza Král wrote:
> subclassing currently does not work, it is still in development
Humm, after some thinking, I'm also subclassing the models.Model. This
would generate a all the *Field fields which would be a problem.
Then generating the sql syntax for subclasses should then be explicitly
g
Can someone point me to a Django list aimed more towards "newbies"?
I don't want to bother you all with my mundane, trivial questions but
I still would love to jump head first into Django. I just can't get it
working right. I have not been able to get past the first step of the
tutorial.
I am no
Paulo,
On Wed, 2006-05-10 at 14:54 -0700, Paulo wrote:
> Can someone point me to a Django list aimed more towards "newbies"?
This is it. There is one django-users list.
>
> I don't want to bother you all with my mundane, trivial questions but
> I still would love to jump head first into Django
Got ya. If it helps it is a bare CentOS 4.3 install. I'll keep
plugging away then.
Thanks again for everyone's help.
On 5/10/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
>
> Paulo,
>
> On Wed, 2006-05-10 at 14:54 -0700, Paulo wrote:
> > Can someone point me to a Django list aimed more towar
Juancho wrote:
>"This is not in the scope of the formfields.py framework. Formfields
>just know how to display themselves -- they don't know (or care) about
>data. Put this in your business logic."
>
>
This means that SelectField shouldn't care of concept of default data
itself. But it surely
[EMAIL PROTECTED] wrote:
>Well, I have tried setting urlpatterns in databaseImport.py (copied
>from urls.py) but it the error message did not change.
>
>
But why you include this databaseImport.py ??? You should include your
applications urls.py where you describe your urls.
--~--~-~-
Hi,
I have a model with a field defined as
created = models.DateTimeField(auto_now_add = True)
Problem is that when an object of this type is updated, the UPDATE query
has a clause like
"created"=NULL
which is violating the NOT NULL constraint on the field. I was under the
impression
On May 10, 2006, at 3:12 PM, Paulo wrote:
>>> I don't want to bother you all with my mundane, trivial questions
>>> but
>>> I still would love to jump head first into Django. I just can't
>>> get it
>>> working right. I have not been able to get past the first step of
>>> the
>>> tutorial.
Hi there, I wondering how, with the following models, I would be able
to edit Car_Part on the admin page of Car. I want to be able to add
many parts to a car, and specify the amount of each part.
class Car(models.Model):
name = models.Textfield()
class Part(models.Model):
number = model
My site (SeaAboveSkyBelow.org) is running smoothly on Dreamhost.
- Original Message -
From: "panta" <[EMAIL PROTECTED]>
To: "Django users"
Sent: Wednesday, May 10, 2006 11:31 PM
Subject: Which is better: dreamhost or bluehost?
>
> Hi all,
> I'm going to setup a (small) site using djan
I'm not sure if you can specify a default to use with the built-in Admin views.
However, if you are developing your own views you can set the default
data to pass to the FormWrapper with something like this (I'm using
this code and it works):
def mycustomview(request):
manipulator = MyModel.
On May 10, 2006, at 1:46 PM, Juancho wrote:
>
> Hello,
>
> I am trying to get a SelectField to render with a default value, i.e.,
> a pre-selected choice.
>
> With the current SelectField implementation, this is not possible. I
> see this issue has been addressed before but was closed as "wontf
Malcolm and Adrian,
Thanks so much for your quick replies! I thought of that, but I
didn't know if it was the Djangoic way of doing it.
Follow up question -- are _all_ the files in the sql/ directory
executed, or just those that have the same names as the models?
mikah
--
--~--~-
Thanks everyone for the replies ... in short, I was retarded.
yeah, i just needed to do
new_data['my_select_field'] = '3'
before rendering and then i could select the request i want
programatically. Thanks so much for the helpful responses :)
j
--~--~-~--~~~---~-
Hi Mikah,
On Wed, 2006-05-10 at 23:29 -0700, mazurin wrote:
> Malcolm and Adrian,
>
> Thanks so much for your quick replies! I thought of that, but I
> didn't know if it was the Djangoic way of doing it.
You're welcome. :-)
> Follow up question -- are _all_ the files in the sql/ directory
60 matches
Mail list logo