Without to_field, it works. But, setting to_field to name, you can
simply type name in the input field of django admin, instead of id.
I am just wondering why the api behaves differently if to_field is set
to another field other than id.
We create like this:
>>> pet = Pet.objects.create(owner
Hi, thanks, I didn't know this werkzeug debuger.
Now I can see exactly where it raises the error and can print the variables
values, here's the output with some values:
File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py",
line *20
Try defining the pet model like this:
class Pet(models.Model):
owner = models.ForeignKey(Person)
name = models.CharField(max_length=30)
Than it will work.
On Fri, Aug 6, 2010 at 7:25 AM, bhuztez wrote:
> I have my models declared in this way:
>
>class Person(models.Model):
Hello,
I can do:
{% for image in gallery.image_set.all %}
...
{% endfor %}
but my image model has:
is_thumbnail = models.BooleanField()
and I want to limit displaying only these images which have
is_thumbnail=True. I can create a method on the image model, which returns
images I want to, b
I have
class NewEventForm(ModelForm):
Event_name = forms.CharField(label='Event
Name*',widget=forms.TextInput(attrs={'size':'82','maxlength':'100','tabindex':'1'}),error_messages={'required':'!
You must enter Event Name.'})
description=forms.CharField(label='Event Description*',
widget=Ti
Hello,
I have a gallery model and an image model. First, I create some galleries,
then I insert images into them. But now, I want to add multiple thumbnails
feature for galleries (thumbnails representing the gallery, not thumbnails
for images inside gallery), so I added ManyToManyField and
Please, install django_extentions, werkzeug debuger and try to see what exactly
where the issue is with the runserver_plus command (in browser debugger so
you'll get the variables that are missing here.
Most probably, your timezone field causes the issue.
Regards,
Xavier.
Le 9 août 2010 à 22:40
Yes I do have ssh - I have just tried yum update bur nothing new was
updated. How do I update
On Aug 9, 10:27 pm, Boguslaw Faja wrote:
> Hm, unfortunately I don't use apache. Nginx is better for me. But for
> other group members answers for something else may be important: why
> are you using pyt
On Mon, Aug 9, 2010 at 1:50 PM, John Fabiani wrote:
> Hi,
> I recently registered for the group and I must have done something wrong
> because I am receiving every posting twice (duplicates). Can someone fix
> the
> problem or direct me to where I can fix it.
>
>
Have you looked at the headers o
Using the language files is the solution here. Even if your site only
supports the English language, it still means that you can have .po
files for just English. Once you understand how it all hangs together
you'll be away.
http://docs.djangoproject.com/en/1.1/topics/i18n/#topics-i18n
I have a si
It's all there, you just need to implement it.
http://docs.djangoproject.com/en/1.1/topics/i18n/#topics-i18n
If you'd like a tool to help edit the translation files then check out
one of the following:
http://poedit.tomcoote.co.uk/
http://code.google.com/p/django-rosetta/
http://translate.sourcefo
Hm, unfortunately I don't use apache. Nginx is better for me. But for
other group members answers for something else may be important: why
are you using python in version 2.4? It's a bit old. Do you have
access to console (ssh) or only for some web panel (cpanel, direct)?
Best regards,
On Mon, Au
Hi,
I recently registered for the group and I must have done something wrong
because I am receiving every posting twice (duplicates). Can someone fix the
problem or direct me to where I can fix it.
Thanks in advance
Johnf
--
You received this message because you are subscribed to the Google
Sorry, forgot to mention
It is a CentOS based VPS runing Parallels Virtuozzo with apache and
python 2.4
All I have done is a simple install of Django to the root and run
setup.py install
There seem various ways to install it but I wish to be able to set up
multiple domains through WHM using CPan
Thanx for all the help,
I tried to run on Sqlite3, and I don't if it's bad or good news, but there's
error even in Sqlite3
just when I tried to create the db (syncdb) I get just after I input my
users data or when I try to create a user in shell:
Traceback (most recent call last):
File "manage.p
Yes i'm trying to display a table with dynamic columns.
my intention was to pass the queryset object to template and pass the
column names so that the template can generate the table dynamically.
On Aug 9, 12:06 pm, Sævar Öfjörð wrote:
> I take it that you absolutely need to dynamically access t
2010/8/9 kostia
> A. If we have a form of registration only with password and username
> fields. Then the user may write some fake email (foreign).
>
> B. We use registration activation link sent into email like it is done
> on Facebook, Linkedin, Twitter and so on.
>
> Why B is better than A? Wh
What if the user puts in a "fake" e-mail that belongs to someone else?
Then any service notifications go to the poor person who owns the e-mail
address, not the person who signed up for the account. Also the user
would get to take advantage of the benefits of the service.
With B only the init
And now there is a time for stupid question:
how to translate my English site onto different languages?
--
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 from this
A. If we have a form of registration only with password and username
fields. Then the user may write some fake email (foreign).
B. We use registration activation link sent into email like it is done
on Facebook, Linkedin, Twitter and so on.
Why B is better than A? Why A is a wrong solution? Any a
On 09/08/10 19:56, owidjaya wrote:
in php i can do this
$some_mapping = array( "var1" : content_var1,
"var2" : content_var2,
)
for($i =1; $i< 3; $i++){
echo $some_mapping["var"+$i];
}
can i do this in django template
Hi,
What kind of http server are you going to use? Nginx ? Apache? It
somehow defines possible options.
best regards,
On Mon, Aug 9, 2010 at 9:04 PM, XTCHost wrote:
> I have installed Django in the root directory of a VPS supplied by
> hostagtor. My aim is to provide any domain with Django. Not
I take it that you absolutely need to dynamically access the values
through generated keys?
Not just a regular for loop?
{% for var in some_mapping %}
{{ var }}
{% endfor %}
- Sævar
On Aug 9, 8:56 pm, owidjaya wrote:
> in php i can do this
>
> $some_mapping = array( "var1" : content_var1,
>
I have installed Django in the root directory of a VPS supplied by
hostagtor. My aim is to provide any domain with Django. Not that there
will be many. It is running
I am just not sure how to proceed to make sure it is done right
Any advice help would be welcome
Many Thanks
Russell
--
You rec
in php i can do this
$some_mapping = array( "var1" : content_var1,
"var2" : content_var2,
)
for($i =1; $i < 3; $i++){
echo $some_mapping["var"+$i];
}
can i do this in django template?
--
You received this message because
in php i can do this
$some_mapping = array( "var1" : content_var1,
--
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 from this group, send email to
django-users+u
Thank you for answering;
> Are you sure that you get '?' on the file if you write it this way, or
> it's just
> the console/editor that you're using to see the file's contents that
> cannot handle
> the text's encoding?
When it comes to Unicode and such I am not sure about anything. But
you are p
> def clean_username(self):
> data = self.cleaned_data['username']
> try:
> User.objects.get(username=data)
> except User.DoesNotExist:
> return
> raise forms.ValidationError('The userna
> I have also tried replacing the write() statement with
> write( string_content.encode( '' )) where I have tried the
> encodings 'latin-1' and 'utf-8'; then it does not fail hard, but
> instead of the wanted 'øåæ' characters I get '?' marks.
Are you sure that you get '?' on the file if you wr
I want to provide customizable vocabularies for an open-source django
project, where each deployer can use different terms for strings that
appear in templates (e.g. field names, form field descriptions, help
text, page titles, etc.)
Would django language files work for this purpose? Everything w
Hello,
I am developing a Django application, and have some Unicode problems.
I must admit I do not really understand if my problems are with Django
or Python or ... ; but hopefully someone her can shed some light on
the problem.
Setup:
1. The application is developed for the Scandinavian countri
On Mon, Aug 9, 2010 at 7:21 AM, kostia wrote:
> Hi,
>
> I want to create an Inbox service for users of my django site. Can
> anybody point me to the right direction? Any modules or it is better
> to do myself?
>
As to whether or not it is best to do it yourself, that depends on if
another module
Thanks
On Aug 9, 8:55 pm, rebus_ wrote:
> On 9 August 2010 14:30, nyambaa wrote:
>
> > Hello guys,
> > please help, I've not found the password reset page on
> > djangoproject.com
> > where is it?
>
> > thanks
>
> > --
> > You received this message because you are subscribed to the Google Groups
I use PostgreSQL on my Mac as well as MySQL, and I've had many fewer
problems with PostgreSQL than I've had with MySQL.
My personal opinion: Ignore all the ports/fink stuff, and get a good
native PostgreSQL install:
http://postgresqlformac.com
The 8.4.3 installer has some known problems (easy to
Daniel,
Did you manage to have the application running on sqlite3 ... ?
I develop on Mac & have few issues... so may be you could first ensure
everything is working without postgresql connector ... ?
\T,
On Aug 9, 4:24 am, Daniel França wrote:
> tried, nothing :(
> I'm getting crazy with Mac OS
Hi,
I'm still pretty new to django and searching some simple FormWizard
examples
What I want to do:
First step: ModelChoiceField is populated with queryset
Second step: A ChoiceField needs to be populated with
object.get(model__field__exact=resultfromstep1)'
In the last step I want to show al
I haven't read all the comments here but if you've just started
working on osx you should definitely check out http://github.com/mxcl/homebrew
- it's a package manager which works like a charm most of the time.
Installation is extremely simple (there is even one-liner available).
If your problem i
On 9 August 2010 14:30, nyambaa wrote:
> Hello guys,
> please help, I've not found the password reset page on
> djangoproject.com
> where is it?
>
> thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send emai
On 8/9/2010 8:40 AM, kostia wrote:
> What is the purpose of email activation?
>
> Why can't we just use username/password on the site.
>
> The one bad fact - is when somebody uses foreign email address. This
> is not a reason to use activation. Show me more facts please.
>
The e-mail response se
What is the purpose of email activation?
Why can't we just use username/password on the site.
The one bad fact - is when somebody uses foreign email address. This
is not a reason to use activation. Show me more facts please.
--
You received this message because you are subscribed to the Google
Hello guys,
please help, I've not found the password reset page on
djangoproject.com
where is it?
thanks
--
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 from thi
(Using formset_factory, if that makes a difference)
If the user fills a form in formset incompletely and then marks it for
deletion, my form handling dies horribly. The deleted forms prevent
formset.cleaned_data from working as they don't validate and thus the
form doesn't have a cleaned_data attr
Hi,
I want to create an Inbox service for users of my django site. Can
anybody point me to the right direction? Any modules or it is better
to do myself?
Kostia
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email
I doubt it's a mac issue.
I already ran in a couple of very painful issues with postgresql on Linux while
having no issue with mysql on mac.
My feeling is that postgresql require far more attention than mysql and is more
sensitive to small changes.
Regards,
Xavier.
Le 9 août 2010 à 05:32, Danie
yeah, psycopg2
On Mon, Aug 9, 2010 at 1:27 AM, Sam Lai wrote:
> 2010/8/9 Daniel França :
> > I tried to reinstall everything... installing python+postgres from ports
> > and I get the Symbol not found: _PQbackendPID error again from psycopg.
> > I guess the best solution is run Ubuntu on a virtu
On Aug 9, 8:13 am, chefsmart wrote:
> I already have the objects in an earlier chunk of the code. I don't
> want to hit the database again to get something I already have in
> another form. That is what I mean when I say that code like my_qs =
> MyModel.objects.filter(pk=obj1.pk) is utterly silly.
Yes, but this site can show more powered by information.
For example:
A site powered by python/django/jquery/apache/memcached,
the site will be listed at http://django.poweredsites.org and
http://python.poweredsites.org and http://jquery.poweredsites.org etc,
so it's more easy to share powered b
Thanks for everyone's advice.
My final solution will be to use template inheritance to have the same form
across the site and to use the action="/search" to ensure I don't have to
import a search function into every single view.
Thanks again
Wes
On 8 August 2010 19:36, kostia wrote:
> Yes, so
Dnia 07-08-2010 o 14:56:57 JeffH napisał(a):
Another approach that I used recently:
# urls.py
(r'^ThankYou/(?P\d{4})/$', views.ThankYou),
# message defs in views.py
# messages for ThankYou page
ty_messages = {
'' : 'Invalid message specified.',
'0001' : 'Pending dealer record h
I already have the objects in an earlier chunk of the code. I don't
want to hit the database again to get something I already have in
another form. That is what I mean when I say that code like my_qs =
MyModel.objects.filter(pk=obj1.pk) is utterly silly. I already have
the objects from earlier db q
50 matches
Mail list logo