On Tuesday, 3 May 2011 02:37:56 UTC+1, daniel.franca wrote:
>
> anyone?
> Maybe what I need is something like OneToMany relationship, i guess, but
> there's no such thing in django
>
> Er, what? What about ForeignKey?
Anyway, what you need is inline model formsets:
http://docs.djangoproject.com/e
hey, yes, sure, i import all the necessities.
but the default handler404 seems to be called all the time. i cannot
control it somehow.
On May 2, 6:11 pm, Jason Culverhouse wrote:
> On May 1, 2011, at 8:01 AM, doniyor wrote:
>
>
>
>
>
>
>
>
>
> > Hi there,
> > i am trying to overwrite handler40
Hey guys,
i have got a simple but sometimes confusing issue:
what is module and can i use it both in global urls.py and in local
urls.py ? i wonder, which one is a wise way ?
thanks much,
doni
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
Hello,
Being new to Django, I was told by a friend that it only supports i18n for a
limited set of languages - these being only languages that have had Django
itself translated to.
Is this true? Doesn't make much sense to me :) Is there a definitive list of
languages supported by Django's i18
Hi there Django-users
I'm suppose to link CSS to my base.html but i can't get it worked :s there is
my url line:
if settings.DEBUG:
urlpatterns += patterns('',
url(r'^static/(?P.*)$', 'django.views.static.serve',
{'document_root': settings.PROJECT_PATH+'/static/', 'show_indexes': T
On Tue, May 3, 2011 at 19:19, Uri Goldstein wrote:
> Hello,
>
> Being new to Django, I was told by a friend that it only supports i18n for a
> limited set of languages - these being only languages that have had Django
> itself translated to.
>
> Is this true? Doesn't make much sense to me :) Is th
On Tue, 2011-05-03 at 02:19 -0700, Uri Goldstein wrote:
> Being new to Django, I was told by a friend that it only supports i18n
> for a
> limited set of languages - these being only languages that have had
> Django
> itself translated to.
>
> Is this true? Doesn't make much sense to me :)
it
Thank you for your quick response.
I now realize that my friend was referring to "the strings commonly
displayed by Django". Naturally these are yet to have been translated to all
available languages but I'm sure we'll get there sme day :).
I'm fine in knowing that the i18n infrastructure in D
On Tue, May 3, 2011 at 11:59 AM, Uri Goldstein wrote:
> Thank you for your quick response.
>
> I now realize that my friend was referring to "the strings commonly
> displayed by Django". Naturally these are yet to have been translated to all
> available languages but I'm sure we'll get there sme d
On Tue, May 3, 2011 at 10:17 AM, doniyor wrote:
> Hey guys,
>
> i have got a simple but sometimes confusing issue:
>
> what is module and can i use it both in global urls.py and in local
> urls.py ? i wonder, which one is a wise way ?
>
> thanks much,
>
> doni
>
Your question makes no sense. A m
On Tue, 2011-05-03 at 03:59 -0700, Uri Goldstein wrote:
> I'm fine in knowing that the i18n infrastructure in Django can handle
> any
> available language - that was the crux of my question.
to be precise, there are two parts in localisation - one is the strings
in django itself and the other is
On Sat, Apr 30, 2011 at 11:16 AM, jsierra wrote:
> I figured it out, i chmod -R 775 the django directory located in
> /usr/local/lib/python2.7/dist-packages and was able to use the commands
> without sudo. Whether or not that's a good idea, I don't know, but it's my
> personal laptop anyway. Thank
I got data from the database in a page, I then merge it as string
substitution though another template and end up with double escaping because
the escaping is automatic, the only place I can try to de escape is the
2ndary template, I have tried
{% autoescape on %}{{ content }}{% endautoescape %}
Thank you Tom and KG.
I now see that my friend was right(!).
http://docs.djangoproject.com/en/1.3/topics/i18n/localization/#how-to-create-language-files
says: "Django does not support localizing your application into a locale for
which Django itself has not been translated."
The motivation
You need to set up the environment/locale for your server so that Python
will allow non-ascii characters in filenames. See:
http://docs.djangoproject.com/en/1.3/howto/deployment/modpython/#if-you-get-a-unicodeencodeerror
Karen
--
http://tracey.org/kmt/
--
You received this message because you a
On Tue, 3 May 2011 04:25:46 -0700 (PDT), MikeKJ wrote:
>
> I got data from the database in a page, I then merge it as string
> substitution though another template and end up with double escaping because
> the escaping is automatic, the only place I can try to de escape is
> the
Can you show us
Inserting, updating or deleting lots of records using the Django ORM?
Want better performance? Check out DSE!
It's free, released under the GPL licence. More information about the
possible performance gain can be seen here:
http://weholt.blogspot.com/2011/05/dse-uses-18-of-time-compared-to-django.
This would have been so useful on my last project. 14.4 Million records
took a couple of days with a single thread using the ORM. This would have
really sped things up.
Brian
On Tue, May 3, 2011 at 7:50 AM, Thomas Weholt wrote:
> Inserting, updating or deleting lots of records using the Django
On Tue, 2011-05-03 at 04:39 -0700, Uri Goldstein wrote:
> KG, in the workaround you mention as my second option, are you
> referring to
> the folder /conf/locale ? Is there where I will be putting my "new"
> languages?
yes - for example if the language you are adding is martian (with
abbreviati
Hehe ... yes, that's exactly the kind of things DSE is good at. 1.8%
of two days ... that's half an hour?? Mind you, I've so far not
inserted that many records, so if you ever get the chance to try that
out please let me know how it goes.
Thomas
On Tue, May 3, 2011 at 1:55 PM, Brian Bouterse wro
On Tue, May 3, 2011 at 12:39 PM, Uri Goldstein wrote:
> Thank you Tom and KG.
>
> I now see that my friend was right(!).
> http://docs.djangoproject.com/en/1.3/topics/i18n/localization/#how-to-create-language-files
> says: "Django does not support localizing your application into a locale for
> wh
Amazingly, I'm actually due to run a clean up script on a database with 32
million rows in the next couple of days...
Could you possibly answer:
- How mature is the code?
- Have you encountered any strange problems whilst using it?
- How many other people have used this in production (
In this instance the else is active as there is no incoming context
def get_pretty_smartpage_for_email(slug, context=None,
surrounding_template='email/pretty.html'):
"""
Renders a smartpage using the 'pretty' email template
returns the rendered content, with any passed-in context re
Hi Tom,
I definitely agree that having docs is good, reading and comprehending the
docs is better. Reading and comprehending the docs yourself you might have
noticed the following quote: "If you were to try this and Django supported
it, you would inevitably see a mixture of translated strings (
In this instance the else is active as there is no incoming context
def get_pretty_smartpage_for_email(slug, context=None,
surrounding_template='email/pretty.html'):
"""
Renders a smartpage using the 'pretty' email template
returns the rendered content, with any passed-in context ren
On Tue, May 3, 2011 at 1:43 PM, Uri Goldstein wrote:
> Hi Tom,
>
> I definitely agree that having docs is good, reading and comprehending the
> docs is better. Reading and comprehending the docs yourself you might have
> noticed the following quote: "If you were to try this and Django supported
>
On Tue, May 3, 2011 at 1:29 PM, MikeKJ wrote:
>
>
> In this instance the else is active as there is no incoming context
>
>
> def get_pretty_smartpage_for_email(slug, context=None,
> surrounding_template='email/pretty.html'):
> """
> Renders a smartpage using the 'pretty' email template
>
hi im very new in django so i try to use generic views like say in the doc and
dont work for me
this is my code
class DownloadDetailView( DetailView ):
model = Download.objects.all()
context_object_name = "download_list"
template_name = "download.html"
def get_co
I tried that too after the original post and that made no difference
spcontent is escaped HTML
and I thought that by marking it safe it wouldnt be escaped again in the
pretty.html template
Thx
Mike
spcontent is HTML?
from django.utils.safestring import mark_safe
context = Context({
In my apache enviroment settings I have already set that:
export LANG='en_US.UTF-8'
export LC_ALL='en_US.UTF-8'
But I still get the same error. Bedsides I am using wsgi no modpython.
Please, could somebody help me ???
Regards
Thanks in advance.
Ariel
On Tue, May 3, 2011 at 1:40 PM, Karen Trace
On Tue, May 3, 2011 at 3:18 PM, MikeKJ wrote:
>
> I tried that too after the original post and that made no difference
> spcontent is escaped HTML
> and I thought that by marking it safe it wouldnt be escaped again in the
> pretty.html template
>
> Thx
> Mike
>
If spcontent is escaped HTML (eg '<
Thanks for DSE!
I tried it earlier (version 0.6 I think). While I really liked the
speed improvement, there were 2 areas that did not suit me too well:
- error detection - I needed reliability more than speed and I was
not comfortable with situations like "the IntegrityErrror is somewhere
in
On Tue, 3 May 2011 07:18:24 -0700 (PDT), MikeKJ wrote:
>
> I tried that too after the original post and that made no difference
> spcontent is escaped HTML and I thought that by marking it safe it
> wouldnt be escaped again in the pretty.html template
That's correct. But is spcontent escaped onc
Does anyone know of any financial firms which use a Django framework?
I am preparing a proposal to build a web based solution for a
financial firm using Django, and some key players there would be much
more comfortable if I could point to some "serious" firms in finance
or similar industries which
On May 2, 4:14 pm, А. Р. <4d876...@gmail.com> wrote:
> > @csrf_exempt
> > Any ideas what I'm doing wrong?
>
> Try importing csrf_exempt at the top of your views.py:
> from django.views.decorators.csrf import csrf_exempt
Yes, I already did that - just omitted the declaration from the
message to save
On Tue, May 3, 2011 at 3:49 PM, Michael Radziej wrote:
> On Tue, 3 May 2011 07:18:24 -0700 (PDT), MikeKJ
> wrote:
>>
>> I tried that too after the original post and that made no difference
>> spcontent is escaped HTML and I thought that by marking it safe it
>> wouldnt be escaped again in the pr
'QuerySet' object has no attribute '_default_manager'
whats is the meaning of this error, i use django with python 2.7 there is any
issue in this python version should i change to any other python version?
On 3 May 2011 15:53, rpt...@reportlab.com wrote:
> Does anyone know of any financial firms which use a Django framework?
> I am preparing a proposal to build a web based solution for a
> financial firm using Django, and some key players there would be much
> more comfortable if I could point to so
It seems to me that anyone asking for precedent in their own industry is
actually interested in whether Django is considered safe from things
like the OWASP Top Ten. They're not interested enough to do the research
themselves, so they're going to take an "argument from authority" as
evidence
On Tue, May 3, 2011 at 4:23 PM, Shawn Milochik wrote:
>
> It seems to me that anyone asking for precedent in their own industry is
> actually interested in whether Django is considered safe from things like
> the OWASP Top Ten. They're not interested enough to do the research
> themselves, so th
Hello,
On Tuesday, May 3, 2011 5:08:28 PM UTC+3, Tom Evans wrote:
>
> On Tue, May 3, 2011 at 1:43 PM, Uri Goldstein wrote:
> > Hi Tom,
> >
> > I definitely agree that having docs is good, reading and comprehending
> the
> > docs is better. Reading and comprehending the docs yourself you might
>
MikeKJ wrote:
>
>
> data is stored as This is an exampleof the text
> content
>
> Is that escaped or unescaped, if it is unescaped then it is being escaped
> elsewhere before it gets to be rendered to the template
>
> Thx
>
That is unescaped html.. I believe
--
View this message in
data is stored as This is an exampleof the text
content
Is that escaped or unescaped, if it is unescaped then it is being escaped
elsewhere before it gets to be rendered to the template
Thx
--
View this message in context:
http://old.nabble.com/escaping-%28where-is-the-exit%29-tp31531487p315
Aviva (ex Norwich Union) use django they are a big player in insurance
markets
--
View this message in context:
http://old.nabble.com/Do-any-financial-firms-use-a-Django-framework--tp31533283p31534053.html
Sent from the django-users mailing list archive at Nabble.com.
--
You received this me
2011/5/3 Ariel <...@gmail.com>:
> In my apache enviroment settings I have already set that:
>
> export LANG='en_US.UTF-8'
> export LC_ALL='en_US.UTF-8'
>
> But I still get the same error. Bedsides I am using wsgi no modpython.
>
> Please, could somebody help me ???
> Regards
> Thanks in advance.
>
"Maybe what I need is something like OneToMany relationship"
You need a ManyToMany field: multiple people may have worked for the
same company previously, correct?
As for your original question, I would make a ModelForm for your
Person model (or whatever it is) and another one for your Company
mod
I've read the following and am still stuck and wondering what piece of this
puzzle
I am missing. If anyone has any ideas, please do comment!
http://docs.djangoproject.com/en/1.3/howto/deployment/modwsgi/
http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango
Using the Django 1.3 developme
On Tuesday, May 3, 2011 6:38:40 PM UTC+1, Jeff Blaine wrote:
>
> I've read the following and am still stuck and wondering what piece of this
> puzzle
> I am missing. If anyone has any ideas, please do comment!
>
> http://docs.djangoproject.com/en/1.3/howto/deployment/modwsgi/
>
> http://code.go
I know it's possible to overwrite the Django admin templates by
copying the templates to your local project. I want to modify the
"add user" template but cannot seem to figure out which template it
is. I want to create a button which will use APG to generate a random
password rather than typing i
You can check out the urls.py in admin and use that to find the view and
template.
http://code.djangoproject.com/browser/django/trunk/django/contrib/auth?order=name
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send em
On Tuesday, May 3, 2011 2:03:14 PM UTC-4, Daniel Roseman wrote:
>
> I don't know why you think this is a WSGI error. As you say, Apache is
> finding your WSGI app with no problem, and the error you get is a Django one
> - you simply don't seem to have any data in your Site table, whereas the
> D
Thanks! I will check out urls.py to find the template for that view
On May 3, 2:38 pm, Shawn Milochik wrote:
> You can check out the urls.py in admin and use that to find the view and
> template.
>
> http://code.djangoproject.com/browser/django/trunk/django/contrib/aut...
--
You received this m
On Tue, May 3, 2011 at 1:23 PM, Rich wrote:
> I know it's possible to overwrite the Django admin templates by
> copying the templates to your local project. I want to modify the
> "add user" template but cannot seem to figure out which template it
> is. I want to create a button which will use A
Thanks! Jacob. I will check it out.
Richard
On May 3, 2:50 pm, Jacob Kaplan-Moss wrote:
> On Tue, May 3, 2011 at 1:23 PM, Rich wrote:
> > I know it's possible to overwrite the Django admin templates by
> > copying the templates to your local project. I want to modify the
> > "add user" templa
For this, django-google-toolbar is invaluable. It tells you exactly which
templates were used in rendering some url.
Coupled with pycharm's "find file by name" feature (Ctrl+Shift+N) it names
really easy to jump to any name file.
Regards,
Juan Pablo
2011/5/3 Rich
> I know it's possible to o
Hello,
I wonder if there's an easy way to do the following (besides modifying
"contrib.admin.templates.admin.includes.fieldset.html"):
I have a model which uses django-workflows, so for each instance and every
user I can do: get_allowed_transitions(obj,user), and
obtain a list of Transition obj
Yes, only on the production enviroment.
Regards
2011/5/3 А. Р. <4d876...@gmail.com>
> 2011/5/3 Ariel <...@gmail.com>:
> > In my apache enviroment settings I have already set that:
> >
> > export LANG='en_US.UTF-8'
> > export LC_ALL='en_US.UTF-8'
> >
> > But I still get the same error. Bedsides I
> I have thought of many solutions to replace ldapdb. I came to
> conclusion than the cleanest, and most useful for the community, would
> be to implement a real db backend forldap. However, I have been told
> that it is an awfully big task !
FYI, I have refactored django-ldapdb so that it is now
Also, adding an example.com site (via /admin via dev server) doesn't change
the behavior. Same error. I'm not sure if that's what you were suggesting
to do or not.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send e
Ok, I learned about ModelAdmin.formfield_for_foreignkey, which let's me
access the current user.
What I can't find now is the instance asociated the db_field parameter.
El 3 de mayo de 2011 14:19, Juan Pablo Romero Méndez <
jpablo.rom...@gmail.com> escribió:
> Hello,
>
> I wonder if there's an
It looks you have unnecessary 'static' part in your template. MEDIA_ROOT
already contains 'static', so template should looks like this:
On Tue, May 3, 2011 at 12:21 PM, Pascal Moutia wrote:
> Hi there Django-users
>
> I'm suppose to link CSS to my base.html but i can't get it worked :s there
>
I'd certainly like to hear more about this, but I got it all working fine by
commenting out 'django.contrib.sites' from INSTALLED_APPS
That's obviously not the right solution...
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this g
Hi Jeff --
To make the admin work w/r/t sites, you'll need three things:
* An entry in the sites table.
* A setting SITE_ID set to the ID of the Site entry you'd like to use
(i.e. SITE_ID = 1).
* `django.contrib.sites` in your INSTALLED_APPS.
Check all three; I'll be you're missing one or two of
W dniu wtorek, 3 maja 2011, 21:34:28 UTC+2 użytkownik Ariel napisał:
>
> Yes, only on the production enviroment.
>
>
>
Try to create a file with UTF8 characters in its name, from your code.
Then you'll know if those Apache settings are in effect.
--
Tomasz Zielinski
pyconsultant.eu
--
You re
I have one Django model that points to another one with a OneToOneField,
sort of like this:
class Target(models.model):
# stuff
class Source(models.Model):
target = models.OneToOneField(Target)
Sometimes, given an object that is an instance of Target, I want to
navigate to its Source and
Apparently Django's ModelAdmin/ModelForm doesn't allow you to use
save_m2m() if there's an intermediate through table for a
ManyToManyField.
If I have a model such as:
class MyModel(models.Model):
created = models.DateTimeField()
many = models.ManyToManyField("RelatedModel",
t
django-google-toolbar ? or django-debug-toolbar ?
I am asking because I wasn't able to find anything about the first
one.
Tks.
Roberto
On May 3, 4:10 pm, Juan Pablo Romero Méndez
wrote:
> For this, django-google-toolbar is invaluable. It tells you exactly which
> templates were used in renderi
On 05/03/2011 05:39 PM, roberto wrote:
django-google-toolbar ? or django-debug-toolbar ?
The latter. The former must have been a typo.
https://github.com/robhudson/django-debug-toolbar
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To pos
Hi,
Just posted a new blog about more realistic performance of DSE against
a real database. Head over to http://weholt.blogspot.com/ to read it.
Thanks for your feedback!
Regards,
Thomas
On Tue, May 3, 2011 at 1:55 PM, Brian Bouterse wrote:
> This would have been so useful on my last project.
I want to have foreign key in form displayed as hidden field. I will
be using javascript to populate this field.
Model is defined as:
contactid = models.ForeignKey(Contact, blank = True, null = True,
on_delete = models.PROTECT)
I tried to define form field as:
contactid = ModelChoiceField(query
On Tuesday, May 3, 2011 4:42:25 PM UTC-4, Jacob Kaplan-Moss wrote:
>
> Hi Jeff --
>
> To make the admin work w/r/t sites, you'll need three things:
>
> * An entry in the sites table.
> * A setting SITE_ID set to the ID of the Site entry you'd like to use
> (i.e. SITE_ID = 1).
> * `django.contrib.si
I have added (required=False) to field:
> contactid = ModelChoiceField(queryset=Contact.objects.all(),
> widget=HiddenInput())
>
so now I have:
contactid = ModelChoiceField(queryset=Contact.objects.all(),
widget=HiddenInput(), required=False)
and it seems to be working. To me this looks as bug bu
On Tue, May 3, 2011 at 5:07 PM, Jeff Blaine wrote:
> Thanks Jacob -- does the site entry in the database have to be anything
> specific? We don't really use that. Just put any old thing in there via
> Admin in the development server?
Well, if you want all the parts of the admin to work correctl
Foreign Key won't generate the form from model this way I told
I'm trying to escape from use of extensive javascript
On Tue, May 3, 2011 at 5:46 AM, Daniel Roseman wrote:
> On Tuesday, 3 May 2011 02:37:56 UTC+1, daniel.franca wrote:
>>
>> anyone?
>> Maybe what I need is something like OneToMany r
Thanks, I guess this is exactly what I need, I'look at that =)
PS: The Company form was just an example, I've some cases of this at my
code.
On Tue, May 3, 2011 at 2:25 PM, Bryan wrote:
> "Maybe what I need is something like OneToMany relationship"
> You need a ManyToMany field: multiple people
On Tue, May 3, 2011 at 10:53 PM, rpt...@reportlab.com
wrote:
> Does anyone know of any financial firms which use a Django framework?
> I am preparing a proposal to build a web based solution for a
> financial firm using Django, and some key players there would be much
> more comfortable if I could
On Tuesday, May 3, 2011 6:33:20 PM UTC-4, Jacob Kaplan-Moss wrote:
>
> On Tue, May 3, 2011 at 5:07 PM, Jeff Blaine wrote:
> > Thanks Jacob -- does the site entry in the database have to be anything
> > specific? We don't really use that. Just put any old thing in there via
> > Admin in the devel
On Tue, May 3, 2011 at 8:11 AM, Tom Evans wrote:
> If you require your site
> to be in Mongolian, it can be in Mongolian, even though Django does
> not itself have a Mongolian translation,
>
Need a better example. Django has had a Mongolian translation for a year
now: http://code.djangoproject.c
I will definitely be using this next time. Nice post.
Brian
On Tue, May 3, 2011 at 5:50 PM, Thomas Weholt wrote:
> Hi,
>
> Just posted a new blog about more realistic performance of DSE against
> a real database. Head over to http://weholt.blogspot.com/ to read it.
>
> Thanks for your feedback!
i have the django admin site enabled and it work at perfect with debug flag set
to true, but when i change to false throwme the page not found template in the
edit pages of any module in the admin interface.
any help
-
Don't know whether this is relevant or not but the Python Software
Foundation has just decided to establish a facility that allows speed
comparison of different Python releases. The thinking behind this is (at
least) twofold:
1) People will more easily be able to determine which is the best Python
On 2011-05-03, at 2:05 PM, Seth Gordon wrote:
> I get an exception, complaining that Target.source does not allow
> null values.
You'll probably want to allow null values on your OneToOne field then:
http://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.Field.null
--
Andy Mc
On 2011-05-03, at 2:05 PM, Seth Gordon wrote:
> I get an exception, complaining that Target.source does not allow
> null values.
You'll probably want to allow null values on your OneToOne field then:
http://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.Field.null
--
Andy Mc
are you using it on any webserver or on django management server (manage.py
runserver) at some port??
it can happen if in any of your urls.py you have mentioned something
specefic to DEBUG variable. But its quite a strage behaviour.
more inputs on your installation or how you are running will be
ok it was stupid question, i wanted to ask some other thing
On May 3, 1:09 pm, Tom Evans wrote:
> On Tue, May 3, 2011 at 10:17 AM, doniyor wrote:
> > Hey guys,
>
> > i have got a simple but sometimes confusing issue:
>
> > what is module and can i use it both in global urls.py and in local
> >
On Tue, 2011-05-03 at 09:15 -0700, Uri Goldstein wrote:
> If the issue cannot be resolved then it might be beneficial to explain
> it
> better:
>
>1. If the issue is driven by technical difficulty stemming from
> xgettext
>then don't excuse it as an attempt to prevent "a mixture of
> tra
Or try to change the name of the file when uploading the image/file.
That's how solved it. Had couple problems with it also in development
enviroment and now it's working ok. Haven't tested yet in production,
but it should work too.
Radovan
On 3. Máj, 22:56 h., Tomasz Zieliński
wrote:
> W dniu w
87 matches
Mail list logo