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
://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
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
_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
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
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
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
--~--~
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
[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
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
--~--~
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
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
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
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
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
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
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
&
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
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
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
)
_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
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
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("
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
--~--~-~--~~~--
>>> import locale
>>> print locale.getdefaultlocale()
('de_DE', 'UTF8')
-
Somebody a idea?
--
Mfg.
Jens Diemer
A django powered CMS:
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: "{".
How can i handle this???
--
Mfg.
Jens Diemer
A django powered CMS:
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(),
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
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
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
;
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.
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
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
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,
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
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
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
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
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
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
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
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
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
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
/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
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.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
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()
------
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
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
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
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
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:
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
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
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
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
--~--~-~--~~
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
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
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
;:1, 'children': [
> { 'value': 2, 'children': []},
> {'value' : 3, 'children': [
> { 'value':4, 'children':[] }
> ]}
> ]}
>
> {% recurse through children as node starting with x %}
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
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
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
'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
65 matches
Mail list logo