custom model fields with to_python()/from_db_value() for different django version...

2015-06-17 Thread Jens Diemer
etaclass(models.SubfieldBase, models.Field) else: _class_args = (models.Field,) class MyField(*_class_args): def from_db_value(self, value, expression, connection, context): pass def to_python(self, value): pass """ Not tested. &g

Re: django-weave needs contribution...

2010-03-17 Thread Jens Diemer
://code.google.com/p/django-weave/source/detail?r=41 -- Mfg. Jens Diemer http://www.jensdiemer.de -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe

Re: django-weave needs contribution...

2010-03-09 Thread Jens Diemer
Am 08.03.2010 07:44, schrieb Rizwan Mansuri: I am happy to help you but my experience with django is very much like starting level. Is that something helps you? You are welcome ;) -- Mfg. Jens Diemer http://www.jensdiemer.de -- You received this message because you are subscribed

Re: 'unicode' object has no attribute 'user'

2008-09-18 Thread Jens Diemer
_set.create(message="Mail was send > successfully.") -- Mfg. Jens Diemer http://www.jensdiemer.de --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this g

Re: UnicodeDecodeError: markdown failing to parse data fed by django

2008-04-12 Thread Jens Diemer
though -- there's already a ticket in Trac >> for it. > > Ok, that sounds cool (the pending fix, not the backwards incompatible > changes); thank you for the reply btw. ticket: http://code.djangoproject.com/ticket/6387 -- Mfg. Jens D

Re: Strange Django-error

2008-04-10 Thread Jens Diemer
d/index.fcgi no Traceback with.: www.domain.tld Any idea? -- Mfg. Jens Diemer A django powered CMS: http://www.pylucid.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To p

ANN: PyLucid CMS v0.8.0 stable released...

2008-02-14 Thread Jens Diemer
ase_id=576538 Links = Homepage: http://www.pylucid.org Forum: http://www.pylucid.org/phpBB2/ Install Info: http://pylucid.org/_goto/107/install-PyLucid/ Update Info: http://pylucid.org/_goto/108/Update-PyLucid/ -- Jens Diemer A django powered CMS: http://www.pylucid.org --~--~

Bug? - model with property + objects.values()

2007-11-14 Thread Jens Diemer
ge has no field named 'name' - Why? Is this a bug? -- Mfg. Jens Diemer A django powered CMS: http://www.pylucid.org --~--~-~--~~~---~--~~ You received this message because yo

Re: Build the _complete_ aboslute URI...

2007-10-31 Thread Jens Diemer
[EMAIL PROTECTED] schrieb: > On Wed, Oct 31, 2007 at 09:06:58AM +0100, Jens Diemer wrote: >> >> With get_absolute_url() [1] we can build a URL of a model entry. The Problem >> is, >> this is not really a _complete_ URL. The protocol and domain is absen

Build the _complete_ aboslute URI...

2007-10-31 Thread Jens Diemer
is always "http". Any better idea? [1] <http://www.djangoproject.com/documentation/model-api/#get-absolute-url> [2] <http://www.djangoproject.com/documentation/sites/#getting-the-current-domain-for-full-urls> -- Mfg. Jens Diemer A django powered CMS: http://www.pylucid.org --~--~

Patch for 'mysql_old' users... (unicode error)

2007-09-26 Thread Jens Diemer
not. -- Mfg. Jens Diemer A django powered CMS: http://www.pylucid.org --~--~-~--~~~---~--~~ 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@google

Re: How to clean the cache completely?

2007-09-20 Thread Jens Diemer
Deryck Hodge schrieb: > On 9/20/07, Jens Diemer <[EMAIL PROTECTED]> wrote: >> I can delete one entry in the cache. But how can i clean the cache >> completely? > Assuming your cache backend is memcached: > > from django.core.cache import cache > cache._cache

How to clean the cache completely?

2007-09-20 Thread Jens Diemer
I can delete one entry in the cache. But how can i clean the cache completely? -- Mfg. Jens Diemer A django powered CMS: http://www.pylucid.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "D

Re: Trigger a django user password change...

2007-08-31 Thread Jens Diemer
Jens Diemer schrieb: > I would like to do something if the django user password has been set or > update. > So i trigger signals.post_save with the User class, like this: > === > from django.db.models

Re: session expire_date

2007-08-10 Thread Jens Diemer
do this: -- now = datetime.datetime.now() cookie_age = datetime.timedelta(seconds=settings.SESSION_COOKIE_AGE) expiry_date = now + cookie_age -- -- Mfg. Jens Diemer A django pow

session expire_date

2007-08-09 Thread Jens Diemer
current_session_id = self.request.COOKIES[session_cookie_name] s = Session.objects.get(pk=current_session_id) expiry_date = s.expire_date -- There must be a simpler way for this, isn't it? -- Mfg. Jens D

Re: Trigger a django user password change...

2007-08-07 Thread Jens Diemer
there is an other way to trigger a django user password change and get the raw password??? -- Mfg. Jens Diemer A django powered CMS: http://www.pylucid.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups &

Trigger a django user password change...

2007-08-02 Thread Jens Diemer
is logged in. So it's not a really good idea. Any better ideas? -- Mfg. Jens Diemer A django powered CMS: http://www.pylucid.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users&q

create_or_update() shortcut

2007-08-02 Thread Jens Diemer
We have the shortcut get_or_create() [1], but whats about a create_or_update() ? [1] http://www.djangoproject.com/documentation/db-api/#get-or-create-kwargs -- Mfg. Jens Diemer A django powered CMS: http://www.pylucid.org --~--~-~--~~~---~--~~ You

Pickle model fields with cache...

2007-07-06 Thread Jens Diemer
def _set_value(self, value): self._cache["value"] = value self._value = pickle.dumps(value) _value = models.TextField() value = property(_get_value, _set_value) ... ----- -- Mfg. Jens

Re: Pickle model fields

2007-07-05 Thread Jens Diemer
) _value = models.TextField() value = property(_get_value, _set_value) ... - In a short test works this seems to work... Question: Is this a good idea? -- Mfg. Jens Diemer A django powered CMS: http

Re: quote django template tags for a html textarea...

2007-06-26 Thread Jens Diemer
Jens Diemer schrieb: > I would like to edit templates online. So i used newforms and > .form_for_instance() to build a html form. > The Problem: If there are django template tags in the content, the tag > rendered > by the template engine. But i don't want that. I want

Re: ForeignKey

2007-06-26 Thread Jens Diemer
ou need to create a relationship on a model that has not yet been defined, you can use the name of the model, rather than the model object itself: """ change: parent_menu_item = models.ForeignKey(Menu) to this: parent_menu_item = models.ForeignKey("

Re: Problem: locale.getdefaultlocale() returns (None, None) under apache2...

2007-06-26 Thread Jens Diemer
just return no timezone. I'll give it another look >> and put in some more fallbacks. > > This should be fixed in [5546]. Yes, now it fallback to "ascii" -- Mfg. Jens Diemer A django powered CMS: http://www.pylucid.org --~--~-~--~~~--

Problem: locale.getdefaultlocale() returns (None, None) under apache2...

2007-06-26 Thread Jens Diemer
>>> import locale >>> print locale.getdefaultlocale() ('de_DE', 'UTF8') - Somebody a idea? -- Mfg. Jens Diemer A django powered CMS:

quote django template tags for a html textarea...

2007-06-26 Thread Jens Diemer
mplate-output So i have no change to replace "{" and "}"... If i replace it before i make .form_for_instance() the escaped sequence "{" would be escaped a second time to this: "&#x7B;". How can i handle this??? -- Mfg. Jens Diemer A django powered CMS:

Re: newforms: How to make a Checkboxed user select list...

2007-06-26 Thread Jens Diemer
Jens Diemer schrieb: > I would like to make a newforms user select list, from every existing django > users, looks like this: I have found a solution: class MailForm(forms.Form): users = forms.ModelMultipleChoiceField( queryset=User.objects.all(),

newforms: How to make a Checkboxed user select list...

2007-06-25 Thread Jens Diemer
uot;>[EMAIL PROTECTED] -- I don't know how to make this. Has anyone a idea? -- Mfg. Jens Diemer A django powered CMS: http://www.pylucid.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Dj

Re: no newforms.TextField() available?!?!?

2007-06-25 Thread Jens Diemer
James Bennett schrieb: > On 6/25/07, Jens Diemer <[EMAIL PROTECTED]> wrote: >> This works: >> mail_text = forms.CharField(widget=forms.Textarea) > > That's by design. Whether to show an input type="text" or a textarea > is a matter of widget

no newforms.TextField() available?!?!?

2007-06-25 Thread Jens Diemer
This works: mail_text = forms.CharField(widget=forms.Textarea) Note: I used the unicode-branch. -- Mfg. Jens Diemer A django powered CMS: http://www.pylucid.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google G

ANN: PyLucid v0.8.0alpha2...

2007-06-22 Thread Jens Diemer
; userpassword: "12345678" download: http://sourceforge.net/project/showfiles.php?group_id=146328&package_id=172512 btw. the test page http://www.pylucid.de used the new alpha Version. (It runs via CGI on apache with SQLite) -- Mfg.

Re: delete obsolete content type entries...

2007-06-19 Thread Jens Diemer
Gabriel Farrell schrieb: > On May 7, 4:32 am, Jens Diemer <[EMAIL PROTECTED]> wrote: >> That surprises me. Does nobody have the same problems? >> Still nobody delete a model class? >> >> How to clean up the django tables? With phpMyAdmin? >> > > I&#x

Re: FastCGI Shared host

2007-06-19 Thread Jens Diemer
range > Content-Type: text/html This is probably the same problem like here: http://code.djangoproject.com/ticket/3414 -- Mfg. Jens Diemer A django powered CMS: http://www.pylucid.org --~--~-~--~~~---~--~~ You received this message because you

Re: change help_text if form_for_model used...

2007-05-25 Thread Jens Diemer
Jens Diemer schrieb: > How can i change the help_text after i have generate the form with > form_for_model() ? I found a solution: -- from django.contrib.auth.models import User UserForm = forms.form_for_model(User,

change help_text if form_for_model used...

2007-05-25 Thread Jens Diemer
How can i change the help_text after i have generate the form with form_for_model() ? -- Mfg. Jens Diemer A django powered CMS: http://www.pylucid.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Announcing: PyLucid CMS v0.8.0alpha1

2007-05-18 Thread Jens Diemer
ouncements permitted/desired here? -- Mfg. Jens Diemer A django powered CMS: http://www.pylucid.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to thi

Re: modifying shebang reference in django 0.95.1

2007-05-08 Thread Jens Diemer
Mark Phillips schrieb: > Thank you. I am not familiar with the "init/index" python script. Can > you elaborate? You use fastCGI... So you have a "init" WSGI Handler file? Only the shebang in this file is IMHO important. -- Mfg. Jens Diemer

Re: modifying shebang reference in django 0.95.1

2007-05-08 Thread Jens Diemer
ate/manage.py:1: #!/usr/bin/env python > > My intention is to change the shebang to #!/usr/local/python You must only change the shebang in your "init/index" python script. The Handler file. -- Mfg. Jens Diemer A django powe

Re: delete obsolete content type entries...

2007-05-08 Thread Jens Diemer
there must be exist obsolete contenttypes and permission entries, after you deactivate the test-App. -- Mfg. Jens Diemer A django powered CMS: http://www.pylucid.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Googl

Re: delete obsolete content type entries...

2007-05-07 Thread Jens Diemer
That surprises me. Does nobody have the same problems? Still nobody delete a model class? How to clean up the django tables? With phpMyAdmin? -- Mfg. Jens Diemer A django powered CMS: http://www.pylucid.org --~--~-~--~~~---~--~~ You received this

delete obsolete content type entries...

2007-05-04 Thread Jens Diemer
ere a way to update the django tables automatically? -- Mfg. Jens Diemer A django powered CMS: http://www.pylucid.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post t

Re: Big Upload

2007-04-12 Thread Jens Diemer
g/vrp1 (search for "upload") -- Mfg. Jens Diemer A django powered CMS: http://www.pylucid.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: Playing with fixtures and django serializers -> Errors...

2007-03-28 Thread Jens Diemer
6e3fc693d/a6807b7770b6b165 -- Mfg. Jens Diemer A django powered CMS: http://www.pylucid.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: backup/restore DB data...

2007-03-16 Thread Jens Diemer
file as a backup ;) btw. can you insert a Licence statements into you script? -- Mfg. Jens Diemer A django powered CMS: http://www.pylucid.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

backup/restore DB data...

2007-03-16 Thread Jens Diemer
/other way, for DB backups? -- Mfg. Jens Diemer A django powered CMS: http://www.pylucid.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: Playing with fixtures and django serializers -> Errors...

2007-03-16 Thread Jens Diemer
lso. I deleted the SQLite file. Thus no data are present. the complete routines are here: http://pylucid.net/trac/browser/branches/0.8%28django%29/PyLucid/install/install.py -- Mfg. Jens Diemer CMS in pure Python CGI: http://www.pylucid.org --~--~-~--~~~---~

django.template.TemplateSyntaxError: Invalid block tag: 'extends'

2007-03-16 Thread Jens Diemer
django.template.loader_tags conclusion: The loader must be import, even if i not use it directly! Is that not somehow stupidly solved? -- Mfg. Jens Diemer CMS in pure Python CGI: http://www.pylucid.org --~--~-~--~~~---~--~~ You received this mes

Re: Deployment with Subversion

2007-03-15 Thread Jens Diemer
settings'!" print print "You must rename ./PyLucid/settings-example.py to ./PyLucid/settings.py" print print "You must setup this file for your config!" import sys sys.exit() ------

Re: Playing with fixtures and django serializers -> Errors...

2007-03-14 Thread Jens Diemer
at=raw I have some open questions: How am I to store the data? I tried: - file(fixture_filename, "w") - file(fixture_filename, "wb") - codecs.open(fixture_filename, "w", "utf-8") (reading accordingly) All the same which I used, I get

django server: reload and samba share...

2007-03-13 Thread Jens Diemer
My sources are on a linux samba share. I used this share under windows xp and start the django developer server from this share. The reload mechanism don't work! When i copy the source from the share into my local filesystem, the reload works fin. Any solution? -- Mfg. Jens D

Re: Playing with fixtures and django serializers -> Errors...

2007-03-13 Thread Jens Diemer
Jens Diemer schrieb: > I can't trying this. Because now i have a error before the serializers > starts working: """ContentType matching query does not exist.""" On a other platform it works! I don't known why... But if i import the dump i got so

Re: Playing with fixtures and django serializers -> Errors...

2007-03-13 Thread Jens Diemer
ot; with the same error. I think i have a error in my DB data. But i can't isolate it with there error messages :( -- Mfg. Jens Diemer CMS in pure Python CGI: http://www.pylucid.org --~--~-~--~~~---~--~~ You received this message because you are sub

Playing with fixtures and django serializers -> Errors...

2007-03-12 Thread Jens Diemer
7; ---- In 'data' i missing the keys 'lastupdatetime' and 'createtime'. I find field_name == 'lastupdatetime', but value == 'blabla' also amusing. Because you can see from above:

Bug? Every table needs a id?

2007-03-09 Thread Jens Diemer
p_list: for model in get_models(app): -objects.extend(model.objects.all()) +try: +objects.extend(model.objects.all()) +except Exception, e: + sys.stderr.write(style.ERROR("unable to get data: %s\n" % e)) try: print serialize

Re: Recursion in templates... again

2007-03-05 Thread Jens Diemer
amm. (The und Tags). I don't want to put this in the programm code. All html thing should be stored in the template. To generate a tree menu without a template is very easy ;) -- Mfg. Jens Diemer CMS in pure Python CGI: htt

Re: Generate a tree List...

2007-03-02 Thread Jens Diemer
Jeremy Dunck schrieb: > If you want recursion in templates, why not just use Jinja? Jinja is super cool. But I would like to keep the PyLucid package small. I thought with django i would choose a full features framework :( -- Mfg. Jens Diemer CMS in pure Python CGI: h

Re: Recursion in templates... again

2007-03-02 Thread Jens Diemer
n/trunk/melt/apps/custard/templatetags/customtags.py But the code is for an older django version. I don't know how to update it... So, if there is no solution, i must use jinja... -- Mfg. Jens Diemer CMS in pure Python CGI: http://www.pylucid.org --~--~-~--~~

Re: Generate a tree List...

2007-03-02 Thread Jens Diemer
Jeremy Dunck schrieb: >> I found this: >> https://svn.greenpeace.org/projects/custard/browser/production/trunk/melt/apps/custard/templatetags/customtags.py >> >> But i don't know how i can use this. Hm :( The code is for an older django version. -- Mfg. Jens Die

Re: Generate a tree List...

2007-03-02 Thread Jens Diemer
Jens Diemer schrieb: > Jeremy Dunck schrieb: >>> I found this: >>> https://svn.greenpeace.org/projects/custard/browser/production/trunk/melt/apps/custard/templatetags/customtags.py >>> >>> But i don't know how i can use this. >> Yeah, I'd

Re: [help] passing a md5 digest string into URL

2007-03-01 Thread Jens Diemer
svn/trunk/urls.py -- Mfg. Jens Diemer CMS in pure Python CGI: http://www.pylucid.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-use

Re: Generate a tree List...

2007-03-01 Thread Jens Diemer
;:1, 'children': [ > { 'value': 2, 'children': []}, > {'value' : 3, 'children': [ > { 'value':4, 'children':[] } > ]} > ]} > > {% recurse through children as node starting with x %}

Re: datetime format and client preferred language?!?!

2007-03-01 Thread Jens Diemer
Jens Diemer schrieb: > How can i send a datetime in the client preferred format? Note: i don't > wand to use a template filter to handle this ;) Hm! I can make this: t.strftime(_("%Y-%m-%d - %H:%M")) :) -- Mfg. Jens Diemer CMS in pure Python CGI: h

datetime format and client preferred language?!?!

2007-03-01 Thread Jens Diemer
anguage based on the HTTP_ACCEPT_LANGUAGE string. Why? I think a full feature framework should full handle L10N/I18N. Have I overlooked something? -- Mfg. Jens Diemer CMS in pure Python CGI: http://www.pylucid.org --~--~-~--~~~---~--~~ You received this message because y

Re: Generate a tree List...

2007-03-01 Thread Jens Diemer
missing in the core. It's a very useful function -- Mfg. Jens Diemer CMS in pure Python CGI: http://www.pylucid.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post

Generate a tree List...

2007-02-27 Thread Jens Diemer
'title': u'SiteMap'}], 'title': u'example pages'}, {'href': u'/Test/', 'title': u'test'}]} template = """ Sitemap {% for item in sitemap %} {{ item.title|escapexml }} {% if item.subitems %} {% recurse item.s