Daniel Roseman escribió:
> On Jan 12, 5:38 pm, Matias Surdi wrote:
>> Hi,
>>
>> I've two models related by a ForeignKey field.
>>
>> I'd like to have the possibility of adding child objects (side "One" of
>> the relation) from the admin interface of the parent ("Many" side of the
>> relation).
>>
My favourite solution for this task is the following:
1) you create the "simple" form with the file upload and submit it
2) in submit handler you parse the file and create the "preview"
formset (is inline formset, form example) filling it with the parsed
data. If the file cannot be parsed, you can
>
> That's strange, are you succesfully using another component of Django
> i18n infrastructure in the same application?. De you have USE_I18N set to
> True in the settings file you are using?
>
Yes. The use_i18n is set to true and I've successfully translated most
of my pages, created the .po fi
On Jan 13, 8:26 am, Matias Surdi wrote:
> hmm... Not really... from your point of view, think about this: I want
> to edit the children from the parent admin view, and *not* assign
> parents to children from children's admin view
>
> Do you see? the relation is the same, but from the other s
On Jan 13, 2:53 am, Adam Tucker wrote:
> I am working on a site where a page is loaded which replaces part of itself
> with another view using a simple ajax replacement (the load funciton in
> jQuery.) The view that is called iterates a loop anywhere from 3 to 10 times
> before getting to a rende
This doesn't seem to work:
auto_open_choices = forms.MultipleChoiceField(choices=( ('google',
'Google'), ('msn', 'MSN'), ('yahoo', 'Yahoo')), required=False,
initial=['google'])
>From what i read in the discussions here it should...
What am i doing wrong?
--~--~-~--~~~
Hello everybody,
This snippet is working fine, i used this instead of adding custom
arguments when overloading each of my ModelForm's constructore to keep
the same __init__() signature.
http://www.djangosnippets.org/snippets/1272/
Currently refactoring, it makes sense to use a factory in my case
Fast answer: No
Better awswer: No, but you can get one on djangosnippets.org
On Mon, Jan 12, 2009 at 2:44 PM, rabbi wrote:
>
> is there a greater than method in the template language?
> >
>
--~--~-~--~~~---~--~~
You received this message because you are subscrib
Thank you Malcolm,
it's not a problem to write customized extensions but I wanted to be
sure that it's the only way to do it.
Regards,
Giorgio
On Jan 13, 1:58 am, Malcolm Tredinnick
wrote:
> On Mon, 2009-01-12 at 02:48 -0800, uber.ubiwanken...@gmail.com wrote:
> > Hi all,
> > I have 3 models: m
Hello everyone,
I have written a template and view to allow users to change their password.
As soon as it hits the if pForm.is_valid, I get an error that there is a
required field (username) missing - I don't understand why it is asking
for this field, as I have not created it, but am assigning
Leslie Maclachlan wrote:
> Hello everyone,
>
> I have written a template and view to allow users to change their password.
> As soon as it hits the if pForm.is_valid, I get an error that there is a
> required field (username) missing - I don't understand why it is asking
> for this field, as I h
On Tue, Jan 13, 2009 at 11:57 AM, James PIC wrote:
> That's what i'm actually trying to do:
>
> # todo : get a more descriptive FC prefix than "jpic"
> class JpicModelFormMetaclass(ModelFormMetaclass):
>"""
>Inherit from this, then use this new keyword argument
>'jpic_field_options' w
FYI,
http://www.djangosnippets.org/snippets/12/
On Tue, Jan 13, 2009 at 11:03 AM, Matías Costa wrote:
>
> Fast answer: No
>
> Better awswer: No, but you can get one on djangosnippets.org
>
> On Mon, Jan 12, 2009 at 2:44 PM, rabbi wrote:
> >
> > is there a greater than method in the template lan
Thank you very much Roland - it is now working as required!
Best regards,
Leslie
Roland van Laar wrote:
> Leslie Maclachlan wrote:
>
>> Hello everyone,
>>
>> I have written a template and view to allow users to change their password.
>> As soon as it hits the if pForm.is_valid, I get an error
You know, its really sad to see the disdain like this thrust upon a
newbie. We all know you are superior, and that your understanding of
Django and python is massive, and we bow to your intellect, but there
are hundreds if not thousands of pages of reading, and we newbs are
sorry if we don't read
Is it dynamic data that needs to be accessed in real-time? If not, you
could cache it in your own database (using a cron job), so that the
view doesn't have to take too long.
On Jan 13, 10:53 am, Adam Tucker wrote:
> I am working on a site where a page is loaded which replaces part of itself
> w
Advice: Think twice before adding comparisons in the templates.
Conditions and all Bussines Rules(tm) *must* be in the model or the
view.
Time shows this advice punching your face.
On Tue, Jan 13, 2009 at 12:54 PM, Mengsong Chen wrote:
> FYI,
>
> http://www.djangosnippets.org/snippets/12/
>
> O
can anyone help me on this issue?
--~--~-~--~~~---~--~~
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 think so, but you can do without it. Use {% ifequal %} and
initialize your variable in your views.
On Jan 12, 3:44 pm, rabbi wrote:
> is there a greater than method in the template language?
--~--~-~--~~~---~--~~
You received this message because you are
Hi,
Can anyone help me get some extra info in settings.py?
I have a domain that I want to point to various different Django apps
depending on the 'hostname' portion of the domain name.
***.mydomain.com has (for ***):
www
comics
stuff
I want that first portion (www, comics, stuff) available in
Hi,
I'm trying to put a tabular inline for an admin form, but I'm getting
this:
http://picasaweb.google.com/mathieu.longtin/Screenshots#5290805795328611874
The ID field is overlapping the name of the entry.
I also tried to remove the id field from the form, since it shouldn't
be edited, but I
On 9 ene, 19:18, Graham Dumpleton wrote:
> You thus perhaps should not be doing video conversion within the same
> process, but executing a separate application to perform the
> conversion. Even then, you may need a queueing system or otherwise
> some way of restricting how many conversions can o
On 9 ene, 19:18, Graham Dumpleton wrote:
> You thus perhaps should not be doing video conversion within the same
> process, but executing a separate application to perform the
> conversion. Even then, you may need a queueing system or otherwise
> some way of restricting how many conversions can o
On Jan 13, 1:51 am, Malcolm Tredinnick
wrote:
> [...]
>
> Look, if you aren't going to be moving the applications around, the
> imports in the tutorial aren't horrible. It's the beginner's tutorial.
That's a big if, regarding that tutorial does stress decoupling
between project and apps on seve
My error is not being able to get the ID passed to the next
template.
The code:
http://dpaste.com/108580/
Thank you,
May
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this gr
Hello,
The following view works well with SQLite but since I switched to
PostgreSQL 8.3, I have the following error :
ValueError at /start/
The view start.views.index didn't return an HttpResponse object.
Views is :
def index(request):
"""
Try to see if there is a default theme to d
On Jan 13, 12:17 pm, Nicolas Steinmetz wrote:
> Hello,
>
> The following view works well with SQLite but since I switched to
> PostgreSQL 8.3, I have the following error :
>
> ValueError at /start/
> The view start.views.index didn't return an HttpResponse object.
>
> Views is :
>
> def index(req
We do something like this with middleware in the Carbon Account[1]:
http://code.thecarbonaccount.com/trac/browser/trunk/calculator/middleware/autobrand.py
Hope this helps
Tom
[1] http://www.thecarbonaccount.com
On Jan 13, 3:10 pm, Donn wrote:
> Hi,
> Can anyone help me get some extra info in
alex.gay...@gmail.com a écrit :
> You're problem is you are testing identity with `is` when you want to
> test equality, which you should do with ==, this is likely causing the
> condition expect to pass to fail, and therefore your function returns
> None, which plainly isn't an HttpResponse obje
Hello,
I'm new to DJango, but I'm already lovin' it. I have a few questions
however - can someone offer any guidance, please?
Is the possible following in a template:
{ inherits ... }
{% for item in items %}
{% block A %}
some text here
{% endblock A %}
{% block B %}
s
On Tuesday, 13 January 2009 19:28:01 Tom Dyson wrote:
> We do something like this with middleware in the Carbon Account[1]:
I have not used middleware yet, so will look into it. I am not sure if it can
supply request.META *within* settings.py though.
I want to set certain variables depending on
Hi everyone,
I have a login form on every page and want to leverage the
AuthenticationForm from contrib.auth. So, I thought I would have a
middleware tier to process the request and check for a GET or POST and
create the appropriate form, either bound or un-bound. Here is my
middleware:
from dja
I've started creating a photo blog project to get familiar with Python
and Django. I'm using Python 2.6.1 and Django 1.0.2. I'm working on
the models and the administration first, before I tackle the front end
side of the site. I have everything working fine, for the exception of
an image upload f
I am getting a module load error but I can't tell what is causing it.
Running `./django-admin.py validate --verbosity 2` returns "Error: No
module named config".
I have no idea what is trying to load this module and can't find any
reference to it after doing several greps. How can I find out mor
I'm attempting to install diamanda forum, and so far things are
looking promising.
however, i am receiving the above error, in the subject, at line 140
of dimandas.pages.feedupdate
specifically, the line is: 'date': date[:10] located within a Context.
This occurs on save of a new topic. w/o the
replace in your url.py:
(r'^(?P\d+)$/commodity_detail/', 'commodity'),
by
(r'^(?P\d+)/commodity_detail/$', 'commodity'),
this _should_ work
2009/1/14 May :
>
> My error is not being able to get the ID passed to the next
> template.
>
> The code:
>
> http://dpaste.com/108580/
>
> Thank you,
>
On Jan 13, 12:06 pm, Ty wrote:
> I've started creating a photo blog project to get familiar with Python
> and Django. I'm using Python 2.6.1 and Django 1.0.2. I'm working on
> the models and the administration first, before I tackle the front end
> side of the site. I have everything working fine
Thanks for the help, much appreciated.
On Jan 13, 1:28 pm, Brian Neal wrote:
> On Jan 13, 12:06 pm, Ty wrote:
>
>
>
> > I've started creating a photo blog project to get familiar with Python
> > and Django. I'm using Python 2.6.1 and Django 1.0.2. I'm working on
> > the models and the administr
Hi,
I want to submit date and time data (upto microsecond) to the DB
(postgres) in Django - Field - DateTimeField.
But, during validating the form, I got the error 'Enter a valid
date/time'.
I checked the Django code and it looks as follows:
DEFAULT_DATETIME_INPUT_FORMATS = (
'%Y-%m-
Hello,
I tried the URL and still received this error:
Page not found (404)
Request Method: POST
Request URL:http://127.0.0.1:8000/fsafety//commodity_detail/
I think now that the ID is not getting passed to this line:
Thank you for any help you can give.
May
On Jan 13, 10:25 am, S
I've been working on understanding "agile" programming practices as
well as setting up a proper development/testing/release environment.
There are several good resources out there for getting these things
configured for Python projects in general but nothing really specific
to Django.
What has w
On Jan 12, 3:05 pm, felix wrote:
> I'm running 3 sites on a shared db right now.
>
> I would say your option 2
Thanks for the feedback Felix. My initial concern was that two
projects sharing a database would not have any awareness of one
another and that things could potentially get tangled up i
Hi everyone. I have checked and re-checked my path for my templates
in the settings file. I have also confirmed at my template is sitting
in the right directory: I'm trying to do a direct to template in my
urls.py file as follows:
from django.conf.urls.defaults import *
urlpatterns = pattern
2009/1/14 May :
>
> Hello,
>
> I tried the URL and still received this error:
> Page not found (404)
> Request Method: POST
> Request URL:http://127.0.0.1:8000/fsafety//commodity_detail/
Yep... sorry i just checked for the url didnt read the form part in detail :p
> I think now that
Hi May,
Try to debug in shell, this will give you more information.
Lets print the 'p' value after having it set with get_object_or_404 ...
And I think you are a bit messing with which method to call. You are
generating the page with the form that contains errors. So lets check
your index() me
On Tue, Jan 13, 2009 at 12:31 PM, dr.mob...@googlemail.com <
dr.mob...@googlemail.com> wrote:
>
> Hello,
> I'm new to DJango, but I'm already lovin' it. I have a few questions
> however - can someone offer any guidance, please?
>
> Is the possible following in a template:
> { inherits ... }
>
I t
I've just upgraded some code to Django 1.0 and the caching stopped working.
I have found a fix but I don't understand what's happening so if
anyone can explain, I'd be grateful.
My code used to look somthing like this (simplified for clearer reading)
cached=cache.get(key)
if cached:
list=pi
Just tossing this out, but it might be worth checking to see what
manage.py or django-admin.py reports as the version of Django
installed:
http://docs.djangoproject.com/en/dev/ref/django-admin/#determining-the-version
At least then you'll be certain whether it's 0.96, 0.97svn or 1.0.
On Jan 1
The timeout is happening on the nginx that is hosting static content.
I'm not entirely sure why, but I have figured out a way to properly
handle the view. Instead of having ajax replace part of the page I'm
just going to have it check a session key that I will have the loop
update. I probably sh
It doesn't need to be accessed in real-time, so you're totally right.
I'm going to try a session key set by the loop as it iterates. That
way ajax will know when the final iteration is done. Thanks!
On Jan 13, 8:23 am, Roy wrote:
> Is it dynamic data that needs to be accessed in real-time? If n
Si me serviria para formularios, me podrias explicar como ?? o alguna
ayuda
Gracias
--~--~-~--~~~---~--~~
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
I just want to use same kind of widget like the one used while I edit
User permissions in /admin/auth/user for my own model.
My model has a "ManyToManyField" relationship (with
through='sometable' specified).
The widget is probably "FilteredSelectMultiple", but I just can't find
the way to speci
Hello All,
Thank you for the suggestions. I am getting closer to figuring it
out. Now my error is this:
commodity() takes exactly 2 arguments (1 given)
My URL is:
(r'^commodity/$', 'commodity'),
The Form statement:
Thank you!
May
On Jan 13, 10:56 am, Wai Yi Leung wrote:
> Hi May,
>
Turns out I had my session backend specified wrong, so my sessions
were never being saved. However, I did run into a new problem - it
doesn't seem that a form object can be put into session?
Can anyone verify that this is true? When trying to stuff the form
object into session, I ran into picklin
On 13 Jan 2009, at 12:05, BabySnakes wrote:
> I just want to use same kind of widget like the one used while I edit
> User permissions in /admin/auth/user for my own model.
Add filter_horizontal to the admin class for that model, specifying
your field name.
http://docs.djangoproject.com/en/dev
You should rewite the method:
def commodity(request, commodity_id):
p = get_object_or_404(Commodity, pk=commodity_id)
return render_to_response('fsafety/commodity_detail.html',
{'commodity': p})
to
def commodity(request):
commodity_id = request.POST['commodity'] # this variable com
Hello,
I wrote a special kind of blog- or news application. One of the
specialities of this application is, that authors are able to make
entries visible/invisible by a date range or by a simple switch to
hide the entry. This works well. But (the authors are not supposed to
use the admin interfac
Hi!
I want to add tinyMCE to my project's admin site. I downloaded the latest
version of the editor, added the js/tiny_mce to my media files
Added following to my urls.py
from django.conf.urls.defaults import *
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
On Jan 13, 3:43 pm, "Oleg Oltar" wrote:
> Hi!
>
> I want to add tinyMCE to my project's admin site.
You didn't list any admin.py code. Check out the docs on the admin
interface:
http://docs.djangoproject.com/en/dev/ref/contrib/admin/#module-django.contrib.admin
After you read through that, pay
Just wonder if anyone have achieved such a temporary user model to allow
unregistered user to use some features,but will clean up the data after the
session completed if the user is not going to register.
Thanks in advanced.
M
--~--~-~--~~~---~--~~
You received th
Ah, I see - thanks Karen - your explanation clarifies/(puts to rest) a
number of points I had in my head when experimenting with the
templates! Reading it again now, I think the thing with super, could
do with being explained a bit differently (putting a for loop in was
irrelevant, and misleading)
An interesting set of questions, and one I've been thinking about myself.
So here's my tuppence-worth.
Background: I've written a set of 3 websites, which I've developed
incrementally, some shared code, some separate - done for my own
benefit, no external customer, so I can change things as I se
Thanks .
I joust found it in the train on the way home :)
On 13 jan, 21:57, Andy McKay wrote:
> On 13 Jan 2009, at 12:05, BabySnakes wrote:
>
> > I just want to use same kind of widget like the one used while I edit
> > User permissions in /admin/auth/user for my own model.
>
> Add f
Hi all,
I have a few models classes that refer to the logged in user (such as
NoticeBoardPost), at the moment I am using the "username" to record
who created each object. Is this the right way of doing it in Django?
Or can I refer to models.User as a ForeignKey?
Thanks.
--
"The secret impress
Thanks, formsets was the answers, and smartly enough, they didn't name
all the fields the exact same name, but reassemble them afterwards.
On Jan 12, 9:04 am, Jeff FW wrote:
> Mark,
>
> You should really use Forms and FormSets--they'll make this problem
> essentially go away.
>
> http://docs.dja
Hi All,
Is there a way to "link" 2 form fields or use a create a MultiWidget
consisting of 2 fields so they are logically displayed together? I
have a search form which asks the user for a date range to search and
I am trying to figure out the best way to display them. The obvious
option would
Is there a way to force a fixture to be loaded first
when running manage.py test?
I'd like to load a content_types.json fixture immediately
before any other fixtures are loaded.
This might fix some of the vexing problems with using
content_types and tests.
Anyone know if this is possible?
Th
On Tue, 2009-01-13 at 02:12 -0800, Thierry wrote:
> This doesn't seem to work:
> auto_open_choices = forms.MultipleChoiceField(choices=( ('google',
> 'Google'), ('msn', 'MSN'), ('yahoo', 'Yahoo')), required=False,
> initial=['google'])
>
> From what i read in the discussions here it should...
> W
On Tue, 2009-01-13 at 08:53 -0800, dahpgjgamgan wrote:
[...]
> > People experienced in Python realise that import statements are
> > flexible, so what's written in the tutorial is only a guide. People
> > needing to follow every line of code in the tutorial and just learning
> > Python don't need
this was for me also a slight trick to learn. I got more from blog posts
than the docs
(and I love the django docs)
the trick is that your PYTHONPATH (and don't forget the python path of your
deployment server)
should point to the dir above your project dir and the dir above your apps
dir.
I ha
On Tue, Jan 13, 2009 at 7:45 PM, mguthrie wrote:
>
> Revision Control: How do you layout your development repository? I'm
> using Subversion for my setup but would be interested in hearing what
> else others are using (Mercurial, Bazaar, Git, etc)
I have django and third party apps checked ou
I need some extra fields on User and my first assumption was I could
subclass user (yes, I am a newbie). Then I read the docs and they talk
about using UserProfile. This article (http://scottbarnham.com/blog/
2008/08/21/extending-the-django-user-model-with-inheritance/
#comment-621) seems to say t
Got it.
Should be models.DateTimeField(blank=True, null=True, default=None)
I shouldn't use default = "" on a DateTimeField.
On Jan 12, 9:29 pm, "Cortland Klein" wrote:
> Update: It looks like it's a DateTimeField (lastsenttotranslation) that's
> not included in the form, hence the form is_val
On Wed, Jan 14, 2009 at 9:34 AM, Giovannetti, Mark
wrote:
>
> Is there a way to force a fixture to be loaded first
> when running manage.py test?
>
> I'd like to load a content_types.json fixture immediately
> before any other fixtures are loaded.
>
> This might fix some of the vexing problems wi
Hello,
I have been using django-oauth and am getting the below error using
this code http://dpaste.com/108808/
I get this when running the dpaste code in the python shell.
Traceback (most recent call last):
File "", line 1, in
File "", line 7, in get_unauthorised_request_token
File "/usr/
On Tue, Jan 13, 2009 at 1:21 PM, jhill10110 wrote:
>
> I am getting a module load error but I can't tell what is causing it.
>
> Running `./django-admin.py validate --verbosity 2` returns "Error: No
> module named config".
>
> I have no idea what is trying to load this module and can't find any
>
On Tue, Jan 13, 2009 at 9:14 PM, ldm999 wrote:
>
> I need some extra fields on User and my first assumption was I could
> subclass user (yes, I am a newbie). Then I read the docs and they talk
> about using UserProfile. This article (http://scottbarnham.com/blog/
> 2008/08/21/extending-the-django
On Tue, 2009-01-13 at 18:54 -0800, Chris wrote:
> Hello,
>
> I have been using django-oauth and am getting the below error using
> this code http://dpaste.com/108808/
>
> I get this when running the dpaste code in the python shell.
> Traceback (most recent call last):
> File "", line 1, in
>
I've made a dictionary site that relies on a text file to look up
entries. The function that calls it works fine in the shell or in the
development server, but when I try to use it with mod_python/apache it
gives me an IOError errno 2, No such file or directory. Why the
difference? Is there a bett
On Jan 14, 2:51 pm, OwenK wrote:
> I've made a dictionary site that relies on a text file to look up
> entries. The function that calls it works fine in the shell or in the
> development server, but when I try to use it with mod_python/apache it
> gives me an IOError errno 2, No such file or di
On Tue, 2009-01-13 at 19:51 -0800, OwenK wrote:
> I've made a dictionary site that relies on a text file to look up
> entries. The function that calls it works fine in the shell or in the
> development server, but when I try to use it with mod_python/apache it
> gives me an IOError errno 2, No suc
Is anyone hosting a Django site on MediaTemple's GridService without
using the Django container? If so, e-mail me off list.
Daniel Lathrop
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post
Well I plugged in my variables into the example client and it still
seems to break on the same segment:
token = client.fetch_request_token(oauth_request)
I am using code from this repository to handle the server sided
portion:
http://code.larlet.fr/django-oauth/
Perhaps there is an issue with thi
The paths weren't absolute AND the permissions were wrong. Both good
lessons. Thanks!
On Jan 13, 10:58 pm, Malcolm Tredinnick
wrote:
> On Tue, 2009-01-13 at 19:51 -0800, OwenK wrote:
> > I've made a dictionary site that relies on a text file to look up
> > entries. The function that calls it wor
Hi,
I was planning to use Django to create a webapp that runs several
Python applications in parallel with user input data. The applications
take a while to run (>2 minutes) when they work in parallel, so I want
to make a page that says "Processing..." and show the output of each
of the applicati
I'm importing old projects into a new django install (same version, no
problems there), and it's seems to be boiling down to a mysql (running
with the same version of mysql) issue. When i try to visit the main
page of a specific project i get an error like:
OperationalError at /
(1017, "Can't fi
One possible way seems to override the render_change_form in
AdminClass as pointed in this post:
http://groups.google.com/group/django-users/browse_thread/thread/94bdf5d7eeefc99b/9cbdb25672387c33?lnk=gst&q=select+foreign+key+list#9cbdb25672387c33
On Jan 12, 8:34 pm, GuyBowden wrote:
> Hi,
>
> I
Ok, I read the doc...But not sure if I done everything correctly, as the
tinyMCE is still not in my admin
So what I've done:
beryl:TECHNOBUD oleg$ cp
/Users/oleg/src/django1.0/django/contrib/admin/templates/admin/change_form.html
./TEMPLATES/admin/
Then I edited copied file and added:
tin
Victor wrote:
> Hi,
>
> I was planning to use Django to create a webapp that runs several
> Python applications in parallel with user input data. The applications
> take a while to run (>2 minutes) when they work in parallel, so I want
> to make a page that says "Processing..." and show the output
89 matches
Mail list logo