On Fri, May 13, 2011 at 1:44 AM, pankaj sharma
wrote:
> Hello friends,.
> i want to upload some files to my database and show it to user ..
> how to add an filefield option to models.py and how to show them in
> admin.py.
> and how to let the users download the files...
>
>
Do you really want to s
On May 13, 1:44 am, pankaj sharma wrote:
> Hello friends,.
> i want to upload some files to my database and show it to user ..
> how to add an filefield option to models.py and how to show them in
> admin.py.
> and how to let the users download the files...
Suggest you start with the docs:
http://
Hello friends,.
i want to upload some files to my database and show it to user ..
how to add an filefield option to models.py and how to show them in
admin.py.
and how to let the users download the files...
--
You received this message because you are subscribed to the Google Groups
"Django user
On Sun, Mar 27, 2011 at 6:47 PM, Russell Keith-Magee
wrote:
> As was suggested when you raised this on django-dev, if you want the
> old behavior, write a subclass of FileField that reintroduces the old
> behavior.
... and for those who're not reading over there, here's some code you
might try: h
On Sun, Mar 27, 2011 at 6:20 PM, -RAX- wrote:
> Hi all,
>
> According to
> http://docs.djangoproject.com/en/dev/releases/1.3/#filefield-no-longer-deletes-files
> FileField fields no longer delete the related file when the instance
> is deleted.
>
> I understand the motivations behind this decisio
Hi all,
According to
http://docs.djangoproject.com/en/dev/releases/1.3/#filefield-no-longer-deletes-files
FileField fields no longer delete the related file when the instance
is deleted.
I understand the motivations behind this decision BUT this creates
several side effects in various websites w
On 12/20/2010 12:55 AM, Daniel Carvalho wrote:
> Everybody knows the default django FileField doesn't allow to remove an
> existing file...
>
> This is a good replacement. Just use RemovableFileField instead of
> FileField in your models:
> http://djangosnippets.org/snippets/636/
>
>
> I want to
Everybody knows the default django FileField doesn't allow to remove an
existing file...
This is a good replacement. Just use RemovableFileField instead of
FileField in your models:
http://djangosnippets.org/snippets/636/
I want to implement on it another feature- When there is a file being
uplo
Peter Bengtsson wrote:
> Sadly this means that if a user tries to upload a 11Mb file you won't
> be able to confront them with a user-friendly "error" message.
>
It's pretty straightforward to subclass django.forms.fields.FileField to
apply a size limit in clean(), or perhaps just do the check
One way of doing it, and to be honest the only one I know, is to set a
limit in the fronting web server.
In Nginx for example you add:
client_max_body_size 10M;
Sadly this means that if a user tries to upload a 11Mb file you won't
be able to confront them with a user-friendly "error" message.
Hi,
I'm using the admin interface with some filefield, I tested with a big
file (200 MB) and it was successfully uploaded, this is ok but I would
like a way to limiting the uploaded size for example to a maximun of
10 MB, any hints?
thanks
drakkan
--~--~-~--~~~---~--~
I found something that's working for me now:
http://code.djangoproject.com/ticket/7968
Although I had to modify the save method slightly to add commit.
2009/7/16 Michael Stevens :
> Does anyone have a removable file field definition for django 1.1?
>
> I found http://www.djan
Does anyone have a removable file field definition for django 1.1?
I found http://www.djangosnippets.org/snippets/636/ which is exactly
what I want but it seems to have the key flaw of giving server errors
on current django.
Michael
--~--~-~--~~~---~--~~
You
I am trying to figure out how to create a model field that doesn't
pull from the database but instead pulls from the file system, shows
it in the forms as a Textarea, then just saves it back to file system
when the model is saved.
In my mind it seems pretty simple. I have read the custom models p
On Tue, 2008-11-25 at 06:50 -0800, omat wrote:
> Hi,
>
> I am trying to update a object via admin interface. Nothing fancy, and
> it all goes well on my local environment, as it does many times
> before.
>
> But in the production site, I get an AttributeError:
>
> 'module' object has no attrib
Hi,
I am trying to update a object via admin interface. Nothing fancy, and
it all goes well on my local environment, as it does many times
before.
But in the production site, I get an AttributeError:
'module' object has no attribute 'parse_file_upload'
The traceback (which dpaste refused to s
Got it fixed. I was making mistake -)
On Nov 20, 12:22 pm, laspal <[EMAIL PROTECTED]> wrote:
> OK I got the point but still having some problem dealing with excel
> file.
>
> code:
> abspath = '/home/laspal/work/test/tmp/'
> * view***
> if not os.path.isdir(abspath + str(_user
OK I got the point but still having some problem dealing with excel
file.
code:
abspath = '/home/laspal/work/test/tmp/'
* view***
if not os.path.isdir(abspath + str(_user.username)):
os.mkdir(abspath + str(_user.username) )
filepathwithname = os.path.jo
laspal wrote:
> Hi,
> I am trying to save file using file field but ran into problem.
> Here is my code:
>
> ***model
>
> class CronEmail(models.Model):
> subject = models.CharField( max_length = 200)
> message = models.CharField( max
Hi,
I am trying to save file using file field but ran into problem.
Here is my code:
***model
class CronEmail(models.Model):
subject = models.CharField( max_length = 200)
message = models.CharField( max_length = 200)
sender = models.CharField( max_length = 200
On Mar 12, 3:23 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> A change to fix this (make the length longer) will be committed after
> 0.96. I'm intentionally not committing it beforehand because it is a
> backwards incompatible change in the sense that every database using
> such a field wil
On Mon, 2007-03-12 at 09:29 -0700, Brendon wrote:
> Hello folks,
>
> I'm curious if there is a better way of changing File and Image Fields
> from "varchar(100)" to "varchar(%(maxlength)s)" than editing "django/
> db/backends/mysql/creation.py". Is there any particular reason why
> these are hard
Hello folks,
I'm curious if there is a better way of changing File and Image Fields
from "varchar(100)" to "varchar(%(maxlength)s)" than editing "django/
db/backends/mysql/creation.py". Is there any particular reason why
these are hard set? My relative paths seem to have exceeded the 100
char lim
Case 1:
When you have Validation for TextField and FileField on the same form,
you enter the info and upload a file. When you hit submit, text form
validation fails, that means the File is still sent to the server and
server would have it in the memory. Now, I have to fix the TextField
info with
On 5/4/06, sam <[EMAIL PROTECTED]> wrote:
> Django version 0.91. I was trying to generate a thumbnail for an image
> upload. The image is a FileField. I want to generate thumbnail in
> _post_save() of the model object. The code is something like the
> following:
>
> class Item(meta.Model):
> .
Django version 0.91. I was trying to generate a thumbnail for an image
upload. The image is a FileField. I want to generate thumbnail in
_post_save() of the model object. The code is something like the
following:
class Item(meta.Model):
...
file = meta.FileField(upload_to="files",blank=Tr
26 matches
Mail list logo