Hello,
On 29 Lip, 15:56, cootetom wrote:
> To add, something just popped into my head. Have you got
> DEFAULT_CHARSET = 'utf-8' in your settings.py fiile
It didn't help.
> On Jul 29, 2:51 pm, cootetom wrote:
>
> > I would imagine that the deserialize
Hello,
first of all, congratulations!
I have a problem. When trying to open template I get following error:
Original Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/django/template/debug.py",
line 71, in render_node
result = node.render(context)
File
On Jun 19, 8:22 pm, l5x <[EMAIL PROTECTED]> wrote:
> Hello,
>
> Request Method: GET
> Request URL: https://age86.internetdsl.tpnet.pl/
> Exception Type: AttributeError
> Exception Value: 'Connection' object has no attribute 'ping'
> Exceptio
Hello,
Request Method: GET
Request URL:https://age86.internetdsl.tpnet.pl/
Exception Type: AttributeError
Exception Value:'Connection' object has no attribute 'ping'
Exception Location: /usr/django/django/db/backends/mysql/base.py in
_valid_connection, line 162
On Jan 12, 1:49 pm, Darthmahon <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm trying to insert a simple date (2002-01-12) from a form I have
> created into a DateField but I keep getting this error:
>
> 'str' object has no attribute 'strftime'
>
> This is how the DateField is setup in my models.py
On Jan 8, 3:03 am, Car <[EMAIL PROTECTED]> wrote:
> Hello
>
> I have following code;
>
> class PlaceForm(ModelForm):
> class Meta:
> model = Place
> exclude = ('useradd',) #excluded, because form shouldn't give
> a way to set user manually
>
> Model Place has one foreign key
Why don't you use sessions?
http://www.djangoproject.com/documentation/sessions/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
On Dec 31, 12:19 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> Is 534 one past the last line of views.py?
Yes.
> I expect you have a syntax error
> such as a missing closing paren or bracket in your views.py file, which is
> causing the parser to keep scanning until it reaches the end of the
Hello,
I get the following error:
Django Version: 0.97-pre-SVN-6976
Python Version: 2.5.1
Exception Type: SyntaxError
Exception Value:invalid syntax (views.py, line 534)
Exception Location: /home/user/django_src/django/core/urlresolvers.py
in get_callable, line 47
On Dec 30, 5:04 pm, Florian Lindner <[EMAIL PROTECTED]> wrote:
> Hello,
> using newforms how can I set fields to be hidden (the hidden="hidden"
> attribute)?
Did you mean type="hidden" ?
http://www.djangoproject.com/documentation/newforms/#widgets
You can create your own widget if you need to.
On Dec 27, 8:22 am, Muchanic <[EMAIL PROTECTED]> wrote:
> Just FYI and for anyone else who comes across this thread - I had the
> same problem, trying to pass a ForeignKey via HiddenInput in an app
> I'm working on. If you need to/want to do it this way, the trick is
> that you have to use a
Maybe you should take a look at render():
http://code.djangoproject.com/browser/django/trunk/django/newforms/widgets.py#L44
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this
After reloading the page (f5) browser shows new data?
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this
Hm, I didn't have this error with my PhotoForm. You can look at it
here:
http://groups.google.com/group/django-users/browse_thread/thread/6693f3294e710eab
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django
Thank you, I will check that. I wasn't aware of that possibility.
--~--~-~--~~~---~--~~
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@googlegroups.com
To
Do you want to change the HTML output of the form?
Then you should take a look at render()
http://code.djangoproject.com/browser/django/trunk/django/newforms/widgets.py
or
_html_output() with as_*
http://code.djangoproject.com/browser/django/trunk/django/newforms/forms.py
Best regards,
l.
class Photo(models.Model):
user = models.ForeignKey(User)
main = models.BooleanField(_('Is main?'))
icon = models.ImageField(_('Icon'), upload_to='photo', null=True,
blank=True,
help_text=_('Don\'t touch! It will be
generated automatically'))
medium =
I think I missed:
http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#ModelFormsconstructornowmatchesForms
That should be the solution!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users"
Traceback:
File "/home/user/django_src/django/template/debug.py" in render_node
71. result = node.render(context)
File "/home/user/django_src/django/template/debug.py" in render
87. output =
force_unicode(self.filter_expression.resolve(context))
File
"I propose to design and implement an API to make Comet behavior
available to Django applications."
http://hosted.corp.it/django/full.html
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post
If you put /print "hello"/, the server should print it with given
delay (on the server side).
I think that you should use JS/AJAX to update the page after it is
sent to the user (script on the user side).
--~--~-~--~~~---~--~~
You received this message because you
Thank you Luis!
I hope that internationalization will replace English months :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
Look here, I have similar problem, but unfortunately nobody was able
to help me. I'm still waiting for answer, because it's important for
me.
http://groups.google.com/group/django-users/browse_thread/thread/d3b03b7fc5288ae0
Maybe it will iluminate you somehow :)
No problem, just waiting for somebody more advanced than me to help
me:)
--~--~-~--~~~---~--~~
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@googlegroups.com
To
Can you give us "class RegistrationProfile" from C:\Python25\Lib\site-
packages\registration\models.py ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
Traceback? Template variables?
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to
> Doesn't Django have something very similar inbuilt to newforms?
You mean: SplitDateTimeWidget
But there is no custom 'value_from_datadict'
See:
http://code.djangoproject.com/browser/django/trunk/django/newforms/widgets.py#L459
--~--~-~--~~~---~--~~
You received
Hello,
Based on this thread:
http://groups.google.com/group/django-users/browse_thread/thread/fd450734295e450f/68d466b0d6b24eb7
I have the following code for the SplitDateWidget:
class SplitDateWidget(forms.MultiWidget):
def __init__(self, attrs=None):
widgets =
form_for_instance? Check:
http://www.djangoproject.com/documentation/newforms/#generating-forms-for-models
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
I think that some info about your web-server could be important.
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe
I didn't use delete_file, but if you can't solve this you can write
your own code for that using signals (pre_delete or post_delete).
More: http://code.djangoproject.com/wiki/Signals
Anyway I'm also curious how to do that without signals.
--~--~-~--~~~---~--~~
You
Isn't it just putting variable into template? I don't know if I
understand you correctly but for example:
models.py
Image(models.Model)
name = CharField(...)
location = ImageField(...)
YourModel(models.Model)
image = ForeignKey(Image)
user = ForeignKey(User)
(...)
index.html:
Thank you Malcolm, you are very helpful today :)
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this
I suppose that you should also check if the username isn't already
taken.
--~--~-~--~~~---~--~~
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@googlegroups.com
To
Oops, Malcolm answered first :)
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to
I don't know if it could help, but anyway you should:
1) add the following line at the beggining of models.py
# -*- coding: utf8 -*-
2) change the order of stuff in models, at first fields: CharField
etc, then classes (Admin, Meta) and methods at the end (__unicode__
etc).
3) add after
Once again, you were right Malcolm.
Python was importing the old django version, so I did:
python setup.py install
in the trunk and now it's working.
Thank you everyone for your suggestions.
Ps. I'm really happy that ModelForm exists, it's very useful.
Hello,
I have been working Django (mod_python or Django server as well). I
have updated it to SVN 6906 (newest at this time), because I wanted to
use the ModelForm, but unfortunately:
Python 2.5.1 (r251:54863, Oct 5 2007, 13:36:32)
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on
If the example from Rajesh isn't working maybe you should do sth like
that:
/post// ?
For example:
/post/http/google.com
Then join it 'http' + '://' + 'google.com'
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
I suppose that you should take a look at
http://www.djangoproject.com/documentation/flatpages/
as well.
It will give you the basic possibilty to manage the content, than you
can extend it while learning more.
Best regards,
l
--~--~-~--~~~---~--~~
You received
You also do this like that:
class CommentForm(forms.Form):
name = forms.CharField(
widget=forms.TextInput(attrs={'class':'special'}))
url = forms.URLField()
comment = forms.CharField(
widget=forms.TextInput(attrs={'size':'40'}))
'class':'special' --
Hello,
I couldn't find the information how to override the 'list_display' and
'fields' of the Django (SVN) User model in Admin interface.
I need to display User altogether with his two profiles. I know that
there is a get_profile(), but I want to display everything related to
User in the Admin,
Thank you, it's working now.
Now I know to look for changes on
http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges
every time I use svn.
Best regards,
l5x
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Hello,
my code was working fine, until I put it on my another system.
The error I get with newest SVN django version is:
NameError at /
global name '_' is not defined
Request Method: GET
Request URL:http://localhost:8000/
Exception Type: NameError
Exception Value:
Okay. It works!
The missing part in my code was:
Q(author__username__icontains=phrase). I couldn't find it. Thank you
for your help.
@Tim: I will remember to debug it that way in the future. Thanks.
--~--~-~--~~~---~--~~
You received this message because you are
Hello,
I have code for searching:
news = News.objects.filter(
Q(title__icontains=phrase)
| Q(tags__icontains=phrase)
| Q(short__icontains=phrase)
| Q(content__icontains=phrase)
| Q(author__icontains=phrase)
| Q(source__icontains=phrase)
)
News model looks like that:
class
Maybe it will be useful:
http://groups.google.com/group/django-users/browse_thread/thread/a60038f4d0777391/a94a8e1dff4865db#a94a8e1dff4865db
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To
On Jun 27, 11:32 pm, grassoalvaro <[EMAIL PROTECTED]> wrote:
> Here some code:
> -
> class TestField(models.Model):
> name = models.TextField()
> text = models.ManyToManyField(TextOption)
> class Meta:
>
If it is by design - it is ok. I thought that I just can't find
information *how* to do it. Thanks for your time & effort.
On Jun 25, 3:19 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Sun, 2007-06-24 at 22:49 +, l5x wrote:
> > This is a great stuff and I'm really
nd you don't
have to have it spread all over the code. But the point is, that I
don't know if there is something which can allow to do that :)
Thanks,
l5x
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django
the loop:
for i in self.fields:
self.fields[i].widget.attrs['class'] =
'yourclassname'
But what's the name of field ? i.name ? or what ?
On Jun 24, 10:31 pm, l5x <[EMAIL PROTECTED]> wrote:
> I think that it's a right thing for me. Thanks for yo
Hm.. I suppose that if you change the name of model it'll be okay.
--~--~-~--~~~---~--~~
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@googlegroups.com
To
I think that it's a right thing for me. Thanks for your effort.
--~--~-~--~~~---~--~~
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@googlegroups.com
To
Hello,
is there any possibility in django to put a widget into a model
instead of creating the whole forms for each model (using widgets
render)? I only need to add a css class to each field in a model...
Best regards
--~--~-~--~~~---~--~~
You received this
54 matches
Mail list logo