On Wed, May 26, 2010 at 2:54 AM, Lakshman Prasad wrote:
> Hi,
> Since I upgraded to 1.1.2, I am unable to send mails as django seems
> expecting a EMAIL_BACKEND.
Something is severely broken with your setup, then. EMAIL_BACKEND is a
setting that was introduced in Django 1.2, but it doesn't exist
Kenneth and all,
This probably needs more explanation, otherwise I'll keep misleading
people into answering some question other then mine.
I store the file in a custom storage (picasaweb) that I've implemented
myself. The file never touches my filesystem and always stays a stream
or whatever file-
On Wednesday 26 May 2010 13:07:50 Igor Rubinovich wrote:
> This probably needs more explanation, otherwise I'll keep misleading
> people into answering some question other then mine.
> I store the file in a custom storage (picasaweb) that I've implemented
> myself. The file never touches my filesys
In my photo class, the field is not ImageField but rather a custom
image = PicasaImageField(upload_to=get_upload_to, blank=True,
storage=pwcs())
And storage=pwcs() is probably what you're asking about.
For the saving bit, here's some code with lots of detail omitted:
photo = Photo(owner=cur
Why don't you try and copy request.FILES (request.FILES.copy()) and work
with the new dictionary. As I understand request dictionaries are immutable.
You can't change the reference of the image. Something like this:
files_dict = request.FILES.copy()
img = files_dict['image']
img.thumbnail( (200,20
check your django version .It might be that you have django at two places .I
m using django 1.1 , have not fount such problem
On Wed, May 26, 2010 at 12:34 PM, Russell Keith-Magee <
russ...@keith-magee.com> wrote:
> On Wed, May 26, 2010 at 2:54 AM, Lakshman Prasad
> wrote:
> > Hi,
> > Since I up
So, I see what has happened. (Interesting it is)
I upgraded django to 1.2 to try out:
$pip install --upgrade django
Then, back to work again:
$pip install django==1.1.2
I don't think pip removed the pyc files when replacing, which is making it
import mail module.
So, This problem should be so
Dejan -
I think this was what I was looking for (and probably should have been
able to figure it out myself :)) Thanks!
Are you sure there's no problem with binary or other encodings?
Thanks,
Igor
On May 26, 10:15 am, Dejan Noveski wrote:
> Why don't you try and copy request.FILES (request.FI
On May 25, 10:49 pm, Jonathan Hayward
wrote:
> For CharField, EmailField, URLField, etc., is VARCHAR implementation
> (meaning a fixed limit on length) absolutely non-negotiable, or there a way
> to make e.g. a CharField that won't truncate if you cross some arbitrary
> length?
>
> (If you don't s
Hello,
i've got an abstract model which has no fields and only defines permissions.
The permission isn't added to the auth_permission table on syncdb nor is the
content_type added to django_content_type. The app is in INSTALLED_APPS.
class Base(models.Model):
class Meta:
abstract =
You simply need to provide a default value for your field, i.e. :
turtle_type = models.IntegerField(null=False, blank=False,
choices=TURTLE_TYPES, default=1)
See the notes on:
http://docs.djangoproject.com/en/dev/topics/forms/modelforms/#field-types
hth,
Nuno
On Tue, May 25, 2010 at 10:05 PM, J
Am Mittwoch 26 Mai 2010, 08:50:09 schrieb rahul jain:
> Hi Django,
>
> How to disable the dashboard ('recent actions') on django admin main page ?
Hello,
you can override the admin/index.html template to disable the display. There's
a sidebar block you might want to change/remove.
Best Regards
Hi,
When the user enters a site for the first time they should see a flash
version of the logo. All other times they should see a gif image. My
home view looks like:
if request.session.get('has_visited',True):
visited = True
else:
visited = False
t = loader.get_templa
Hi,
a simple hint: try to point out a place in your code where
has_visited does exist and is set to False.
Also, you probably don't want to have any code in your view after an
unconditional "return" statement - that code would never get executed.
HTH
Jikra
--
You received this messa
http://docs.djangoproject.com/en/dev/topics/http/sessions/#using-sessions-in-views
> if request.session.get('has_visited',True):
You're passing True as the default value to the get method - get(key,
default=None); this means that when 'has_visited' isn't set in your
session (1st visit) it st
Thanks!
On Wed, May 26, 2010 at 5:32 AM, Daniel Roseman wrote:
> On May 25, 10:49 pm, Jonathan Hayward
> wrote:
> > For CharField, EmailField, URLField, etc., is VARCHAR implementation
> > (meaning a fixed limit on length) absolutely non-negotiable, or there a
> way
> > to make e.g. a CharField
Hello,
I wrote a model which is not abstract, and from which a few
specialized classes derive:
| class Action( Model ):
| item = ForeignKey( Item )
| # A few other properties
|
| class Move( Action ):
| class Meta:
| proxy = True
|
| class Pick( Action )
| class Meta:
|
If you are using 1.2, then you could make a TextField with an email
validator. That gets bonus points for using a new feature :)
http://docs.djangoproject.com/en/dev/ref/forms/validation/#using-validators
Alex
On May 26, 8:24 am, Jonathan Hayward
wrote:
> Thanks!
>
> On Wed, May 26, 2010 at 5:32
The way I've tested it in the past is:
GET the page, using the client. Scrape the values you need.
(BeautifulSoup makes this really easy, but you can do it with python's
builtin stdlib I guess.)
POST the comment message, along with all the values you just scraped.
Hope that helps,
Alex
On May 25
You should check out django-admin-tools [0]
It lets you make lots of changes to the admin index page.
Hope that helps,
Alex
[0]http://bitbucket.org/izi/django-admin-tools/wiki/Home
On May 25, 9:54 am, Dejan Noveski wrote:
> Hello,
>
> Is there a way i can group admin models from different applic
Thank you!
On Wed, May 26, 2010 at 8:30 AM, Alex Robbins wrote:
> If you are using 1.2, then you could make a TextField with an email
> validator. That gets bonus points for using a new feature :)
> http://docs.djangoproject.com/en/dev/ref/forms/validation/#using-validators
>
> Alex
>
> On May 2
Hi,
I am working on django for a project and have to do some funcitonal
testing.
However, whenever I run manage.py test, I get the error shown below. I
have tried searching threads in this group and they mention having
these applications installed in my settings file:
'django.contrib.auth', 'djang
Hello
I created new project, added bunch of apps (which are required for
django cms 2.0) and when i proceeded to admin, to create first set of
pages i got this error:
http://pastebin.com/ZYKuuz85
I also mentioned it in django cms 2.0 group here :http://
groups.google.com/group/django-cms/browse_
That did it! Thanks!
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options,
Hi,
I am building a newsletter system, but I'm wondering how to incorporate it
into the django admin.
Just recently I started discovering the capabilities of the admin interface,
and finding out how things are supposed to be working.
I want to make an interface which follows the django "zen".
My
My mistake in the model definition. They are supposed to be foreign keys to
the same model.
Thank you for the explanation. I was expecting something like the errors
variable like in a Form. Unfortunately there is no equivalent "error"
variable in the model validation. Here is what I can do in form
Hey,
I have a startup company, I wish to setup a website for it, is it
possible to get free web hosting for my site, till i find out if it
works out or not
Thank you
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send e
Also move :
request.session['has_visited'] = True
above the return statement.
On May 26, 4:02 pm, Nuno Maltez wrote:
> http://docs.djangoproject.com/en/dev/topics/http/sessions/#using-sess...
>
> > if request.session.get('has_visited',True):
>
> You're passing True as the default value to th
On 2010-05-26, at 15:02 , Nuno Maltez wrote:
>
> http://docs.djangoproject.com/en/dev/topics/http/sessions/#using-sessions-in-views
>
>
>>if request.session.get('has_visited',True):
>
> You're passing True as the default value to the get method - get(key,
> default=None); this means that w
Try HelioHost and AlwaysData
Cheers,
Oscar C.
El 26/05/2010, a las 18:27, Anjan Dwaraknath escribió:
Hey,
I have a startup company, I wish to setup a website for it, is it
possible to get free web hosting for my site, till i find out if it
works out or not
Thank you
--
You received this m
Can a Django powered app run in a standard apache mod_python only
webserver?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
djang
Sorry, I fixed it. It was a small overlook so I thought I should post
it here for newbies. After updating my django-trunk and including
installed apps,I was missing application name after test, i.e.,
command should be: manage.py test [aapname]
BR,
Irum
On May 26, 7:12 pm, irum wrote:
> Hi,
> I
As long as you have Django installed, yes. It's in the documentation.
Cheers
Jirka
On 26/05/2010, Murasame wrote:
> Can a Django powered app run in a standard apache mod_python only
> webserver?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django
I'm teaching myself django and I'm having an issue with
render_to_response. I am passing it a template and a dictionary.
When I view the page on a local host, it displays the entire template,
including HTML tags, instead of formatting the page according to the
tags. I don't have this issue when I
On Wed, May 26, 2010 at 12:13 PM, zayatzz wrote:
> Hello
>
> I created new project, added bunch of apps (which are required for
> django cms 2.0) and when i proceeded to admin, to create first set of
> pages i got this error:
>
> http://pastebin.com/ZYKuuz85
>
> I also mentioned it in django cms
Feedparser doesn't like, for some reason, the "http://
rss.news.yahoo.com/rss/topstories" feed for some reason, but only
under specific conditions.
-Won't- work: (i.e. 'bozo_exception': SAXParseException('not well-
formed (invalid token)',)
Inside a Django views.py file, and only on my live w
Hi folks.
I want to prevent the duplication of uploaded images. For that, I am
using the upload_to property of ImageField set to a callable that
computes the md5 hash of the uploaded file data and returns a file
name. This should work _but_ when I save the model, the filename I
gave back in the fu
Resolved. Here it is, but don't throw a tomatoe at me or anything
when I tell you.
The database table that I was reading my feeds from - the record for
the yahoo field.. it had a tab character right before the feed string.
:\
On May 26, 12:33 pm, steve wrote:
> Feedparser doesn't like, for som
class Structure(models.Model):
parent =
models.ForeignKey('site.Structure',blank=True,null=True,default=0)
title = models.CharField(max_length=128,verbose_name=u'Заголовок')
url = models.CharField(max_length=48,verbose_name=u'URL')
ordering = models.IntegerField(blan
I am using Django v1.2
The fixture I defined "forum_fixtures.json" don't seem to be loading
when I run tests.
from django.test.client import Client
from django.test import TestCase
from utils import *
from forum.models import *
from forum import auth
from django.contrib.contenttypes.models import
On May 26, 10:26 pm, Karen Tracey wrote:
> On Wed, May 26, 2010 at 12:13 PM, zayatzz wrote:
> > Hello
>
> > I created new project, added bunch of apps (which are required for
> > django cms 2.0) and when i proceeded to admin, to create first set of
> > pages i got this error:
>
> >http://pasteb
On Mon, May 24, 2010 at 01:47:14AM -0700, Pascal wrote:
> From what I've read so far, using translation "tags" (or quick
> phrases) in the code, and translating them to every target language
> (including english) sounds a better approach than using, for example,
> final english wordings as translat
On May 26, 8:19 pm, Nate wrote:
> I'm teaching myself django and I'm having an issue with
> render_to_response. I am passing it a template and a dictionary.
> When I view the page on a local host, it displays the entire template,
> including HTML tags, instead of formatting the page according to
def my_root_page(request):
#t = get_template('root.html')
html = 'Please Work!'
#t.render(Context({}))
return HttpResponse(html)
def current_datetime(request):
now = datetime.datetime.now()
return render_to_response('current_datetime.html',
{'current_date': now})
These are the
I've recently read about `clean_fields()` and decided to move some
stuff to I that I was doing in my `pre_save` handler previously. My
tests failed and then I noticed that neither `clean_fields()` nor
`full_clean()` was ever called before saving the model.
The documentation says that only `clean()
Hi all,
I'm trying to deploy my app under a non-root url (http://myserver.com/
myapp), using apache and wsgi, but I'm having troubles with the
configuration of the authentication framework.
When trying to log in, I get redirected to the url I defined for that
in the settings file (LOGIN_URL), but
Silly me can't write
>
> What should I do? change the LOGIN_*_URL settings somehow? to what
> value should I change them? I checked some pinax code lying around
> here, and I see that it simply prepends the
url of deployment
> under which the app is deployed
to all the LOGIN_*_URL settings.
>
Hello,
I am trying to set up django 1.1.1 with mod_wsgi 2.3 and Apache
2.0.63 on Windows XP. My Python version is 2.4.4
I followed the instructions for installing and configuring mod_wsgi
from http://code.google.com/p/modwsgi/.
I set up the "Hello world " test first to see if my mod_wsgi install
On May 27, 8:42 am, mojito wrote:
> Hello,
> I am trying to set up django 1.1.1 with mod_wsgi 2.3 and Apache
> 2.0.63 on Windows XP. My Python version is 2.4.4
>
> I followed the instructions for installing and configuring mod_wsgi
> fromhttp://code.google.com/p/modwsgi/.
>
> I set up the "Hell
Some basic searching hasn't answered my question if django running on
CPython or Jython is faster. I know its not that simple of an issue,
but I'm about to start a large django project that is moderately
resource intensive, and will have to scale to pretty large sizes.
Could anyone link some benchm
I've installed Sphinx, when I type "make html" under docs directory,
but system shows that it cannot find this command.
because I'm under windows xp system???
On May 18, 2:38 am, Daniel Roseman wrote:
> On May 17, 5:05 pm, pts wrote:
>
> > After download django 1.2,i want to read docs offline,b
I'm trying to figure out why HttpResponseRedirect doesn't work when
called from within another function. For example, this works, of
course:
def foo(request):
return HttpResponseRedirect('"http://example.com";)
But this does not:
def bar(request):
print "In bar"
return HttpResponseRedirect
You also need to return the result of bar() from foo. Example:
def bar(request):
print "In bar"
return HttpResponseRedirect('"http://example.com";)
def foo(request):
return bar()
Regards,
Rendy Anthony
http://solyaris.wordpress.com
On Thu, May 27, 2010 at 9:50 AM, shacker wrote:
> I
Bingo! Thanks much.
./s
On May 26, 6:57 pm, Rendy Anthony wrote:
> You also need to return the result of bar() from foo. Example:
>
> def bar(request):
> print "In bar"
> return HttpResponseRedirect('"http://example.com";)
>
> def foo(request):
> return bar()
>
> Regards,
> Rendy Antho
I think the best way is to override the Model's save method:
class Structure(models.Model):
parent
= models.ForeignKey('site.Structure',blank=True,null=True,default=0)
title = models.CharField(max_length=128,verbose_name=u'Заголовок')
url = models.CharField(max_length=48,verbose_name=u
Hey Guys,
I am trying to build this app so we ca re-use it throughout all of the
projects we build.
The re-usable app has it's own model and a FK to a specific model that
it is related to, this is required. Right now I have a setting in my
project settings.py that uses the re-usable that has this
Sounds good! I'm going to try ))
On May 27, 6:45 am, Rendy Anthony wrote:
> I think the best way is to override the Model's save method:
>
> class Structure(models.Model):
> parent
> = models.ForeignKey('site.Structure',blank=True,null=True,default=0)
> title = models.CharField(max_length
57 matches
Mail list logo