Perfect, thanks so much!
Jay P.
On 5/12/06, Ivan Sagalaev <[EMAIL PROTECTED]> wrote:
>
> Jay Parlar wrote:
>
> >Is there something about render_to_response that makes it that
> >LANGUAGE_CODE doesn't get properly populated?
> >
> >
> A
omeone can point me in the direction of being able to access the
upload_to field, and then I can do the strftime myself (although
that's obviously a non-optimal solution)
Thanks in advance,
Jay P.
--~--~-~--~~~---~--~~
You received this message because you are
'obj =
manipulator.save(new_data)' is causing the following error:
OperationalError at /firmware/
firmware_firmwareupload.creation_time may not be NULL
Shouldn't the AddManipulator have prepopulated that field, because of
the 'auto_now_add=True'? I wasn't seeing that error before the
On 5/15/06, Jay Parlar <[EMAIL PROTECTED]> wrote:
> On 5/15/06, Ivan Sagalaev <[EMAIL PROTECTED]> wrote:
>
> > Instead of saving your file manually use Django's helper method:
> >
> > obj = manipulator.save(new_data)
&g
On 5/15/06, Ivan Sagalaev <[EMAIL PROTECTED]> wrote:
>
> Jay Parlar wrote:
>
> >I'm still curious though if doing the
> >new_data.update(request.FILES.copy()) is the best way to do that part
> >of it.
> >
> >
> Only if you don't care of l
On 5/16/06, Ivan Sagalaev <[EMAIL PROTECTED]> wrote:
>
> Jay Parlar wrote:
>
> >Hmm... So let me get this straight... When someone does an upload via
> >my form, Django *temporarily* stores it in my uploads directory, with
> >the "_" at the end of the
mplate into whatever
template is being rendered. I guess that the 'include' tag would do
that, but then I'd need to explicitly pass the required sidebar
context into every template, right?
Thanks,
Jay P.
--~--~-~--~~~---~--~~
You received this message beca
ble).
So what's wrong here: Is the documentation just not detailed enough,
or is the code doing the wrong thing? Ideally, in my case at least, if
the value of one of the 'extra_context' variables were a QuerySet,
then it would evaluate it just like it does with the 'queryset&
gt;
> 'extra_context': {'last_five_posts': lambda:
> Post.objects.all()[:5]}
I take the Guido POV and prefer to give names to my functions. I
haven't spent enough time with Haskell or Lisp in my career to feel a
strong pull towards using lambda :)
Thank
sts': posts}
>
> -- blog/sidebar.html --
> {% for post in posts %}
> {{ post.title }}
> {% endfor %}
>
>
I'm not seeing 'inclusion_tag' in the docs anywhere, is it meant to be
a public API function?
Jay P.
--~--~-~--~~~---~-
re blocked from accessing the app during that time.
When I switch from the development server to mod_python, will this
automatically get taken care of for me? I have no actual web app
experience prior to Django, so I'm not sure what will happen when I
switch to Ap
django, just having a
> little trouble getting it all set up locally on os x...
>
Open up the easy-install.pth file in your site-packages directory.
There should be a reference to the Django egg in it. Delete that line.
It's telling Python to use the Django .egg, but since you deleted the
.
uld cause that to
happen automatically, but I guess not.
And as a side note, if I call the get_firmwarefile_url() for one of
the records, I just get a relative url, 'uploads/somefile.txt', and
not an absolute URL. Is that related?
Thanks,
Jay P.
--~--~-~--~~~--
Never mind, I solved it. My problem was my MEDIA_URL. I had:
localhost:8000/site_media
but it looks like I needed:
http://localhost:8000/site_media/ (notice that I also needed that
backslash at the end)
Jay P.
--~--~-~--~~~---~--~~
You received this message
t I want is for each GeneratedFile to be in a different directory,
and other than strftime, I can't find a way to do that.
Jay P.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
We had a long discussion about this very topic recently, search for
the thread "Accessing a field's upload_to strftime". It didn't start
out with what you're asking, but it certainly ended there.
Jay P.
On 5/24/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
&
Essentially, I wanted a way to define the upload_to when I do the
save, not in the model. This way I can have files from the same model
easily go to different directories.
Jay P.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to th
return os.path.normpath(f)
+
+
class FilePathField(Field):
def __init__(self, verbose_name=None, name=None, path='', match=None, recur
sive=False, **kwargs):
self.path, self.match, self.recursive = path, match, recursive
Jay P.
--~--~-~--~~~---
I went ahead and filed a patch with Trac,
http://code.djangoproject.com/ticket/1994
Jay P.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to dj
ta. However, when my application is actually
running, that same line will ALWAYS return the first row in the table,
not the last one.
Am I missing something here?
Jay P.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
&quo
On 5/25/06, mary <[EMAIL PROTECTED]> wrote:
>
> i wrote this view
> def index(request):
> output=open( '/var/www/xml-python/xmleditor/test.xml','w')
> output.write('')
> output.write('')
> latest_menu_list = Menu.objects.all().order_by('-id')
> output = ', '.join([m.menu_text f
ocumentation/db_api/
>
> This section discusses slicing specifically:
>
> http://www.djangoproject.com/documentation/db_api/#limiting-querysets
>
Perfect, the 'order_by' worked beautifully!
Maybe a note should go into the db_api doc
th.
I've done very little SQL in my career, so I'm not even sure of the
best way to do this with raw SQL.
Any thoughts?
Jay P.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users"
enough to do a view for it, but it
*feels* like there'd be a way to pass some 'extra_context' to
'object_list', such that it can dynamically build QuerySets. Maybe if
I could pass arguments to a callable in 'extra_context'
Jay P.
--~--~-~--~~---
endfor %}
I don't think that QuerySets (which are what are returned by
post.assoc_cats.all) can be represented directly in a template.
Jay P.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users&q
ytime Jeff logs into the
admin, plaintext passwords will be sent to his Django instance. That
seems like a very bad idea.
What am I missing here?
Jay P.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django user
#x27;ve tried this using Q objects and some other things but I can't get it
> to work. Anyone have ideas of what I'm doing wrong?
>
> Thanks,
> Chris
>
>
Any chance that you're having a case problem? __exact is case
sensitive, while __iexact is case insensit
E Field1 = %s", 1)
> row = cursor.fetchone()
>
> but django reported that it "Could not load database backend: No module
> named MySQLdb". The values in settings.py seem to be alright... Am I
> missing something?
>
e greatly appreciated. I've only done a little
bit of playing around with AJAX technologies so far, and I've never
used Apache+mod_python before, so there are a lot of unknowns for me.
I also haven't tried out the Session middleware yet, so I don't know
how helpful that wil
On 6/2/06, spacedman <[EMAIL PROTECTED]> wrote:
>
>
> Jay Parlar wrote:
>
> > The thing is, I'm not sure how to fit that into Django. Currently, my
> > view function just blocks on the generation/compilation. To do this
> > with AJAX, it feels like I
ut it'd be nice if there were a
decorator or something that could tell Django that the client
expecting a response is *not* going to be able to display that
response, and the exception info should be displayed on the terminal.
Just my two cents,
Jay P.
--~--~-~--~~~-
ay around with a LiveCD on
your own computer, and learn the Linux basics there. There's no reason
to waste money by making yourself learn Linux on a VPS. Figure it out
at home, then sign up for an account.
Jay P.
--~--~-~--~~~---~--~~
You received this messa
On 6/3/06, Jeff Forcier <[EMAIL PROTECTED]> wrote:
>
> Jay Parlar wrote:
>
> > This was using the dev server and DEBUG=True. Maybe I missed something
> > in terms of how to get useful output, but it'd be nice if there were a
> > decorator or something
58040#a3a25c1db8758040
http://dev.eclipse.org/newslists/news.eclipse.foundation/msg00392.html
Jay P.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email
her people here will
be more accepting of a well known troll. If you really are trying to
change your ways, then best of luck to you, in defeating the persona
you've created for yourself. You've already been dismissed on
django-dev, so my guess is that the odds of any of your work eve
Can you copy/paste the contents of your urls.py file?
Jay P.
--~--~-~--~~~---~--~~
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 u
utation will be even worse when I
try with Apache/mod_python.
Jay P.
--~--~-~--~~~---~--~~
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
On 6/5/06, James Bennett <[EMAIL PROTECTED]> wrote:
>
> On 6/5/06, Jay Parlar <[EMAIL PROTECTED]> wrote:
> > When I run with the development server, I just get a 'Broken pipe'
> > socket error. I'm guessing the situtation will be even worse when I
>
e the status of the process by using some simple AJAX from the
client side. What I'd like is that if the client closes their browser,
some exception gets raised, and I can cancel the rest of the process
on the server side.
Jay P.
--~--~-~--~~~---~--~~
You re
d is a good idea, I might give that a try.
It's not so much that I rely on the connection closing, it's that I
would like to know if it closes in the middle of the operations.
I think I'll just rethink the way my app works. I'm not used to web
programming, it's a dif
? I never noticed that before!
If the write fails before all the iterations are done though, I guess
I have no way to generically catch that, to do any kind of cleanup I
might need?
Jay P.
--~--~-~--~~~---~--~~
You received this message because you are subscribe
rendered to the pipe until well after that.
>
> It sounds to me like "Exception Middleware" needs to be renamed to
> "View Exception Middleware" and you should write a patch for "Response
> Exception Middleware". ;-)
What's the current def
new template for each story. So when someone comes up
with an idea for something like that, do you just put another
conditional into the generic template and go from there?
Thanks in advance for any suggestions anyone might have.
Jay P.
--~--~-~--~~~---~--~~
You
o's cache system could be put to good use
here. Define a cache timeout that makes you happy. Then when a page
request is done with a dirty cache, maybe do an md5 on your XML file.
If it hasn't change, just return the page from cache again.
Note: I haven't actually
r filesystem. Is the image maybe getting uploaded with an
underscore (ie. "_") appended to the end of the filename?
Jay P.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To p
e admin, but the API
and usage from regular views leaves a lot to be desired. Most of my
time spent on my current project has been in dealing with FileField in
custom views. I just don't know what a proper solution would be
though.
Jay P.
--~--~-~--~~~---~--~~
Y
On 6/13/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> The images are not getting uploaded at all. They are still zero files
> in my upload path on the server. :)
Out of curiosity, if you change your model to use FileField instead of
ImageField, does
I don't know if this was on purpose, or if it was simply forgotten,
but I suggest you walk over to the desk of whoever wrote that, and
smack them on the head :)
Jay P.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Group
On 6/13/06, Jeremy Dunck <[EMAIL PROTECTED]> wrote:
>
> On 6/13/06, Jeremy Dunck <[EMAIL PROTECTED]> wrote:
> > On 6/13/06, Jay Parlar <[EMAIL PROTECTED]> wrote:
> > > I don't know if this was on purpose, or if it was simply forgotten,
> > &g
On 6/13/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Thanks a lot, Jay. I'll smack Jacob over the head (I don't actually
> know if he wrote that or not, but any excuse to smack him is a good
> one) and point him to your ticket. Thanks a lot!
>
> Jeff
I just fired off a message to Django-dev, asking for ideas for a new
FileField API. If anyone was reading this thread and is interested in
such a thing, come to Django-dev and help me out.
Jay P.
--~--~-~--~~~---~--~~
You received this message because you are
On 6/14/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Jay-
>
> In case you didn't noticed, Jacob did check in your patch, and it
> totally fixed the problem on my end. Thanks so much! :)
Yep, I saw that yesterday, I was excited to finally contribute
something bac
will be different from your
production server.
Jay P.
--~--~-~--~~~---~--~~
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
On 6/14/06, Jeremy Dunck <[EMAIL PROTECTED]> wrote:
>
> On 6/14/06, Jay Parlar <[EMAIL PROTECTED]> wrote:
> > My new thread on Django-dev (which unforuntately doesn't seem to be
> > getting much response)
>
> Err, what's the subject? I'm on bot
On 6/14/06, mamcxyz <[EMAIL PROTECTED]> wrote:
>
> Yes I know... is for that I try the install onto windows.
>
> Is rare, why then RoR can be installed with lighttp on windows?
I think they might use Cygwin to do it. Nothing stopping you from
doing the same,
roducts, A and B, with users x, y and z. I'd like to be able to say:
users x and y can edit A
users y and z can edit B
Is there any good way to do this without waiting for the SoC row permissions?
Thanks,
Jay P.
--~--~-~--~~~---~--~~
You received this message
cles/" + self.pub_date.replace("-","/") + "/" + self.slug
But it seems like there'd be a cleaner way (ie. not having to call 'replace')
Any thoughts?
Jay P.
--~--~-~--~~~---~--~~
You received this message because you
On 6/17/06, James Bennett <[EMAIL PROTECTED]> wrote:
>
> On 6/17/06, Jay Parlar <[EMAIL PROTECTED]> wrote:
> > def get_absolute_url(self):
> > return "/articles/" + self.pub_date.replace("-","/") + "/" + self.slug
>
99),
datetime.datetime(2006,1,16,0,0,0,0)))
Out[16]:[]
That query on line 15 is the exact same query that archive_day uses.
So my article, with a pub_date of 2006-01-16 does NOT show up in the
results of the first query, but does in the second. Looks like the
comparison code somewhere is
And as a side note, if I switch it to a DateTimeField, then everything
works perfectly.
Jay P.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to dj
As far as I know, the only way right now is to use the patch I wrote:
http://code.djangoproject.com/ticket/1994
Jay P.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to
permissions system going very quickly
using it, for an internal project that needs it right now, and can't
wait for the official way of doing it to be finished.
Jay P.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
&q
, it just makes sure they're all closed.
If not, how do people normally do this?
Thanks,
Jay P.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
y that helps a bit.
And for your form failing silently, try putting this in your template:
{{ form.error_dict }} That should get all the errors to display.
Best of luck,
Jay P
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Gro
st
written their own sanitizers.
Thanks,
Jay P.
--~--~-~--~~~---~--~~
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 th
don't want HTML in comments enough to warrant passing
everything through a perl script :)
You'd think the Zope team would have something by now, but all I can
find from them is a 6 year old module. Oh well.
Jay P.
--~--~-~--~~~---~--~~
You received this mes
le.
> In the documentation says how to build it, but not the deployment
> instructions(http://www.djangoproject.com/documentation/templates_python/#writing-custom-template-tags).
> Must be a simple thing to do.
>
Scroll up on that page a bit, and read "Extending the templa
ng to do is grab the ID so I can pass it as
an argument to another Admin page, using some custom JS.
I *could* parse the ID out of the URL, but that feels like a kludge.
Any help would be appreciated.
Thanks,
Jay P.
--~--~-~--~~~---~--~~
You received this mes
homas-at-ether.com.au?
>
I was looking for the exact same thing yesterday, and couldn't find
it. Maybe instead of emailing Thomas, someone could put it in a
publically available location?
Jay P.
--~--~-~--~~~---~--~~
You received this message because you are s
No worries. I'm actually parsing the URL with some JavaScript to get
it done. It actually works pretty nicely, and it means I don't have to
dig into the DOM to pull out the value (although with MochiKit,
digging into the DOM is almost a joy to do)
Tha
ange because from
my app level, if I add the Product rows manually through the admin,
everything works fine.
Note: I've never used one-to-one relationships before in any context
(with or without Django), so I could just be missing a fundamental
requirement of doing an INSERT with them.
Than
Oh jeez, nevermind. My double quotes around the product_name value is
what's wrong. Arg.
Jay P.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send
re's a problem I did run into after fixing that though: It seems
that if you have any '\n' characters in your model.sql file, then the
regular expression in django/core/management.py breaks horribly, and
passes in '\n\n \n' (or something lilke that
hat Shared 2 is the
minimum for Django, but I'm curious if it's "enough".
Jay P.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email t
On 6/23/06, Patrick J. Anderson <[EMAIL PROTECTED]> wrote:
>
> What is the best way to reuse admin pagination in a generic object_list
> view template?
What part do you want to reuse? Because object_list already has the
paginate_by a
don't actually have a django setup in front of me know that's
performing any pagination, so I can't remember exactly what the Admin
does. But I did setup an object_list based template yesterday that
used the paginate_by, and it couldn't have been easier.
Jay P.
--~--~---
in the early stages, so I guess we can't expect
everything yet, but what's there is working pretty phenomenally for
me.
Jay P.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To
On 6/22/06, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote:
>
> Yeah, that's right -- there's currently no admin support. It'll get
> there eventually; I just wanted the core code to get some eyeballs
> before trying to write it into the admin.
>
> (Than
*copy* the contents from my
SVN directory to the deployment directory. I'd rather not have my
production setup running from an SVN directory.
Thoughts on this?
Jay P.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
On 6/22/06, Joseph Heck <[EMAIL PROTECTED]> wrote:
> svn export sounds like what you want... gives you all the bits, but without
> the .svn directories scattered about.
>
Perfect, I'd forgotten about svn export.
Jay P.
--~--~-~--~~~---~--~---
clear the
> temp dir periodically.
>
> So I'm wondering, is there another / preferred / recommended way to do this?
Do you actually need to save the images onto disk, or just store them
until they're sent out in the response?
Jay P.
--~--~-~--~~~---
parse the HTML, and see a
.
Maybe an AJAX solution would work with StringIO.
Jay P.
--~--~-~--~~~---~--~~
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@g
magic-removal codebase (ie. 0.91), so you'd have to
convert them over to MR to use them with new code.
Depending how much work you want to put into it, it might be less
effort to convert them than write your own from scratch.
Jay P.
--~--~-~--~~~---~--~~
Yo
On 6/23/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> i like to use the authentication modules in the contrib modul of django
> (using 0.95).
> But i have to build a foreign key with the user id to my tables in my
> application.
>
> I have to know which record in my local tables is
;s really good news, I'll be needing to get going on a gallery
pretty soon. I'll make sure to give stockphoto a try.
Jay P.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
Jason Pellerin is currently working on multi database support, is this
the sort of thing you need?
http://code.djangoproject.com/wiki/MultipleDatabaseSupport
Jay P.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
that because the slug is in the URL, you don't
have access to it in the template, because the generic view doesn't
pass the slug to the template.
If I'm correct on that, then the answer is very simple: object_detail
passes the object itself into the templae. The object knows what its
These might be of some assistance to you:
http://www.djangoproject.com/documentation/outputting_pdfs/
http://www.djangoproject.com/documentation/outputting_csv/
Jay P.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
another view to complete, I immediately return a redirect to a new
page. That new page starts an XMLHTTPRequest, to start the file
generation.
Jay P.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django user
The docs all say that you need 'django.core.context_processors.auth'
in your TEMPLATE_CONTEXT_PROCESSORS, but I don't have that, and it
seems to work fine for me. Maybe enabling the auth or sessions apps
does that automatically.
Jay P.
--~--~-~--~~~---~--~~
You rec
_response('firmware/upload.html', {'form':form},
context_instance=RequestContext(request))
Jay P.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users&q
aptcha.html for
myrself.
Thoughts? It seems to work nicely for me so far, but I'm not sure if I
missed any corner cases. I'm also not doing anything with the
'captcha_error' argument right now, don't know if I really need to.
You can try it at ja
27;/svn/django/trunk': Could not read response body:
> Connection reset by peer (http://code.djangoproject.com)
>
> I would really appreciate a little help here; I've been googling the
> last hour and some people say it's a subversion bug, but I cannot
> figure out how to get p
, passing in the URL you want to invalidate.
Warning: I've not actually used the cache framework yet, so I might be wrong.
Jay P.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
T
response back to the user.
You could though have a page that sends an XMLHTTPRequest to a
different view, which can do the processing. Then the user won't
experience any blocking at all.
Jay P.
--~--~-~--~~~---~--~~
You received this message because you are subscri
does not exist, then I will receive an ugly picture in my
> view (HTML)result.
> So, I test that in my view but it would be better if I could test that
> directly from my template
> Thank you for help
> L.
You can always write a custom t
the generic views
(particularly object_list, when I just want a list of all the tag
names in the system).
Jay P.
.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group
want to store. I've done this myself in the past by generating a
temporary file in one view (using Python's tempfile module to make
sure it's unique), and storing it in the session. Then in another view
(say, a view that gets called when the user presses a button) I can
pull the filename
On 6/27/06, nkeric <[EMAIL PROTECTED]> wrote:
>
> hi Jay,
>
> IMO, you will have to do the unique contrain in the db level, here is
> the tagging model stuff I'm working on:
>
That's a pretty neat way to do it, I'm going to have to try it out. Do
you us
ls'
django.contrib.markup: 'module' object has no attribute 'models'
Anyone know why? I can't track it down. The exact same code (except
slightly different settings.py) on my Powerbook gives no such
complaint.
Jay P.
--~--~-~--~~~---
201 - 300 of 501 matches
Mail list logo