Update: It looks like it's a DateTimeField (lastsenttotranslation) that's
not included in the form, hence the form is_valid() but the actual save()
fails. But I'm still confused why...
In models.py, its defined as:
> lastsenttotranslation = models.DateTimeField(_("Last sent to Translation"),
>
On Mon, Jan 12, 2009 at 10:42 PM, Peter wrote:
>
> Hello,
>
> I'm trying to build an application with django that supports data
> import from a CSV. The problem that I'm having is validating the data.
> I know how to validate data that comes from a form.
>
> However, in my
Hello,
I'm trying to build an application with django that supports data
import from a CSV. The problem that I'm having is validating the data.
I know how to validate data that comes from a form.
However, in my case the user is using a CSV file for imput instead a
form. Is there a way that I
On Mon, Jan 12, 2009 at 10:54 PM, Malcolm Tredinnick
wrote:
>
> On Sun, 2009-01-11 at 19:27 -0800, stryderjzw wrote:
>> Hi,
>>
>> Here's part of my code:
>>
>> class NewAssignmentFormPreview(FormPreview):
>>
>> def done(self, request, form):
>> assignment =
On Mon, Jan 12, 2009 at 10:07 PM, frank Shi wrote:
>
> how do cancel django 0.96 template render automatically escape?
> 0.96 after version can use mark_safe() function..etc..,but i can't
> update new version.
IIRC, 0.96 didn't have any concept of escaping in the sense
how do cancel django 0.96 template render automatically escape?
0.96 after version can use mark_safe() function..etc..,but i can't
update new version.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users"
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 render_to_response. Unfortunately, the view pulls
Hi. I'm getting the following ValidationError in a ModelForm that's
returning True for the form's is_valid() function but is throwing this
ValidationError when the form's save() function is being called.
Running save(commit=False).save() has no effect.
This view is used to both create new
On Mon, 2009-01-12 at 02:48 -0800, uber.ubiwanken...@gmail.com wrote:
> Hi all,
> I have 3 models: model1, model2, model3.
>
> model2 depends on model1 and model3 depends on model2 (depend means
> that have a foreignkey)
>
> In the admin interface I don't want to include model3 in the same page
On Sun, 2009-01-11 at 19:27 -0800, stryderjzw wrote:
> Hi,
>
> Here's part of my code:
>
> class NewAssignmentFormPreview(FormPreview):
>
> def done(self, request, form):
> assignment = form.save(commit=False)
> assignment.save()
>
> ...
>
> return
On Sun, 2009-01-11 at 16:53 -0800, Greg Aumann wrote:
[...]
> I am wondering why the tutorial teaches this bad practice when there
> is so much emphasis in Django on reusable apps.
When you could instead be wondering if it really is truly bad practice
or just alternative practice and a
On Jan 12, 6:45 pm, Brian Neal wrote:
> On Jan 12, 4:58 pm, jazztpt wrote:
> [...]
>
> > Brian, you understood me perfectly -- when I was asking about a tag, I
> > was simply asking if django used a shortcut the way rails does, and
> > {{MEDIA_URL}} is
On Jan 12, 4:58 pm, jazztpt wrote:
[...]
>
> Brian, you understood me perfectly -- when I was asking about a tag, I
> was simply asking if django used a shortcut the way rails does, and
> {{MEDIA_URL}} is what I was looking for. Duh. :P
>
> However, {{MEDIA_URL}}
On Mon, Jan 12, 2009 at 6:42 PM, Robocop wrote:
>
> Well i definitely have code written for .96 (i may be running .96 or
> a .97 svn checkout). My problem here is i'm trying to replicate the
> old environment (i.e. i have .96 installed currently), yet something
> is
Well i definitely have code written for .96 (i may be running .96 or
a .97 svn checkout). My problem here is i'm trying to replicate the
old environment (i.e. i have .96 installed currently), yet something
is going haywire. So as of right now, there is no issue with porting
to 1.0, however if
On Mon, Jan 12, 2009 at 6:20 PM, Robocop wrote:
>
> Esteemed colleagues:
>
> I've just built a small web server running django .97, with python
> 2.4, mysql-python-1.2, and mod_python 3.2.8.
There was never a Django 0.97 release. Anything that reports itself as
Esteemed colleagues:
I've just built a small web server running django .97, with python
2.4, mysql-python-1.2, and mod_python 3.2.8. I've tested and can
start new django applications just fine (haven't fleshed any out to do
further testing), so it looks like the django install is properly
I'm running 3 sites on a shared db right now.
I would say your option 2
I keep most of the functionality in the apps (shared),
each of those apps have views, so the views are certainly shared / not
duplicated
in my case each site is quite distinct and has specific models and views on
top of the
Thanks for the great help.
Daniel, good eye - I copied & pasted without looking too carefully,
and was trying to access the folder one level up. Once I changed
that, I can now access the file as David suggested, directly via the
url: http://localhost:8000/site_media/autodiag_title.jpg
Brian,
We're setting up both an intranet and a public site that will sit on
top of the same database. The two sites will share much content, but
will have different designs, different media, and different overall
purposes. There won't be much in the way of truly shared views,
despite the need for shared
On Jan 12, 8:59 pm, jazztpt wrote:
> Nope, that's not the problem. I had read that page, and another that
> suggested a slightly different syntax for the urlpatterns
> (fromhttp://rob.cogit8.org/blog). Sorry that I forgot to mention that I
> had already put Rob's
On 12 jan, 10:56, Jo wrote:
> On Jan 12, 10:22 am, bruno desthuilliers
>
>
>
> wrote:
> > On 11 jan, 18:46, Jo wrote:
>
> > > While building a website using template inheritance one usually does
> > > the following:
>
Thank you Ashish, Malcolm, and Jon for your thorough and insightful
answers.
On Jan 11, 2009, at 9:39 AM, Jon Loyens wrote:
>
> Django is starting to gain more traction and I do believe we'll start
> to see a bit more of a hockey stick effect on it's adoption over the
> coming months. 1.0
On Jan 12, 2:59 pm, jazztpt wrote:
>
> That page in the docs doesn't say anything about how to call this from
> the view. Are these files automatically accessed by an tag? I
> didn't see any special image tag (like the image_tag in rails) in the
> template tags or in
I still really like WingIDE (in VIM mode). If you think it's worth
throwing some cash down, I don't think it can be beat.
-Wes
On Jan 6, 3:32 pm, Ovnicraft wrote:
> 2009/1/6 Berco Beute
>
>
>
> > On Jan 6, 2:35 pm, Pigletto wrote:
>
On Mon, Jan 12, 2009 at 3:59 PM, jazztpt wrote:
>
> Nope, that's not the problem. I had read that page, and another that
> suggested a slightly different syntax for the urlpatterns (from
> http://rob.cogit8.org/blog). Sorry that I forgot to mention that I
> had already
Nope, that's not the problem. I had read that page, and another that
suggested a slightly different syntax for the urlpatterns (from
http://rob.cogit8.org/blog). Sorry that I forgot to mention that I
had already put Rob's version in my code -- I wasn't sure if it was
necessary simply to show
Miguel,
Puedes tratar de reescribir tu pregunta, preferiblemente en ingles ya que
esta es una lista angloparlante.
Creo que quieres decir:
Como hago para actualizar automaticamente la lista de opciones en en campo
'grupo_pregunta' de la clase Pregunta basado en el valor del campo 'script'
en la
> It would be nice to
> render data as it comes. Instead of waiting for all the computation to
> finish.
That is exactly what AJAX is for. You can display your page, then
load more data into part of it.
--~--~-~--~~~---~--~~
You received this message because
Hola:
Tengo una duda en mis models.py, tengo este codigo
**
class Script(models.Model):
"""Clase Script"""
nombre = models.CharField(max_length=30)
descripcion = models.CharField(max_length=200)
class
On Mon, Jan 12, 2009 at 2:31 PM, bconnors wrote:
>
> At my pythonpath directory I type in:
>
> Python django-admin.py
>
> and I get :
>
> Type 'django-admin.py help' for usage, which is :
>
What is it you want to do? You get the "here's how to get help" message
I ran across this issue.
You need make the "group", for the folder you will be saving images
into, Apache. And give groups RWX permissions for that folder
On Jan 12, 3:43 am, raik wrote:
> Hi there,
>
> I am using a FileField to store user-uploaded files on the server.
Thank you . it works!
moisey o
On Jan 12, 12:12 pm, Stefan Tunsch wrote:
> Take a look
> athttp://docs.djangoproject.com/en/dev/ref/django-admin/#runserver-opti...
>
> Regards, Stefan
>
> moiseyo escribió:
>
> > I'm new with Django , and I'm follow the tutorial.
>
> > I
At my pythonpath directory I type in:
Python django-admin.py
and I get :
Type 'django-admin.py help' for usage, which is :
#!/usr/bin/env python
from django.core import management
if __name__ == "__main__":
management.execute_from_command_line()
what can i do?
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).
>
> Example:
On Jan 12, 6:35 pm, jazztpt wrote:
> I'm building my first django app and having a few problems in my dev
> environment. I have a couple of images that I want to use in my
> base.html template. I have tried various configurations, but none of
> my images show up. I've
I'm building my first django app and having a few problems in my dev
environment. I have a couple of images that I want to use in my
base.html template. I have tried various configurations, but none of
my images show up. I've tried putting the images in /media, in /media/
img, and in the main
Ok, thanks Graham, will do.
On 11 Jan 2009, at 10:45, Graham Dumpleton wrote:
>
>
>
> On Jan 11, 7:59 pm, Ben Eliott wrote:
>> Hi Graham,
>> Just following up on this thread. I replied with some details, but
>> maybe you missed those, or maybe i missed your reply. Or
Hi all and David,
I followed the http://code.larlet.fr/doc/django-s3-storage.html
installation and created a simple model
class Avatar(models.Model):
"""
Avatar model
"""
image = models.ImageField(upload_to="userprofile")
user = models.ForeignKey(User)
By using the
On Jan 11, 9:53 pm, "pyramid...@gmail.com"
wrote:
> I am slightly confused with starting out
> I just want to start with the initial index page
You just need a line in your main urlconf (the one specified in your
settings.py file) that maps directly to an HTML file in your
Answering my own question...
It seems that I can fix the problem by moving the call to inside the block.
So my template needs to look like
{% extends "base.html" %}
{% load mytaglibrary %}
{% block content %}
{% get_mytag as mytag %}
{{ mytag.name }}
{% endblock %}
whereas before the line
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).
Example:
class Child(models.Model):
name = models.CharField(max_length=10)
I'm debugging a template tag which used to work under V0.96 and now
doesn't under V1.
Using logging, I can see that its __init__ function is called, but render isn't.
Any pointers as to why or how I debug this would be very gratefully received
Rachel
Refreshing doesn't help. But haven't tried clearing the browser cache,
need to figure out how to do it in Safari tonight.
But the file is definitely right one, otherwise apache2 server won't
see the changes.
Thanks
On Jan 12, 3:10 pm, "David Zhou" wrote:
> On Mon, Jan 12,
On Mon, Jan 12, 2009 at 11:15 AM, moiseyo wrote:
>
> I'm new with Django , and I'm follow the tutorial.
>
> I have install Django on my Linux box , and use My Windows box as a
> development station - Web Browser , Editor , File copy etc. I use
> SAMBA to access Linux
I'm new with Django , and I'm follow the tutorial.
I have install Django on my Linux box , and use My Windows box as a
development station - Web Browser , Editor , File copy etc. I use
SAMBA to access Linux files.
I made a few steps and made
python manage.py runserver
Django
On Jan 12, 10:12 am, "David Zhou" wrote:
> On Mon, Jan 12, 2009 at 10:10 AM, rabbi wrote:
>
> > Is it enough to override the Model.save() method or should I override
> > Model.create() also?
>
> Just Model.save() should be enough. In the past, I've
I had the same problem but my solution was different. I got this error when
i tried to open page with firefox. But i could open it with i.e
That's all!
2009/1/6 Deniz Dogan
>
> On 5 Jan, 11:41, Deniz Dogan wrote:
> > On 5 Jan, 10:47, Deniz
interestingly changing candidate = request.candidate (retrieved from
middleware) to candidate = Candidate.objects.filter(user=request.user)
and then doing .delete() works.
Very strange behaviour. I don't understand the ORM well enough to know
why it would get confused.
On Jan 12, 2:43 pm,
Hi,
I am writing a resource booking system in django using the admin
functionality.
I have a "Booking" model, a "ResourceType" model, and a "Resource"
model.
The booking model has date from and to fields, a foreign key field to
select the ResourceType, and a ManyToManyField to link to the
The candidate object is attached to the request object by middleware.
class CandidateCheckMiddleware(object):
def process_view(self, request, view, args, kwargs):
candidate = request.user.is_authenticated() and \
Candidate.objects.filter(user=request.user)
if
On Mon, Jan 12, 2009 at 10:10 AM, rabbi wrote:
>
> Is it enough to override the Model.save() method or should I override
> Model.create() also?
Just Model.save() should be enough. In the past, I've used if not
self.id to case initial creation -- although I don't know
On Mon, Jan 12, 2009 at 10:08 AM, ltcstyle wrote:
>
> What does CTRL+F5 do for my browser? sorry I developed in Mac, hence
> Safari.
Does refreshing help? Or clearing the browser cache?
Barring all of that -- are you actually editing the correct CSS file?
There's been times
Is it enough to override the Model.save() method or should I override
Model.create() also?
Does the create() method delegate the creation process to the save()
method, or does it bypass it?
Thanks,
Alex
--~--~-~--~~~---~--~~
You received this message because you
What does CTRL+F5 do for my browser? sorry I developed in Mac, hence
Safari.
I also tried closed the browser and restart the server by ./manage.py
runserver again, even restart the computer.
The problem is still exist.
But browse the apache2 server, e.g. 192.168.0.2(my ip) rather than
localhost
Mark,
You should really use Forms and FormSets--they'll make this problem
essentially go away.
http://docs.djangoproject.com/en/dev/topics/forms/#topics-forms-index
http://docs.djangoproject.com/en/dev/topics/forms/formsets/
-Jeff
On Jan 12, 12:46 am, Mark Jones wrote:
>
My solution is that I have a site-enabled nginx host listening on
http://media.site/ which has a document root at say /var/www/site/.
I set my MEDIA_URL = http://media.site/. I import MEDIA_URL into
views and send it to the template with say render_to_response().
So, in the stylesheet link for
On 12 Sty, 12:53, ltcstyle wrote:
> But during my development, if I have updated my css file, the django-
> development web server is not responded properly. The old style is
> used. Then I have to use apache server to check if the CSS style is
> right for me.
I think it's
On 12 Sty, 15:40, John Baker wrote:
> # later in code trying to delete
> candidate.delete()
>
> Any clues? (Django 1.0.2 final)
You need to provide how you fetch objects, I mean code before
cadidate.delete().
--~--~-~--~~~---~--~~
You
I cannot delete an object that has a foreign key to a user. The error
given is:
Cannot resolve keyword 'user' into field. Choices are: id, job, name
# the model
class Candidate(models.Model):
user = models.ForeignKey(User)
...
# later in code trying to delete
Using runserver or what deployment?
On Jan 11, 4:15 am, afrobeard wrote:
> Hi,
>
> I was wondering if anyone has taken a look at Live Contacts API
> athttp://msdn.microsoft.com/en-us/library/bb463989.aspx
>
> I can get through step 1 i.e. Delegated Authentication. An
is there a greater than method in the template language?
--~--~-~--~~~---~--~~
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
On Mon, Jan 12, 2009 at 8:25 AM, Karen Tracey wrote:
> On Mon, Jan 12, 2009 at 6:11 AM, seki wrote:
>>
>> Hi guys,
>> I have been teaching myself Django and I have worked with the latest
>> release. To me it seems the new library isn't shipped with the
ok, I have been trying to set up Apache and mod_python. I followed all
the tutorials,
i seem to be getting the similar to error to alot of ppl but the
solutions don't work for me.
ImportError: Could not import settings 'bltss.settings' (Is it on
sys.path? Does it have syntax errors?): No module
On Mon, Jan 12, 2009 at 6:11 AM, seki wrote:
>
> Hi guys,
> I have been teaching myself Django and I have worked with the latest
> release. To me it seems the new library isn't shipped with the
> newforms library ( i.e Django-1.0.2-final)...
> I just coppied the library
i have this error. please help me
Internal Server Error
An error occurred processing this request.
Request handler failed
Traceback (most recent call last):
File "C:\Program Files\SWsoft\Plesk\Additional\Python\lib\site-
packages\Http\Isapi.py", line 15, in Request
Hi, I am new in Django, I find it pretty easy to learn and use.
But during my development, if I have updated my css file, the django-
development web server is not responded properly. The old style is
used. Then I have to use apache server to check if the CSS style is
right for me.
Any
Hi guys,
I have been teaching myself Django and I have worked with the latest
release. To me it seems the new library isn't shipped with the
newforms library ( i.e Django-1.0.2-final)...
I just coppied the library from an older version.
Hope that's pretty fine...
On Sun, 2009-01-11 at 19:03 -0800, AlexiPoliski wrote:
> What I would like to ask is, from more experienced Django developers,
> what way do you prefer to create your applications? Models then views
> then templates? Models then templates then views? Or models then views
> AND templates
try checking this:
http://docs.djangoproject.com/en/dev/ref/models/instances/#django.db.models.Model.get_absolute_url
2009/1/13 Alessandro Ronchi :
> Is there a template tag with show_url like {{shop_name}} ?
>
> --
> Alessandro Ronchi
> Skype: aronchi
>
Is there a template tag with show_url like {{shop_name}} ?
--
Alessandro Ronchi
Skype: aronchi
http://www.alessandroronchi.net
SOASI Soc.Coop. - www.soasi.com
Sviluppo Software e Sistemi Open Source
Sede: Via Poggiali 2/bis, 47100 Forlì (FC)
Tel.: +39 0543 798985 - Fax: +39 0543 579928
You are right - I have just omited "," in
js = ('prototype.js', )
Thanks!
On Jan 12, 2:04 am, "Ramiro Morales" wrote:
> On Sun, Jan 11, 2009 at 10:33 AM, Artem Skvira wrote:
>
> > Hi all,
>
> > I've stumbled upon strange behaviour in django: when
Hi all,
I have 3 models: model1, model2, model3.
model2 depends on model1 and model3 depends on model2 (depend means
that have a foreignkey)
In the admin interface I don't want to include model3 in the same page
of model1 and I don't want to see model2 or model3 links to the change
list in my
I've created a few models that have m2m relationships with
intermediary tables. I'm storing some extra data in the fields of the
intermediary tables. For example, I have a model called Author and
model called Newspaper that are related to each other through a model
called AuthorNewspaper. In
On Jan 12, 10:22 am, bruno desthuilliers
wrote:
> On 11 jan, 18:46, Jo wrote:
>
> > While building a website using template inheritance one usually does
> > the following:
>
> > fetch from database
> > fetch from some more data from database
On 11 jan, 18:46, Jo wrote:
> While building a website using template inheritance one usually does
> the following:
>
> fetch from database
> fetch from some more data from database
> ... << more required computations
> then at the end render the template with the fetched
Hi there
I'm also somewhat new to Django and the mailing list, so somebody else
probably has a better solution.
However, here's the solution I found to this problem:
http://docs.djangoproject.com/en/dev/howto/static-files/?from=olddocs
I hope it helps. Please note the disclaimer on that page,
On Mon, Jan 12, 2009 at 3:25 AM, pyramid...@gmail.com
wrote:
>
> Im trying to get the template to load the CSS, but it does not load,
> the server output shows a 404.
...
> preferably i dont want the css file there but in a global location,
> can someone tell me whats going
Hi there,
I am using a FileField to store user-uploaded files on the server. My
setup works with the development server but raises a
SuspiciousOperation error when I switch to apache2. I spent hours
trying to figure out what's going wrong but I am running out of ideas
now ...
settings.py:
Malcolm,
funny, I wanted to try the debug tag because of your tip in the
interview with '42 Topics' :)))
http://42topics.com/blog/2008/04/an-interview-with-malcolm-tredinnick/
It's not urgent on my side, just wanted to play around with it and
wondered if there is something wrong in my
Im trying to get the template to load the CSS, but it does not load,
the server output shows a 404.
in templates directory i have
/default/layout.html (this is the website layout)
/articles/index.html (the template defining blocks to replace in the
template)
I've tried a few things, im not
81 matches
Mail list logo