I realise this is likely something trivial I am missing, and I'm aware
of http://code.djangoproject.com/wiki/NewbieMistakes...
However, I have a form that's set up like this:
From: Calendar.setup({ inputField : "date_from", button :
"date_from_cal" }); To: Calendar.setup({ inputField : "date_to"
Turns out it was the "disabled" directive in the form. Weird, as I'm
pretty sure it works on other forms in other applications, but when I
remove it, it works great.
On May 3, 11:36 am, tomass <[EMAIL PROTECTED]> wrote:
> I realise this is likely something trivial I a
Hi Folks,
I'm interested in serving SOAP requests through Django. I've taken a
look at the pages below, but I'm not sure what the current state of
development is, as I couldn't get the example in 552 working.
http://code.djangoproject.com/ticket/552
http://code.djangoproject.com/ticket/115
I ha
Hi Jure,
Thanks for the response. I've made the changes you suggest, but just
have a few questions:
- The urls.py file: the soapview.soap - does this refer to a file
called "soapview.py" and then the "soap" portion refers to whatever the
name you assign the SimpleSOAPView() function to?
- How d
Hi Folks,
I'd like to be able to log users in based on accounts in Django and
then redirect them to a specific page after they've logged in. I'd also
like to be able to do a similar thing for logouts. Can anyone help me
out with this... Couldn't quite make sense of it from the
documentation, beca
Sorry, too quick off the mark there. Seems exactly what I need can be
found here (basically just set up my own login/logout mechanism):
http://www.djangoproject.com/documentation/authentication/#authentication-in-web-requests
Thanks, Tom
--~--~-~--~~~---~--~~
Y
Hi Folks,
So I have a question about how best to implement a permission structure
for an app I'm writing.
The app is a way of automating running commands on different servers.
So my command model looks like this:
class Command(models.Model):
command_type = models.ForeignKey(CommandType)
You may need to define the return value with the following:
def __repr__(self):
return "%s" % ('Whatever value you want to return, such as
self.name')
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django use
No, never have
--~--~-~--~~~---~--~~
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 [EMAIL PROTEC
So I decided the easiest way to do this was to add this to the top of
my model:
from django.contrib.auth.models import Group
and then adding this to my class:
group_perm = models.ManyToManyField(Group)
Thanks, Tom
--~--~-~--~~~---~--~~
You received this messag
Hi Folks,
The subject says it, really. Is there any way to access the
request.user in the urls.py. Basically I want to pass the current
user's id as an option to a generic view. I have a field in my model
which is a ForeignKey on User, so each instance of the model is
associated with a specific u
Great, thanks.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
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
In the Flatpages list in the admin interface by default I see "FlatPage
object" instead of, for instance, the title or URL field.
Ditto with Sites.
Is this supposed to be this way? I realize I could create a wrapper
around the object and use a def __repr__(self) to take care of this,
but just wo
Great, glad to help out!!
--~--~-~--~~~---~--~~
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 [EMAIL
Installed from subversion. Ran "django-admin.py startproject
greenleaftech; cd greenleaftech; python manage.py runserver" and I get
the following. Can anyone help out?
Thanks, Tom
python manage.py runserver
Validating models...
admin.logentry: 'user' has relation with uninstalled model User
adm
Okay, so I try python manage.py syncdb and I get:
Error: None couldn't be installed, because there were errors in your
model:
admin.logentry: 'user' has relation with uninstalled model User
admin.logentry: 'content_type' has relation with uninstalled model
ContentType
Here is the contents of my
As you can see from my installed apps above, I don't have
django.contrib.admin in there yet, and so the first item is satisfied.
Also, I don't have django.contrib.flatpages or
django.contrib.redirects.
And in any case, I am using django-admin.py to generate all of this -
I'm not modifying anythin
Found it. I had an old install that was overriding the settings. Not
exactly sure how as it wasn't in the sys.path, but in any case I've
moved the old directory and now it's all good.
Thanks, Tom
--~--~-~--~~~---~--~~
You received this message because you are sub
Hi Folks,
I'm sure there's a better solution for this, just not sure what it
is...
I have a 4 step form and I'm currently capturing all posted data
between each step and then re-posting it through hidden input fields
and recapturing it at each successive step. URL redirects won't quite
work for
Hi Folks,
I'm wondering if there's a way to include dynamic (context) data in an
{% extends %} statement.
I don't seem to be able to do {% extends "base_{{ reseller }}_.html" %}
for instance.
Thanks, Tom
--~--~-~--~~~---~--~~
You received this message because y
Great, this seems to work a treat!
Thanks, Tom
--~--~-~--~~~---~--~~
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
Hi Folks,
Wondering if there's a way to specify how many rows and columns the
generic update page uses for a textarea?
It seems to default to 10 and 40, and I'd like to make this much
larger.
Thanks, Tom
--~--~-~--~~~---~--~~
You received this message because y
This is for a generic view. I may have missed this in the doc, but how
do I specify my html?
I'm currently doing:
EmailBody: {{ form.emailbody }}
{% if form.emailbody.errors %}*** {{ form.emailbody.errors|join:",
" }}{% endif %}
And this is what punches out the:
How can I control what co
But how do I show the value of the field in the textarea:
is there such as thing as {{ form.emailbody.value }} or something? This
is for an update form, so I need to display the current value
Thanks, Tom
--~--~-~--~~~---~--~~
You received this message because yo
Thanks!
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For mo
Hi Folks,
I'm using PostgreSQL for my local database, but my application connects
to a number of other databases to do some queries. I have written a DB
abstraction module which I use to connect to PostgreSQL, MySQL and
Oracle, which has worked fine for me in all situations (Django and
otherwise)
I'll give that a try. Any ideas why it would work from the python
interpreter and not from Django?
I'll update on whether the suggested MySQL-python-1.2.1 fixes it.
Thanks for the response.
Tom
--~--~-~--~~~---~--~~
You received this message because you are sub
Works a treat. Compiled from source...
Thanks, Tom
--~--~-~--~~~---~--~~
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 g
Hi Folks,
I just deleted a Group, and now whenever I try to edit a user within
the admin interface I get the following error message:
AttributeError at /opscenter/admin/auth/user/3/
'bool' object has no attribute 'get'
Request Method: GET
Request URL:
http://cscenter.uk.scansafe.
I should mention that I got this error when running syncdb:
Error: None couldn't be installed, because there were errors in your
model:
provisioning.email: At least one field in Email should have core=True,
because it's being edited inline by user.User.
Here's the appropriate models.py:
from dj
Another approach might be to simply run this as an independent process
(from cron, or whatever) and use django's ORM from within that script
to update the database which can then be viewed in your web app.
I've done this quite successfully with some of my apps.
--~--~-~--~~-
Hi Folks,
Can anyone help out with a broken part of the admin interface? I get
this message if I try to edit a user:
AttributeError at /admin/auth/user/1/
'bool' object has no attribute 'get'
Request Method: GET
Request URL:http://example.com/admin/auth/user/1/
Exception Type:
It seems to be related to this in my models:
from django.contrib.auth.models import User
class Email(models.Model):
owner = models.ForeignKey(User)
...
...
If I comment out this line, I'm good. What's am I doing wrong here?
--~--~-~--~~~---~--~~
You recei
I've changed it to email_owner, and I still get the same message...
Incidentally, I don't have a model named owner, but changed it in case
it was a reserverd word...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"
Don't see why you can't do just that. Is it not working for you, or are
you just wondering if it's possible? I use the db_api outside of Django
web apps with no problems...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Gr
I changed the model name from Email to ProvEmail and that fixed it.
Seems like this may be a bug related to the one you were mentioning.
Thanks, Tom
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" gr
Hi Folks,
I've just tried to add a time field to one of my models, and then I
ran:
ALTER TABLE blah ADD COLUMN blah_blah TIME;
UPDATE blah SET blah_blah='09:00:00'
I restarted apache, and I can see my current entries are showing 9am
correctly in the new "blah_blah" field, but when I try to add
Turns out it's because I had "default='09:00' in my model. I guess it
needs a time entry, not a string entry.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email t
Hi Folks,
I'm wondering which rich text editors people are using in their apps,
and if any of them (that have been successfully integrated into the
admin app) have the capability to display code snippets.
Basically, what I'm looking for is a code block to render in fixed
width font and with all
Thanks. Added in the extra Tiny MCE options (like the full screen one),
and it works pretty well just using the tags.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, sen
Hi Folks,
I know this topic has been brought up a few times, but I have a
slightly different issue here (I think).
I have a backend process that runs a number of commands. It connects to
the database (via the ORM) to check it's queue and then executes jobs.
All fine and dandy.
My problem is tha
Thanks, that's very helpful, and sounds very likely to be the problem.
I'll give it a try and see what I can come up with...
May take a little while but I'll post back once I have a resolution one
way or the others.
Cheers, Tom
--~--~-~--~~~---~--~~
You received
Well, limited success. I was able to get the code working through
closing the django db connection just after I'd forked my processes,
but it seems that what I thought I was doing wasn't really what I
thought I was doing.
Essentially I wanted to be able to run multiple tasks simultaneously. I
tho
Hi Folks,
Getting this strange error message on my admin login.
File
"/usr/lib/python2.4/site-packages/django/core/template/defaulttags.py",
line 627, in do_load
raise TemplateSyntaxError, "'%s' is not a valid tag library" %
taglib
TemplateSyntaxError: 'auth.log' is not a valid tag librar
Works a treat, thanks!
Wonder if you've had a chance to take a look at this:
http://code.djangoproject.com/ticket/480#preview
Still seems to be bothering me...
Thanks, Tom
I'm getting the following error when I try to upload a photo:
File "/usr/lib/python2.3/site-packages/django/core/meta/fields.py",
line 327, in get_db_prep_save
value = value.strftime('%Y-%m-%d')
AttributeError: 'str' object has no attribute 'strftime'
Here's my model:
from django.core impo
Hi Folks,
I have /usr/local/lib/python2.4/site-packages in my sys.path. I've
added a symlink from my project directory
(/home/mthaddon/jmon_code/jobmonitor) to
/usr/local/lib/python2.4/site-packages/jobmonitor and in this folder I
have the settings.py, manage.py and urls.py as well as my app dire
Thanks, that seemed to do it.
--~--~-~--~~~---~--~~
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 [E
Hi Folks,
I think there are two ways of doing what I want to do. Essentially what
I want to do is be able to have read-only tables in the admin interface
(these tables get populated from an external app), but I'd like the
flexibility to be able to view the data in them from within the admin
appli
Hi Folks,
I have an application that I'd written in an older version of Django
that I'm upgrading to 0.91 and for some reason I'm having problems with
the views.
Here's an excerpt from my urls.py
(r'^admin/', include('django.contrib.admin.urls.admin')),
(r'^jobmonitor/$', include('greenleaftech
Thanks! Bit of a duffer with that one...
--~--~-~--~~~---~--~~
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 Folks,
I've copied the admin css to be used for my views, but I've added in
this custom section which is a modified version of the FILTER COLUMN
from changelist.css:
/* FILTER COLUMN (CUSTOM VERSION) */
#changelist-filter-custom {position:absolute; top:0; right:0;
width:180px; border-left:
Great, works a treat!
Thanks so much
Tom
--~--~-~--~~~---~--~~
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 Folks,
I'm having some issues with {% ifequal %}. What I'm trying to do is
have a drop down list remember the values that are sent on a get
request that is sent to the same page. I pass the value of the variable
(show_only in this case) back to the template, and then I have this
statement in t
Great, thanks! I thought it might be something like this. Should have
dug a little deeper...
--~--~-~--~~~---~--~~
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@go
Hi Folks,
I'm trying to fork a new process using os.fork(), and everything seems
to be working well, except that I need to then reference django models
from the forked process. This seems to mean I need to reimport all the
relevant modules into the function that's running as a forked process,
and
Well, basically I have processes that could take minutes to execute,
and I'd like to background them, serve up a page showing the status,
and then allow users to view the output once they've completed.
Thanks, Tom
--~--~-~--~~~---~--~~
You received this message b
Hi Folks,
I'm trying out the magic-removal branch, and am trying to just create
my database from scratch. When typing "python manage.py syncdb" I get:
Traceback (most recent call last):
File "../../django/magic-removal/django/bin/django-admin.py", line 5,
in ?
management.execute_from_comma
Sure, here it is:
from django.db import models
import datetime
SERVER_STATUS_CHOICES = (
('A', 'Active'),
('I', 'Inactive'),
)
COUNTRY_CHOICES = (
('UK', 'United Kingdom'),
('US', 'United States'),
)
class Country(models.Model):
country_name = models.CharField(maxlength=2)
You know, I actually tried JobControl, and it looked like it was going
to do exactly what I was after, but it seemed to be created extra
processes that weren't being terminated correctly (for each "job" I
kicked off, there were 2 extra apache processes). In the end I went
with the idea of an indep
Hi Malcolm,
Thanks! I'm not getting that error any more, but am getting this:
Error: None couldn't be installed, because there were errors in your
model:
admin.logentry: 'user' has relation with uninstalled model User
admin.logentry: 'content_type' has relation with uninstalled model
ContentType
Thanks! Tom
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
Fo
Hi Folks,
Just wondering how I configure an apache virtual host to use a
different version of Django. I've installed the magic-removal branch
and have added the following to my virtual host config file, but I'm
still getting an error message which indicates that it's using the 0.91
version of Dja
Hi Folks,
Just having a few problems getting custom template tags working in MR.
I think I'm supposed to create a directory called templatetags in the
directory that holds my models.py, then drop an __init__.py file into
there and the file I want to import (in my case automator.py).
However, I
Hi Adrian,
I get no output/error messages when I try python automator.py.
Here's the contents of the file:
from django import template
register = template.Library()
@register.filter
def bash_special(value):
value = value.replace('[00;34m', '')
66 matches
Mail list logo