On Thursday, March 3, 2011 6:48:21 AM UTC, Vladimir wrote:
>
> Good morning!
> In me first exercise project with Django I met an error message:
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position
> 0: ordinal not in range(128). Admin pages are built without css.
> Then I chan
Good morning !
Unfortunately i cant help you with your problem because i have the same problem
here ;)
I can however answer youre question if this is a common problem for django
beginners.
I don't think it's common for django beginners, i'd rather say it's common for
python beginners - like me
Good morning!
In me first exercise project with Django I met an error message:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position
0: ordinal not in range(128). Admin pages are built without css.
Then I changed all .py-files entering
# -*- coding: utf-8 -*-
into the first row and r
Thank you very much!!! It works!
I followed "Python Web Development with Django. J.Forcier, P.Bissex,
W.Chun" (I used russian edition). They instruct readers to include
registration statement in model.py:
Chapter 2 (my reverse translation from russian into English): Open
file mysite/blog/models.py,
What do you mean by 'gunicorn instance' here?
> The idea is that in each gunicorn instance I set the
> DJANGO_SETTINGS_MODULE to a different settings.py file, and hopefully
> get the corrrect result.
In any case, I highly recommend you just use supervisord[1] for this
and put the path to the sett
Hi,
I'm trying to run multiples sites using the sites-framework, and
gunicorn.
I'm using the same project, same databases, only I try to use
different settings.py files with different names.
The idea is that in each gunicorn instance I set the
DJANGO_SETTINGS_MODULE to a different settings.py fi
One option would be to just change the value of MEDIA_ROOT in
settings.py. Or, if you're using 1.3 beta or above, STATIC_ROOT.
You could do this by having multiple settings files -- one main one
with anything that's common across all clients and one settings file
for each client which imports the
On 02/03/11 21:50, Javier Guerra Giraldez wrote:
On Wed, Mar 2, 2011 at 4:21 PM, Tim Sawyer wrote:
However, my web page now gets Harry Størksen instead.
looks like part of your stack is still interpreting utf-8 data as latin1
check that
1: the field
2: the table
3: the database
4: the client
In the README for python-oauth2 (https://github.com/simplegeo/python-oauth2)
there is a good example in the "Logging into Django w/ Twitter" section.
_Mick
On Wednesday, March 2, 2011 at 2:36 PM, Олег Корсак wrote:
> hello. Is there any tutorial/example about oAuth 2.0 built into Django
> and
hello. Is there any tutorial/example about oAuth 2.0 built into Django
and through python-oauth2-1.2.1 ? thanks
signature.asc
Description: OpenPGP digital signature
On Wed, Mar 2, 2011 at 4:21 PM, Tim Sawyer wrote:
> However, my web page now gets Harry Størksen instead.
looks like part of your stack is still interpreting utf-8 data as latin1
check that
1: the field
2: the table
3: the database
4: the client connection
5: the webapp
6: the template
7: the h
Well, looks like things are suddenly working. I started over, and
changed two things: I removed the path from the database file name and
I gave it an extension of .db. The file appeared in the same place as
before, so my path was right, but the .db extension seems to have made
something quite happy
are you getting an errors, maybe 404 erros when the request is being
made for the media files?
On Feb 25, 1:07 pm, Kopch wrote:
> Hi all! I'm noob in django. I've installed Pinax project in windows
> virtualenv, after i've made static files collect with build_media.
> Everything were collected in
So continuing with this... I got the print-outs to work (I still need
to try Stefano's suggestion)... I register a new user (duh6) via my
register page and in the output for the dev server, I see:
in myproject.cc.models: for user , pr
ofile already exists
in cc.models: for user ,
profile alread
Hi,
I have a postgres database that is LATIN1. It contains extended
characters, for example Harry Størksen.
I dumped this out to a file:
pg_dump -U dbuser db > db.sql
and then ran iconv
iconv --from-code latin1 --to-code utf-8 db.sql > db-utf8.sql
and then imported into a database which h
Hi,
using the PostgreSQL backend I have a complex query
q = Model.objects.filter(…)
that selects some objects using multiple joins and some geoDjango magic.
Then there are some other simpler queries like
q2 = OtherModel.filter(foreign__in = q.query)
q3 = YetAnotherModel.filter(foreign__in =
I've got two models. Here's what I'm trying to do:
class InterestSet(models.Model, MailChimpAPIMixin):
name = models.CharField(help_text="The interest grouping to add.
Grouping names must be unique.", max_length=128, unique=True)
content_type = models.ForeignKey(ContentType, blank=True,
nu
Hi all,
Still working through that tutorial. I am just curious: why are none
of the class variables called self.var, but rather just var? For
example:
import models
class Poll(models.Model):
question=models.CharField(max_length=200)
Should that not be
self.question=...
instead? Otherwise, saying
I am using Python 2.6.6 on mint 10. I just installed django from
synaptic. This is not a django-specific question, but I am hopeful
that the answer will be helpful to other noobs.
Given that I have the following python script installed on my
machine:
myFooLoader.py
And I point my browser to
http:
I'm looking to "white label" a site built using Django.
For those unfamiliar with white-labeling, we would like my site (call it
"Amazing Site") to be able to be customized by sponsors A and B. Customer A
provides us with their header, footer, css, and we can do *basic*
re-branding, in order to pr
On 2 mar, 19:31, Jeremiah wrote:
(snip)
>> Given the above statement, I assume the "models.py" file you're
>> talking about is not the one where you define your UserProfile class.
(snip)
> It is the same models.py file with the UserProfile class. Is this the
> incorrect way to set this up? I h
I discovered the recent changes to the "is_valid()" model form method
in 1.2, and I'd love to hear thoughts on the rationale behind this
change.
I have this kind of code:
item = Item.objects.get(id=1)
print 'item.value: %s' % item.value
form = ItemModelForm(request.POST, instance=item
I appreciate all of your feedback! My comments inserted within the
message below:
> What does cc.models.UserProfile looks like ?
class UserProfile(models.Model):
user = models.OneToOneField(User)
thing = models.CharField(max_length=200)
def __unicode__(self):
I'll give that a shot. Thank you for your feedback. Still learning a lot as
I go.
On Tue, Mar 1, 2011 at 8:07 PM, Stefano wrote:
> why you don't create the profile only if needed ?
>
> class UserProfile(models.Model):
>user = models.ForeignKey(User, unique=True)
>
> User.profile = property(
On Mar 2, 2011, at 8:28 AM, Rodrigo Cea wrote:
> I am developing a site that I want to link with Facebook and Twitter.
>
> So as to not reinvent the wheel, I'm looking for apps or snippets that can
> help with this, specifically:
>
> 1) allow users to register and login with their Facebook and
I will answer to myself (after having been trying for over an hour, I
found the answer a couple of minutes after posting my question)
products =
Product.objects.filter(productlicence__client=client).distinct()
--
You received this message because you are subscribed to the Google Groups
"Django
Sorry for the question,
but I've been trying for over an hour and just when I post this
message, I find the answer!!
Here is it:
products =
Product.objects.filter(productlicence__client=client).distinct()
Hope that it will be useful
--
You received this message because you are subscribed to the
Hello everybody
this is maybe simple but I can't succeed in making a query.
here is my model:
class Client(models.Model):
user= models.OneToOneField(User)
product_licence= models.ManyToManyField('ProductLicence',
blank=True, null=True)
class ProductLicence(models.
I am developing a site that I want to link with Facebook and Twitter.
So as to not reinvent the wheel, I'm looking for apps or snippets that can
help with this, specifically:
1) allow users to register and login with their Facebook and/or Twitter
accounts.
2) Have these accounts be linked to
Hi All,
I am a django newbie and I have a pretty small question
here
I need to register a customized admin view, so I edited
/admin.py file and added the customized fieldsets, which is
working perfectly fine
However, I need to design a form with nested fi
I recently switched a project from mysql to postgres and started to
see httpd throwing intermittent 500 errors.
mod_wsgi (pid=26467): Exception occurred processing WSGI script '/
htdocs/django.wsgi'.
Traceback (most recent call last):
File "./lib/python2.6/site-packages/django/core/han
Thanks for solution.
I have also encounter similar problem before. I have found the name for
socket file appeared in exception content is different from which MySQL
server using, but don't know how where to indicate the socket file name.
/etc/mysql/my.cnf
2011/3/2 draix
> Hey Pulkit,
>
> I've h
On Wed, Mar 2, 2011 at 3:01 PM, vanderkerkoff wrote:
> Thanks Graham
>
> I went for the first option and added the path to my mysql libraries
> to /etc/ld.so.conf
>
> Never had to do that before though, and I've installed this type of
> system many many times. This one is newer ubuntu and newer m
Hi Jirka,
Am 01.03.2011 21:44, schrieb Jirka Vejrazka:
this does not seem to me like something you would be able to do
using SQL (or Django ORM) only. I would guess that you'll have to
write a bit of Python code that will walk through the entries and
detect those that are different from "prev
If you need to run tasks outside the request/response cycle, then you
should be using celery.
http://celeryproject.org/
Celery includes something called periodic tasks.
http://ask.github.com/celery/userguide/periodic-tasks.html
You just need to make a task that updates the value in cache, and th
I'm using the emencia newsletter, and things are essentially fine,
except that I've run into a very strange permissions issue in the admin
backend. I have my regular user login, and the superuser. I've given my
regular user all permissions for all newsletter models, and yet some of
the inter-modal
Hi all,
Pardon me if this is the wrong list for the issue I have.
I have a .htaccess file containing the following lines:
AddType text/x-component .htc
RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} .
RewriteRule ^(.*)\.php(.*)$ http://www.mydomain/forum/? [R=301,L]
RewriteRule ^for
On 3/2/11, Kenneth Gonsalves wrote:
> On Tue, 2011-03-01 at 23:14 -0500, Alex Hall wrote:
>> I get a very long traceback, ending with sqlite3.OperationalError:
>> unable to open database file.
>
> looks like a permissions problem. Does the webserver have permissions to
> write to the parent direct
hello,
i've a problem extending the TimeFormat class (used by "time" template
filter).
basically, i need a new method:
def F(self):
if self.date.minute == 0:
return self.G()
return u'%s:%s' % (self.G(), self.i())
very similar to the original one except for a G()
Hi community
I have two models in two apps,
first named newsItem
from django.db import models
from datetime import datetime
class newsItem(models.Model):
pubDate = models.DateTimeField('date
published',default=datetime.now())
author = models.CharField(max_length=20, default="author")
On 2 mar, 00:50, Jeremiah wrote:
> Hi All,
>
> So, if I do the following from the shell (as spawned by manage.py):
> >>> import cc.models
What does cc.models.UserProfile looks like ?
> >>> from django.contrib.auth.models import User
> >>> u = User.objects.get(username__exact="duh3")
> >>> try:
>
thanks sincerely
2011/3/2 bruno desthuilliers
> On 1 mar, 16:30, Bill Liao wrote:
> > On Tuesday, March 1, 2011, iRick wrote:
> > > hi,i'm a freshman for python. i got a problem about "Modules"
>
> Python-related questions should go to comp.lang.python.
>
> > > this is my dir
> > > A/
> > >
thank you so much
2011/3/1 Bill Liao
> On Tuesday, March 1, 2011, iRick wrote:
> > hi,i'm a freshman for python. i got a problem about "Modules"
> > this is my dir
> > A/
> > a.py
> > __init__.py
> > B/
> > __init__.py
> > b.py
> > C/
> >
That's nice. I must check it.
--
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 this group, send email to
django-users+unsubscr...@googlegroups.com.
For more
44 matches
Mail list logo