Still not getting very far. The error below* keeps turning up. Further
to this, I ran migrate with --list and --settings=ssds.settings.dev and
it returns ...
admin
[ ] 0001_initial
auth
[ ] 0001_initial
[ ] 0002_alter_permission_name_max_length
[ ] 0003_alter_user_email_max_length
[ ] 0004
hi..
Can anyone please tell me how to handle old image after uploading new image.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@google
Hi,
I think you'll have to be more specific, what do you want to do with the
old image? Delete it? Use it again?
Regards,
Andréas
2015-03-24 10:08 GMT+01:00 :
> hi..
> Can anyone please tell me how to handle old image after uploading new
> image.
>
> --
> You received this message because you
Hi ,
I want to delete the old image.
On Tuesday, March 24, 2015 at 2:40:35 PM UTC+5:30, akash...@ranosys.com
wrote:
>
> hi..
> Can anyone please tell me how to handle old image after uploading new
> image.
>
--
You received this message because you are subscribed to the Google Groups
"Django
This is my model
class User(models.Model):
first_name=models.CharField(verbose_name = "First Name
*",max_length=20,blank=False)
last_name=models.CharField(verbose_name = "Last Name
*",max_length=20,blank=False)
username=models.EmailField(verbose_name = "Email
*",max_length=30,blank=F
Hi..
can anyone please tell me how to resize the uploaded image
This is my model
class User(models.Model):
first_name=models.CharField(
verbose_name = "First Name *",max_length=20,blank=False)
last_name=models.CharField(verbose_name = "Last Name
*",max_length=20,blank=False)
userna
This is my edit profile function in view
def edit_profile(request):
if 'username' in request.session:
user_id=request.POST.get('id')
user_id=request.GET.get('id')
usr_obj=User.objects.get(id=int(user_id))
if request.method=="POST":
regform=
hi
any answer
On Tuesday, March 24, 2015 at 2:40:35 PM UTC+5:30, akash...@ranosys.com
wrote:
>
> hi..
> Can anyone please tell me how to handle old image after uploading new
> image.
>
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
T
Hello,
I have a pretty extended test suite for my application, which can run for
about 15 minutes. Now when I introduce an error, I will be notified of it
pretty late, and a one-liner fix needs another 15 minutes to check. Of
course if only one of my tests fail, I can add the name of the test case
When do you want to delete the old image?
On 03/24/2015 10:59 AM, akash.pa...@ranosys.com wrote:
Hi ,
I want to delete the old image.
On Tuesday, March 24, 2015 at 2:40:35 PM UTC+5:30,
akash...@ranosys.com wrote:
hi..
Can anyone please tell me how to handle old image after uploading
When i edit image that is when i upload new image,the old image should get
deleted
On Tuesday, March 24, 2015 at 2:40:35 PM UTC+5:30, akash...@ranosys.com
wrote:
>
> hi..
> Can anyone please tell me how to handle old image after uploading new
> image.
>
--
You received this message because yo
Hi,
Ok, so what you should do is add a signal to pre save and then delete the
old image if the new image is attached.
Something like this should work:
from django.core.files.storage import default_storage as storage
from django.db.models.signals import pre_save
def image_delete(sender, instanc
Hi,
Check out the easy_thumbnails plugin.
http://easy-thumbnails.readthedocs.org/en/2.1/
It automatically resizes all images to the size you want if you use it
correctly.
Regards,
Andréas
2015-03-24 11:07 GMT+01:00 :
> Hi..
> can anyone please tell me how to resize the uploaded image
> Th
If you have created packages for your tests, you can run all tests in a
package. If the tests aren't in the same package, it won't help you however.
Regards,
Andréas
2015-03-24 11:27 GMT+01:00 Gergely Polonkai :
> Hello,
>
> I have a pretty extended test suite for my application, which can run
can you please suggest me another answer...
On Tue, Mar 24, 2015 at 6:13 PM, Andreas Kuhne
wrote:
> Hi,
>
> Check out the easy_thumbnails plugin.
> http://easy-thumbnails.readthedocs.org/en/2.1/
>
> It automatically resizes all images to the size you want if you use it
> correctly.
>
> Regards,
Hey,
I am new to django. I have other feilds also other than image field in my
form, so will you please tell me how to use above mentioned function in
edit_profile function in view, Can i call another function from another
function in views.py, if yes please tell me
On Tue, Mar 24, 2015 at 6:11 PM
You can use Pillow to change the size of the images yourself. That is
however pretty complicated and IMO not really worth the effort. I would go
with easy_thumbnails.
Regards,
Andréas
2015-03-24 14:04 GMT+01:00 Akash Patni :
> can you please suggest me another answer...
>
> On Tue, Mar 24, 2015
Hi,
You shouldn't do it in the view, do it in the database model instead. It
won't do anything to any other fields than the image field the way I wrote
the function (all other fields are untouched).
The reason you shouldn't do it in the view, is because if you were to
update the image any other p
is there any other changes that i have to made in model like how this above
mentioned function will be call.
Please suggest
On Tue, Mar 24, 2015 at 6:43 PM, Andreas Kuhne
wrote:
> Hi,
>
> You shouldn't do it in the view, do it in the database model instead. It
> won't do anything to any other f
i had made the changes in model .py but its not working
here is model.py
from django.db import models
import django.forms as forms
from virtualenv import REQUIRED_FILES
from _mysql import NULL
from datetime import datetime, date, time, timedelta
import time
import calendar
from django.contrib.au
> Den 24/03/2015 kl. 11.27 skrev Gergely Polonkai :
>
> I have a pretty extended test suite for my application, which can run for
> about 15 minutes. Now when I introduce an error, I will be notified of it
> pretty late, and a one-liner fix needs another 15 minutes to check. Of course
> if onl
On Tue, Mar 24, 2015 at 7:27 AM, Gergely Polonkai wrote:
> Hello,
>
> I have a pretty extended test suite for my application, which can run for
> about 15 minutes. Now when I introduce an error, I will be notified of it
> pretty late, and a one-liner fix needs another 15 minutes to check. Of
> cou
First, make sure that the whitespace is the same in all of your methods (in
python whitespace is significant, which means that you should indent all
files the same amount, I wrote my example in my email, so I only indented
twice, you seem to have 4 blankspaces in your file, so make sure the
indenta
@Erik: On the CI side, certainly, I will run all the tests upon each
commit. I want to utilize this thing only on my developer machine, so I can
do a quick run after I think I fixed a problem. Naturally, if those failing
tests are green, I will run the whole suite again.
Separating/tweaking my cur
I have an application that we run locally against a postgres database but
our dev/test/prod servers all run Oracle.
The command list(Person.objects.all()) runs remarkably faster against my
local Postgresql database. It takes at least 10x longer against an Oracle
database. The thing is the query
Hi Gergely,
One option is to use a test suite GUI tool, like cricket:
http://pybee.org/cricket
Cricket lets you view your entire test suite as a tree, select subsets of
the suite to run, see test results as the suite executes, and re-run the
failures from the previous execution.
Yours,
Russ Mag
Hello Russ,
I've already installed the juno test runner, but a graphical tool cannot
hurt locally 😃 I'll check it out tomorrow, thanks for the link!
Best,
Gergely
On 24 Mar 2015 23:22, "Russell Keith-Magee" wrote:
> Hi Gergely,
>
> One option is to use a test suite GUI tool, like cricket:
>
> h
Hi Gergely,
On 03/24/2015 04:27 AM, Gergely Polonkai wrote:
> I have a pretty extended test suite for my application, which can run
> for about 15 minutes. Now when I introduce an error, I will be notified
> of it pretty late, and a one-liner fix needs another 15 minutes to
> check. Of course if o
i have a python script which currently runs in a shell cli.
i'd like to initiate this script from a web page.
the closest i got was to have the output displayed on the webpage (w/o
linefeeds),
but it crashed when requesting input via raw_input().
i simply did 'exec python-script-name' from the cgi
Hi,
I have added the code to my __init__.py file but still its not working.
__init__.py
from django.core.files.storage import default_storage as storage
from django.db.models.signals import pre_save
from django.db import models
import django.forms as forms
from django.contrib.auth.models import U
Hi,
Can i use this method in my model.py
def save(self, *args, **kwargs):
try:
this = MyModelName.objects.get(id=self.id)
if this.MyImageFieldName != self.MyImageFieldName:
this.MyImageFieldName.delete()
except: pass
super(MyModelName, self).save(*args, **kw
31 matches
Mail list logo