> agreed, in a perfect world i would parse the log files. But
> sometimes you don't have access to a cron daemon.
In this case you should read the database API documentation page.
Then your code looks something like this:
from django.shortcuts import get_object_or_404
from my.models import MyOb
> >
Oh, I just noticed this with Konqueror from KDE 3.5.4: you can
have this meta line in your base.html template as long as you
want. When you use "./manage.py runserver", it won't be honored,
the value from DEFAULT_CHARSET from settings.py takes
precedence.
--~--~-~--~~-
> I wrote a daemonize method that can be called by the view to
> spawn a new process that executes your code.
Looks very similar to django.utils.daemonize :-)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django
> ä -> ä
> Ö -> Ö
> ß -> ß
Do you really need them? Theoretically, you can simply set
And then you may use those characters literally.
However, I'm not a browser expert and don't know if all modern
browsers under the sun understand this.
--~--~-~--~~~---~--~-
> I try to import like: "import myproject" and then
> myproject.auth.models.User but no luck, Django throws error,
> that auth has no models class. Is there a way to make this to
> work?
For this kind of problem it helps sometimes to use the "-v"
option to python, e.g.
python -v ./manage.py run
> In the last svn version I can't use django-admin
> createsuperuser name mail passw
>
> How to add a super user by python shell ?
from django.contrib.auth.models import User
user = User(
username='name',
password='sha1$8b4ed$jfhjdhfjhsw4334uhxnxcywjiewwcccf3a6d8326',
email='[EMAIL PROTECT
> I kept running into error messages which told me about
> exceptions in the Django source code (this is the top part of
> the error page) and I kept thinking "well, where's the bloody
> use in that??? I want to know what MY error was! Grmbl.".
Django your easily find out if a module name in it's
> #Create a chapter, have it automatically set the position
You may amend the model's save() method to do that for you:
def save(self):
# Fiddle with the positon field
self.position =
# And now the actual save operation
super(Item, self).save()
> move_higher
I found a way.
Using the extra() directive, I create another field, e.g. is_new.
I then can use this as a sort criteria. There's no need to
output this field:
list = Device.objects
.extra(select={'is_new': 'name LIKE "New Device%%"'})
.order_by('-is_new', 'parent', 'name')
-
I have a list that looks like this:
list = Device.objects.all().order_by('parent', 'name')
and I use this list in a view. Works fine. However, I want to
have the items with a special name at the top of the generated
list. I can easily create two lists, which have the two items in
it:
li
> I think ajax tech will very suit for these things. Because you
Recently there where browser exploits that utilized JavaScript.
So it *CAN* happen that some people will turn JavaScript off. In
this case your Ajax method doesn't work anymore.
--~--~-~--~~~---~--~---
> knock-on errors)... and lastly... ScrIDE doesn't let me run
> manage.py with arguments.
It let's you. You can modify manage.py, and then you can change
the values in sys.argv to your pleasure. I, for example, do
this:
if __name__ == "__main__":
# Shut up the initial syncdb
im
> raise ImproperlyConfigured, "Error loading MySQLdb module:
> %s" % e django.core.exceptions.ImproperlyConfigured: Error
> loading MySQLdb module: No module named MySQLdb
Your python installation lacks the python-module name 'MySQLdb'
to access MySQL databases.
If you were on Debian, you w
I tried to remove the link
Django API (Beta): Automatic generated API using epydoc
from the WikiStart page. However, some SPAM protection tool
called "Akismet" prevented me from doing this.
For the record: the indicated site doesn't work.
--~--~-~--~~~---~--~---
> I am a recovering .NET addict and still very new to Python, so
> just talk some heavy python right now and you can probably
> make my head explode :-).
http://www.diveintopython.org/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to t
I have a model similar to this:
--
class Device(models.Model):
id = models.AutoField(primary_key=True)
name = models.CharField(blank=False, maxlength=40)
#...
class Item(models.Model):
id = models.AutoField(primary_key=True)
16 matches
Mail list logo