ded support for anonymous sessions" section on this page:
http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges
Adrian
On 8/22/05, Maniac <[EMAIL PROTECTED]> wrote:
> May be it worth documenting somewhere?
See http://www.djangoproject.com/documentation/django_admin/#init .
Adrian
dlers.modpython
> PythonDebug On
>
Check out "Multiple Django installations on the same Apache" in the
Django mod_python documentation. You need "PythonInterpreter".
http://www.djangoproject.com/documentation/modpython/
Adrian
e the value in having the development server be able to serve
media. My concern is the same as Jacob's concern -- I wouldn't want
people to use it in a production setting.
Sam, or anybody else: How do you envision this working?
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
On 8/23/05, Krzysztof Drozd <[EMAIL PROTECTED]> wrote:
> wow: http://tinymce.moxiecode.com/index.php
Yeah, some folks have integrated Django with JavaScript WYSIWYG
libraries. Check it out:
TinyMCE: http://www.socialistsoftware.com/?p=8
Xinha: http://www.socialistsoftware.com/?p=10
mplex as "First create a
place for your apps. Then create a place for your settings. Then
create an app..." Suggestions welcome!
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
y looking at the default filters
in django/core/defaultfilters.py to get an idea of how they work. If
you end up doing this, let us know, and we'll consider integrating it
into Django -- that'd be a great addition.
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
mmarshall, rmunn, garthk, hugo,
manuzhai and all the other great people who have contributed patches,
ideas and passionate discussion to this change. This is the first
really big community-driven improvement to Django, and it's been
awesome, for me personally, to see it come to fruition. Thanks, guys!
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
column name:
job = meta.ForeignKey(Job, null=True, db_column=jobid)
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
> know javascript well.. So I thought to change __repr__ to return a
> tuple containing self.code and self.price, but some problems arise.
Yeah, I'd change it so that the __repr__() for Component displays the
price. Which problems did you run into?
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
se "choices" when the list of choices never changes
-- for stuff like "gender" or "age range" or "U.S. state". If your
list of related objects will change, use a ForeignKey.
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
calling code never refers to the "user_id" field
-- only to "user".
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
name', 'short_desc', 'long_desc')
> }),
> ('category_n', {
> 'classes': 'collapse',
> 'fields' : ('name', 'short_desc', 'long_desc')
> }),
> ),
No, tha
s/custom_methods/
You can execute custom SQL at any point by doing the following:
>>> from django.core.db import db
>>> cursor = db.cursor()
>>> cursor.execute("SELECT foo FROM bar WHERE id = %s", [3])
>>> row = cursor.fetchone()
>&g
e_constants to make it
available to the Django-created module -- then create a custom method.
We're totally open to making a better way to do this. Any ideas?
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
and I
> want to make sure I am not duplicating any effort.
Hey Ian,
There hasn't been any work done on this yet, but we'd gladly host a
repository of open-source apps on the official Django site -- if not
the code itself, then pointers to the code.
Adrian
--
Adrian Holovat
On 8/29/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Let me know when you get that up and running, I have one to add to it.
Sure. What's the app?
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
This particular feature is undocumented at this point because it's
quite advanced.
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
On 8/30/05, Jeremy Noetzelman <[EMAIL PROTECTED]> wrote:
> Doesn't Django have built in User support? Is there any documentation on
> that anywhere?
I'll answer your questions in order. Yes, and no. :-)
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
django/models/auth.py, django/views/auth/login.py and
django/views/registration/passwords.py.
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
__" variable, assuming "myapp.py" is the
name of your model module. See
http://www.djangoproject.com/documentation/model_api/#using-models for
full documentation (just added a couple of days ago!).
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
g/ .
In your case, you're adding a "bounce" field to the poll model.
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
Hey all,
This London Django meetup got me thinking. Is anybody interested in
having a Washington, D.C., Django meetup? I'll be in town the weeks of
Sept. 5 and Sept. 12 and would love to get together with fellow Django
folks.
Adrian
--
Adrian Holovaty
holovaty.com | djangoprojec
t it doesn't work for?
Hmmm...Could you make a test case for this? We use many-to-many
relationships to core.Site all the time and don't have problems.
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
that uses a relation to something in core
or auth, instead of adding another app?
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
On 9/1/05, Jeremy Dunck <[EMAIL PROTECTED]> wrote:
> This ticket has patches, but they haven't been merged.
>
> Adrian, will this be accepted or reviewed?
>
> http://code.djangoproject.com/ticket/225
Ah, I'd lost track of that one. Yes, that'll definitely b
ta? Or should I just use the existing postgresql utilities?
Yeah, use your database-specific backup utilities. For example, we do
a full pg_dump every day. And it's best to put your Python code in
revision control, of course.
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
ata. This file is raw
SQL. Usually it just turns out to be INSERT statements, but it can be
whatever arbitrary SQL you want.
The SQL is inserted when you do "django-admin.py install". It's also
displayed for "django-admin.py sqlall" and "django-admin.py
sqlin
go/phpdig/search.php>
That's pretty cool. Note that it'd probably be easier to index the
files in "docs/" in the Django distribution than the Web pages. The
Web pages are built directly from the files in "docs/". Just a heads
up...
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
gt; from django.models.auth import users
>>> u = users.create_user('username', '[EMAIL PROTECTED]', 'password')
>>> u.is_staff = True
>>> u.save()
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
which would output the
necessary ALTER TABLE statements, if any.
I've added this to the FAQ:
http://www.djangoproject.com/documentation/faq/#if-i-make-changes-to-a-model-how-do-i-update-the-database
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
Hi all,
I've created a new mailing list, django-updates, that sends out a
message each time a change is made to the Django codebase or ticket
system. It's a read-only mailing list.
Its Google Groups page is here:
http://groups.google.com/group/django-updates
Adrian
--
Adria
hoices']
>
> but a django-admin sql Poll only shows sql statments for Poll model.
> And this even if I save a __ALL__ = [] into __init__.py.
"django-admin.py sql" shows SQL statements for the given model module.
So if your models are split across multiple modules, y
ry making CacheMiddleware the first entry in MIDDLEWARE_CLASSES, and
let us know what happens.
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
the CacheMiddleware entry.
Sweet. Nope, it's not a bug -- CacheMiddleware needs to be the first
entry in MIDDLEWARE_CLASSES, because middleware is applied in order.
I've updated the docs to explain this. Thanks for pointing it out!
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
27;t do any sort of timeout, so I suspect it's an error with
MySQLdb, the Python MySQL bindings. Which version of MySQLdb is
Dreamhost using? To find that out, do this:
"""
import MySQLdb
print MySQLdb.version_info
"""
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
On 9/1/05, Jeremy Dunck <[EMAIL PROTECTED]> wrote:
> Can we get a report which takes wildcards for ticket summary and description?
>
> With a small number of active tickets, it's not such an issue, but
> it's at 160 and climbing slowly.
What do you mean?
n purpose). But there's been a patch submitted
for elegant OR support in the API, and I've been meaning to integrate
that. Check it out here:
http://code.djangoproject.com/ticket/251
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
single time, rather than have
Django create the templates automatically, because the former would
allow people to custom the templates' look and feel. Maybe a
"django-admin.py formtemplate app" command? What do you think?
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
that, so I'll look into fixing this... Thanks for the heads-up.
Generally we put ordering on every model out of habit, so we've never
run into this one.
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
thod which works for ForeignKey, though
> manytomanyfield doesn't like having a string passed to it.
Currently, there's no way to relate an object to itself ManyToMany.
See http://code.djangoproject.com/ticket/75 .
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
lds !!!
I suspect things aren't working because you haven't set the required
"upload_to" attribute on your ImageFields. See the FileField
documentation at http://www.djangoproject.com/documentation/model_api/
.
I've updated the model validator to throw an error if uplo
am complete newbie to both python and django.
Hi Julo,
Make sure you're using the latest version of Django. I suspect you're
using an older version.
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
That's very strange. Which server arrangement are you using? I suspect
it has something to do with the server implementation, because you
said it works properly with the development server.
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
I just added this new document:
The Django template language: For Python programmers
http://www.djangoproject.com/documentation/templates_python/
Comments, fixes, etc. are welcome!
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
On 9/6/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Is there support for running multiple sites under a single database?
Yes. Just use the same DATABASE_NAME setting in multiple Django instances.
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
s should be replaced with. See
http://code.djangoproject.com/ticket/28 .
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
ne. Yes, other Dreamhost folks,
do let us know how the patch works, and we'll integrate it after it's
gotten a fair bit of use.
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
nudge,
> wink, wink, know what I mean? know what I mean? ;-)
Hey Eugene,
Patches speak louder than words! :)
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
me of the class is used in preference to the name
> of the field, which seems more natural.
That's most definitely a bug. I'll fix that as soon as I can. (I'm a
bit disconnected from code at the moment.)
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
, you should be fine. No Joe Celko-level knowledge is
necessary to use Django. :)
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
Anybody out there using Django on Solaris? What Solaris-specific
pitfalls should I watch out for?
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
ave subclasses come out on the load? This is the inheritance (as
> opposed to composition) approach which is not appropriate in this case
> but might be in another one.
I'm not sure exactly what you mean, but have you seen this?
http://www.djangoproject.com/documentation/models/subclassing/
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
ss/" handler to your urlconf...
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
x27;%s__id__exact' % rel_field.name] = self.id
> AttributeError: 'Publication' object has no attribute 'id'
Oooh, great catch. Update your Django code to revision 639 (or higher)
and give it another shot.
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
just haven't had the chance --
so I'm not sure how fcgi compares. Can anybody else chime in?
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
o way to "clear" the value of a file-upload field
via the admin interface. See http://code.djangoproject.com/ticket/22
for the ticket, and we would love you forever if you submitted a
patch. :-)
Actually a patch would be pretty easy -- it's an interface thing,
generally not a Pyt
to meta.FloatField(decimal_places=2,
max_digits=10)?
(And hard-coding max_digits would be bad, of course...)
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
he
> database.
>
> Is it possible to do what I want, move common fields to a super class,
> without generating a table for that super class?
It's not currently possible, but that exact functionality is on the
to-do list: http://code.djangoproject.com/ticket/419 .
Adrian
--
Adrian
elp if you could add some unit tests to
tests/testapp/models/one_to_one.py and post them back to the list.
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
ou could set up an e-mail filter so that it filters on the recipient
"django-users@googlegroups.com".
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
of MySQL and MySQLdb
(the Python bindings) are you using? The unit tests work here, with
MySQL 3.23.58 and MySQLdb 0.9.2.
> Here are my modifications to one-to-one.py:
Thanks for those unit tests! I'm rolling them in now...
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
s, or is your only
problem that the query in db_queries doesn't have quotes around the
date? If the former, please post the full exception.
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
e it. For example:
{% ifequal current_url "/about/" %} class="selected"{% endifequal %}
Alternatively, you could generate the navigation elements in the view,
as a Python data structure, and pass a list of nav elements to the
template.
{% for nav_element in nav_eleme
State model. Should that
"ForeignKey(AssetState)" be "ForeignKey(State)"?
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
manual SQL statements, as you've outlined, is the
best way to do it at this point. It's a tricky problem to solve, but a
couple of people are working on a more automated solution.
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
ate.Context (or a
subclass) to use.
render_to_string() takes the same arguments and does the same thing,
except it returns a string instead of an HttpResponse.
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
d payment' function for each client. What
> do you suggest ?
Hey Marek,
I'd suggest writing a custom admin view for that. It sounds like your needs
Writing a custom admin view is easy, although there aren't docs for it
yet. Just write it like a normal view and put it in you
On 9/23/05, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
> Hey Marek,
>
> I'd suggest writing a custom admin view for that. It sounds like your needs
Whoop, I hit send before I finished writing...
I'd suggest writing a custom admin view for that. It sounds like your
needs
t;object" for all standard templates to
> denote a singular main object? Or "obj" but everywhere consistently.
Yeah, we should change the RSS templates to use "object." The RSS
framework is going to be overhauled anyway, to make it even easier, so
I'll make the cha
Hey Matt,
You're right -- it's a common problem, and there's a solution for it.
See the "order_with_respect_to" model parameter.
http://www.djangoproject.com/documentation/model_api/
We ought to have a model example page for that...I'll try to get that together.
Adria
esNotExist: name=_order
I suspect you created the DB tables before adding the
order_with_respect_to, right? If so, you'll need to recreate them or
add an "order" field to the toppings table. Check the output of
"django-admin.py sql [app]" to see the exact synt
ango-admin.py validate" is the command. The validator also gets
called automatically when you run the development server, and each
time you change your code while the dev server is running.
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
All,
I've added a "Developers for hire" page on the wiki.
http://code.djangoproject.com/wiki/DevelopersForHire
Please add yourself to the list if you're interested in making your
Django programming services available to potential employers (for both
contract work and perm
#x27;s no ODBC support in Django, but we'd love to add it.
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
so the patch won't work as
is, but it will probably help you.
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
On 9/28/05, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote:
> it only happens where there is an imagefield and an auto_now_add
Can you paste an example model?
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
right -- there's no way to specify which of the foreign-key
fields are edited inline. What's the use case for that, though? What
values would Django use for the fields that aren't editable?
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
ater. What you need to do is this:
django-admin.py sqlinitialdata polls
...and manually execute the "INSERT INTO auth_permissions..." lines in
your database.
Now that you bring this up, it's rather inconvenient to have to do
this. Any ideas on how this could be improved?
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
ally keep an eye on the output of the "free" and "top" commands
to see how much memory is available.
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
roller
> one without resorting to tables ;-)
Whoa, that's very cool, Robert! Any chance you could make a patch to
the current admin code, so we can make the change right away, or does
it depend on your other changes?
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
is is entirely possible -- it's how Django is used at World
Online. You'll just need to create a separate settings file for each
domain, and just point each VirtualHost in your Apache configuration
at the appropriate settings file.
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
s on
the other World Online sites are indeed using Django:
http://www.lawrence.com/forums/ and http://www2.lawrence.com/forums/
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
the-same-apache
Note that you only have to do this if you have two installations on
the same *VirtualHost*. If you're using multiple VirtualHosts, you
don't need to mess with PythonInterpreter.
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
On 9/29/05, Jeremy Dunck <[EMAIL PROTECTED]> wrote:
> For clarity, which is the board that nearly brings you down?
The one on KUsports.com, which is powered by UBB (PHP).
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
believe this issue has already been reported as ticket 452:
http://code.djangoproject.com/ticket/452
I hope to have a fix for it soon...
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
me find the
> reason of HTTP 500 - Internal server error ?
Take a look at your Apache error log. The full Python traceback will
be in there.
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
nt-Disposition'] = 'attachment; filename=foo.pdf'
p = canvas.Canvas(response)
p.drawString(100, 100, "Hello world")
p.showPage()
p.save()
return response
I'll have this documented on djangoproject.com by the end of the day.
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
On 9/30/05, David S. <[EMAIL PROTECTED]> wrote:
> I am wondering how best to serve PDF files in Django.
>
> I am using ReportLab to generate a file.
Hi David,
I've just added this documentation:
http://www.djangoproject.com/documentation/outputting_pdfs/
Adrian
rate raw_pk_admin option, we should just fix
raw_id_admin to support non-integer keys.
I've filed a ticket at http://code.djangoproject.com/ticket/586 .
Thanks for the heads-up!
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
d be nice to do
it automatically (via Ajax) right after the field is populated on the
add page (or changed on the change page).
Sounds like a fun evening project for me...
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
anonymous users
else:
# Do something for logged-in users
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
com/documentation/db_api/#get-foo-url
Right now, there's no other way to get to MEDIA_URL, because it's
intended to be used only by the FileFields. Out of curiosity, what's
your use case for using it otherwise?
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
mary key?
I've fixed this bug in revision 785. Thanks again for the report!
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
On 10/6/05, Emanuele <[EMAIL PROTECTED]> wrote:
> I'm sorry but after updating (revision 786) this simple example
> still has the problem I reported:
Hey Emanuele,
Update your Django code to revision 790, and give it another shot!
Adrian
--
Adrian Holovaty
holovaty.com |
te that at the moment. Is this a feature
other people would find useful, too?
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
On 10/6/05, Emanuele <[EMAIL PROTECTED]> wrote:
> YESS! It works perfectly!
>
> Thank you very much, this solves an important problem in my
> application.
Excellent! Thank *you* for using Django.
:-)
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
missing something here.
Armin,
That code can go in your view, rather than your model, assuming you're
writing a custom view to edit your objects.
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
s" in the main menu,
> because "Choices" is a part of "Poll". With my test-app I want to go
> even further. I have a Forum, which has Threads, which have Posts.
Hey Tim,
An easy solution would be to give each model -- Forum, Thread and Post
-- its ow
ResponseRedirect("/contact/thankyou/")
else:
errors = new_data = {}
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org
501 - 600 of 1037 matches
Mail list logo