> So If I create a newforms field then how do I tell the admin to use
> that when building the form in the admin?
If you need this in admin then possibly you have to define your own
newforms field
with validation. It may be called: myfields.MyField
Then you define descednant of CharField from djan
Thanks James,
I did not find the documentation you're referring to, and by posting
here (twice) I was hoping to find a built-in option. But since there
doesn't exist one, I tried your suggestion and it was indeed pretty
easy to implement.
For those who are interested, here's my solution. Create
you could use the filebrowser:
http://code.google.com/p/django-filebrowser/
patrick
On Feb 8, 8:24 am, josh <[EMAIL PROTECTED]> wrote:
> I have this question as well but from what I've seen the only
> customizing available is to use strftime formatting.
> josh
>
> On Feb 6, 2008, at 11:16 AM, sh
> With this the uploaded files will go to <>/files/,
> howeverI want to upload all files to a subdirectory with the name of
> the project, how can I do that?
Same question was asked yesterday:
http://groups.google.com/group/django-users/browse_thread/thread/7e193c1532920a6f#
--
Maciej Wisniowski
On 6 Feb 2008, at 4:23 pm, [EMAIL PROTECTED] wrote:
>
> Hi guys,
>
> Trying to figure out how to use the forloop.counter in a template but
> to add it to a field to increment the name of the field each time. for
> example.. in my template i will have this
>
> {% for div in divs %}
> {{ form.name
On Feb 8, 8:43 am, Richard Jones <[EMAIL PROTECTED]> wrote:
> I have noticed that apache's error log has tons of these entries at
> random (avg. 5 minutes) intervals:
>
> [Thu Feb 07 14:08:11 2008] [notice]mod_python: (Re)importing module
> 'django.cor
> e.handlers.modpython'
>
> The dates of thes
Hi
You have to add ADMIN_MEDIA_PREFIX to your settings.py file, e.g.:
ADMIN_MEDIA_PREFIX = '/media/admin'
Regrads,
Marcin
On Feb 7, 6:35 pm, mangamonk <[EMAIL PROTECTED]> wrote:
> I'm trying to make a change to my templates here..
>
> /django_trunk/mysite/templates/admin/base_site.html
>
> But
Hi,
What is 'divs' in your example?
And what do you want to do it?
If you want to display a list "name1", "name2", "name3" you can do it
in this way:
view.py
divs = ('name1', 'name2', 'name3')
template.html
{% for div in divs %}
{{ div }}
{% endfor %}
Regards,
Marcin
On Feb 6, 5:23 pm, [
Hi,
You have to add path to directory where you have template files.
settings.py file TEMPLATE_DIR parameter.
Regards,
Marcin
On Feb 7, 4:16 pm, Schmoopie <[EMAIL PROTECTED]> wrote:
> I'm slaying the configuration bugs, slowly but surely, with your help.
>
> The latest one is a TemplateDoesNot
Hallo,
I have a model in which have use of ForeignKey to relate them.
class Dataset(models.Model):
contactID = models.ForeignKey(Contactinfo, db_column="contactID")
class Admin:
list_display = ('datasetName', 'datasetVersion',
I use the "Admin" class to administrate t
Hello,
I'm trying to make an application which deals with timezones thanks to
pytz[1] and I can't figure out how to use hourly timezones instead of
minutes based ones. For instance:
>>> paris = pytz.timezone('Europe/Paris')
>>> mydate = datetime(*time.strptime('2008-02-12', '%Y-%m-%d')[:
after digging around in the code, i found "SubfieldBase" at
django.db.models.fields.subclassing
the docs there say this:
"Add SubfieldBase as the __metaclass__ for your Field subclass,
implement
to_python() and the other necessary methods and everything will work
seamlessly."
so i created my ow
This code -
http://www.aspandjavascript.co.uk/javascript/javascript_api/get_element_width_height.asp
- offers better cross-browser support.
However it may be better to get the image size server-side. Django
offers builtin methods on image fields to obtain the image width and
height; alternativel
On 2/8/08, coldpizza <[EMAIL PROTECTED]> wrote:
> Given that I have a Book model with a ManyToManyField called authors
> how do I get all the books for a particular author? Each book may have
> more than one author, so I cannot filter the books using the standard
> methods.
You'll want to more cl
On Feb 8, 2008 9:15 AM, MADDY <[EMAIL PROTECTED]> wrote:
> User can select, for example, 3 options (not need to be consecutive)
> from 10 possible options using CTRL+mouse.
>
> When form is submited in database I found only one of those 3 options,
> the one at the bottom of 3 selected.
You want t
Great idea! I'm a big fan of the darker color scheme. All you need now
is sweet logo and you're set!
I second the poster asking for hosting details. I'm also looking at
slicehost for a Django app I have in the works and any first-hand
wisdom you could impart would be more than appreciated.
Nice
This is probably very trivial question, though i can't figure it out.
I haven't found anything usefull in documentation, so i'll try my luck
here.
My model Article has a ManyToMany field called Video, which points to
a model Video. To make it simple, Article has many Videos.
class Article(models
On 2/8/08, coldpizza <[EMAIL PROTECTED]> wrote:
> And other related question: where it would be more logically correct
> to put this code? In URLConf as an parameter for the view, in a view
> of its own, or in a method bound to the Book model?
I wouldn't put it in a URLconf. URLconfs are supposed
This might help:
http://www.djangosnippets.org/snippets/306/
On Feb 8, 9:59 am, Gollum <[EMAIL PROTECTED]> wrote:
> Thanks a lot!
> I know how to add tags, so I guess I'll start working on my own debug
> tools lib, but its still feels rather strange that I ought to do it.
--~--~-~--~
Tim,
The django module just needs to be on the python path, which you can
set in the mod_python configuration.
So you could do something like:
/My Site
/myproject
/site-packages
/django
Shouldn't be to difficult as long as you put both /My Site/myproject
Hello everyone. I'm sure this question has been asked a million times,
but I'm going to ask it again, because I'm starting to get *really*
frustrated with trying to get Django up and running.
I would like to use the built-in development server, as getting
mod_python and Apache configured is simpl
Thanks a lot!
I know how to add tags, so I guess I'll start working on my own debug
tools lib, but its still feels rather strange that I ought to do it.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" g
Thanks a lot! Before posting I have spent over an hour reading and
rereading that particular page in the doc section and in the
Djangobook but still somehow the concept eluded me. I do admit though
that I do not have previous experience solving this sort of issues in
other languages. Maybe adding
Sorry if this is too trivial but I have looked through the docs and
could not find a clear answer.
Given that I have a Book model with a ManyToManyField called authors
how do I get all the books for a particular author? Each book may have
more than one author, so I cannot filter the books using t
Hi,
I'd like to host several django applications at http://foo.bar.com/x,
http://foo.bar.com/y, etc. Currently I'm managing them all in the same vhost,
using Apache locations to direct each URL to a different Django project.
However, this technique requires me to rewrite my urls.py to accept ^x
My problem is that I'm running my app like this: http://localhost:8000/mysite
and I'm getting an error that the 8000 port is not available.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post
darien08 wrote:
My problem is that I'm running my app like this: http://localhost:8000/mysite
and I'm getting an error that the 8000 port is not available.
Your question isn't clear. Are you using apache on port 8000? are you
using the development server? what is it that gives you the error
mes
On Feb 8, 2008 1:50 PM, Narso <[EMAIL PROTECTED]> wrote:
> Normally this error is not fire, the form's action attribute get
> blank. But, when I set the TEMPLATE_STRING_IF_INVALID variable in the
> settings file to:
>TEMPLATE_STRING_IF_INVALID = 'Variable "%s" out of context'
> then the add_fo
Hi. I just (for development server) use the command lines option:
python manage.py runserver --adminmedia=/home/user ... /mysite/public
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post t
I'll just be glad to actually see my friggin' pages render, much less
actually getting it to a production environment. There's certainly not
the "instant gratification" with Django that comes with Rails, but I'm
all about using the right technology to fit the client's needs.
The main reasons I'm
This definitely makes sense, I have made a view called
`books_by_author` - this made it easy for me to fit the logic into my
feeble mind, and moreover it looks good in the URLconfs. Thanks a lot
for suggestions!
On Feb 8, 7:57 pm, "Jacob Kaplan-Moss" <[EMAIL PROTECTED]>
wrote:
> On 2/8/08, coldpi
Hi there!
I've tried to use regroup, without any result. I've read the entire
documentation, and searched google for hours, but i can't find a
solution - to me it looks correct.
I've pasted the code here:
http://paste.ubuntu-nl.org/55244/
Included is models.py and the template file
the view is
I'm following the official Django tutorial for ver 0.96. I got to the
part where the admin pages are generated and noticed that none of the
javascript helpers mentioned in the tutorial get displayed on my pages
(the date - time control, or the show link for collapsible fields,
etc.).
I use 0.96.1
Hi whiteinge,
OK. I was using firefox and that did not work. But with IE
it works well.
Thanks,
sanrio
On Feb 7, 9:08 pm, Nathaniel Whiteinge <[EMAIL PROTECTED]> wrote:
> On Feb 7, 3:06 pm, [EMAIL PROTECTED] wrote:
>
> > Can you please give an example of what the list_filter be
> > in the model
Glad to hear my information was useful. Now all I have to do is finish
figuring out how to use WAF to deploy my Django project and I'm all
set :-{}
On Fri, 2008-02-08 at 11:51 -0800, Brandon Taylor wrote:
> FINALLY, it works.
>
> I guess the entire problem was that I had specified the website
>
http://www.free21.info
A new Proxy site - Using it you can easily bypass internet block at
school, office and unblock Myspace site everyday.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To pos
I'm using Django trunk r7047. This is my code
prj/validators.py
===
from django.core.validators import ValidationError
class StringLengthIs(object):
def __init__(self, length, error_message=''):
self.length = length
if not error_message:
self.error_message
Hi. Forgive my poor English
I think there is an error in the "admin/auth/user/add_form.html"
template, because it uses a form_url variable that does not exist. The
user_add_stage doesn't pass it.
Normally this error is not fire, the form's action attribute get
blank. But, when I set the TEMPLATE
Hi Martin,
> Then i'm trying to display only the first video in base.html (the main
> html template) and all videos in article_detail.html. I can't figure
> out how to display only the first video.. in detail, for loop works
> ok.
>
> This is the code i'm using in base.html (i use templatetag for
Thank for your reaction! Do you mean that I have to do the next
statement:
contactID = models.ForeignKey(Contactinfo, db_column="contactID",
required=True)
I have done it but I get an error:
__init__() got an unexpected keyword argument 'required'
cheers,
Nader
On Feb 8, 3:21 pm, Daniel
On Feb 8, 11:08 am, Nader <[EMAIL PROTECTED]> wrote:
> Hallo,
>
> I have a model in which have use of ForeignKey to relate them.
>
> class Dataset(models.Model):
>
> contactID = models.ForeignKey(Contactinfo, db_column="contactID")
>
> class Admin:
> list_display = ('data
Hi,
That doesn't seem to want to work for me. Since I've been able to get
mod_python to run my pages, I'm halfway there. Now I just can't get
images to show up in my pages.
My website directory structure is:
/website1
/public
/images
/__init__.py, urls.py, views.py, etc
If I'm spe
> So If I create a newforms field then how do I tell the admin to use
> that when building the form in the admin?
You will need to use the newforms-admin branch to get the admin to use
a newforms field ;)
Btw: If you just want the regex functionality you can use the
RegexField of newforms like s
Folks,
Has anyone got any documentation on deploying the django framework as part of
the site? I'm considering using django for an app at work (on Oracle - so
need SVN version?) and our release team will want a self contained site to
deploy. They're used to WAR files and like them. It'll be
Hi, all!
Is there any way to dump the whole object to html, for usual debugging
purposes. All I want is to see some objects whole structure, all field
values, child sets, etc. that are available for template.
I'm kind of new to python and django, but I have some cakePHP
experience and debug() func
I am using the google tagging application in the developing multi-user
blogging system.
I can get the tag list using "Tag.objects.usage_for_model(Widget,
filters=dict(size__gt=99, user__username='Alan'))"
But I don't know how I can get the tagged item list.
I try to find filter function among th
Hi, this reminds me of an issue I had a while ago:
http://groups.google.com/group/django-users/browse_thread/thread/a4679cb9a42c6ba1/1e76718aa0097628?lnk=gst&q=julien+q#1e76718aa0097628
I haven't checked lately but there might still be a bug.
Julien
On Feb 9, 8:08 am, Oliver Beattie <[EMAIL PROT
If you haven't already, you need to start the development server
./manage.py runserver 0.0.0.0:8000
To get it to work with apache you have to set up a few more things,
and then it wouldn't be on port 8000.
Docs on getting it running on apache
http://www.djangoproject.com/documentation/modpytho
I am building web application using Django+postgresql
Have an INSERT page with text fields, text boxes, dropdown menus and
LIST/MENU form elements.
Let's say, have 10 options in "select", and need to select some of
them, as user wants.
User can select, for example, 3 options (not need to be c
Does offsetWidth return what you want? this should represent the total
"space" the element takes up (width, borders, padding etc)
document.getElementById("myimage").offsetWidth
(http://developer.mozilla.org/en/docs/DOM:element.offsetWidth)
On Feb 8, 11:57 am, "Lic. José M. Rodriguez Bacallao"
thanks ..no change though
I'm running:
ubuntu 7.10
python 2.5.1
django version 0, 97
On Feb 8, 10:17 am, Marcin Mierzejewski
<[EMAIL PROTECTED]> wrote:
> Hi
>
> You have to add ADMIN_MEDIA_PREFIX to your settings.py file, e.g.:
> ADMIN_MEDIA_PREFIX = '/media/admin'
>
> Regrads,
> Marcin
>
> On
Hi I'm working on extending a forum app to allow for email
subscriptions.
http://code.google.com/p/django-forum/issues/list
I'm running into one fairly simple issue and thought someone might be
able to enlighten me.
Here's part of my model: http://dpaste.com/34401/
And here's the template logic
On Fri, Feb 8, 2008 at 6:46 AM, Gollum <[EMAIL PROTECTED]> wrote:
> Is there any way to dump the whole object to html, for usual debugging
> purposes. All I want is to see some objects whole structure, all field
> values, child sets, etc. that are available for template.
> I'm kind of new to p
Sorry, brain explosion.
It should be:
contactID = models.ForeignKey(Contactinfo, db_column="contactID",
blank=True, null=True)
--
DR
On Feb 8, 2:33 pm, Nader <[EMAIL PROTECTED]> wrote:
> Thank for your reaction! Do you mean that I have to do the next
> statement:
>
> contactID = models.ForeignKey
Hi folks, I know this question isn't from this group but I'll ask
anyway. I need to resize an image (thumbnail) based in the browser
width and height. I want to make my site browser resolution
independent. The only thing I can't get working is this. For example,
a page showing a news entry, the new
I don't know of anything out-of-the-box in python or in django, but it
should be pretty easy to write your own debug function. Python
supports excellent introspection. A very basic start would be
something like:
def debug(obj):
ret = ""
for attr in dir(obj):
ret += "%s - %s" %
Hitting 'Next' on the first page of All Complaints too me to All
Airports instead of page two.
...Ken
slartiblartfast wrote:
> hey guys - im about to formally launch a new site done with django
> called TSA Complaints (http://www.tsacomplaints.com)
>
> the site is a response to the hundreds of
Just started with Django myself. Went thru 3 different tutorials.
Hopefully, what I'm mentioning below hasn't already been covered.
On Fri, 2008-02-08 at 10:34 -0800, Brandon Taylor wrote:
> So, chin up, moving on. Here is my website's directory structure:
>
> /mysite
> /public
> /images
I believe I'm having issues with django connections. I'm using EC2
with a remote mysql database and make about 6 queries per page. There
is some latency due to the distance of the remote server. Each query
takes about .038s to complete.
Pages take about 2 seconds to load however. The person r
FINALLY, it works.
I guess the entire problem was that I had specified the website
directory itself instead of the PARENT of the website directory in the
PythonPath. Now I just need to tell Apache to not process anything
else with mod_python and I should be good to go.
Thanks Adam,
b
On Feb 8,
Hi People,
I'm trying to write a query using Q objects but I'm getting incredibly
frustrated with them. I'm afraid I don't know SQL so I wouldn't know
how to write the queries by hand! The query (using Q objects) I am
trying to construct is:-
media = media.filter(
Q(owner=requester) |
Q(
Hey Charles,
I believe you will find that answer specifically here:
http://www.djangobook.com/en/1.0/chapter20/
"If you need to put two Django installations within the
same VirtualHost,
you’ll need to take a special precaution to ensure mod_python’s code
cache
doesn’t mess things up. Use the
Are there many/any coders available for hire with extensive GeoDjango
experience? I have a rather large project in mind that for which it
looks to be a rather perfect.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"
On Feb 8, 10:07 pm, Graham Dumpleton <[EMAIL PROTECTED]>
wrote:
> On Feb 8, 8:43 am, Richard Jones <[EMAIL PROTECTED]> wrote:
> > I have noticed that apache's error log has tons of these entries at
> > random (avg. 5 minutes) intervals:
>
> > [Thu Feb 07 14:08:11 2008] [notice]mod_python: (Re)impo
howdy,
i have osx 10.4.10, and see that i do have python. but "import
django" failed!
i'm slightly unsure how i proceed from here, although I have spent
some
hours reading various things about installation. Should I install
apache?
I'm planning to build a simple web-db app.
Many thanks...
-
I started working to install apache on OSX, so I can use django, and I
realized I'm in over my head. I don't want to make stupid errors in
file sharing
and firewall settings, leaving my computer open to attack.
Is it safe to do this?
Is there anyone out there who would be willing to help me go t
Hi,
If you're not planning on setting up productioin environment,
but just for testing/developing, you don't have to use apache.
Django development server is good enough your porpose.
If you want to learn how to set up secure apache,
you might want to check http://httpd.apache.org/userslist.html
Hi again,
OS X has pre-installed apache and Python, but you still have to
install Django yourself.
Get the latest version from http://www.djangoproject.com/download/
and try installing.
Thanks
On Feb 9, 2008 3:21 PM, newbiedoobiedoo <[EMAIL PROTECTED]> wrote:
>
> howdy,
>
> i have osx 10.4.10,
68 matches
Mail list logo