On Monday 21 June 2010 12:24:58 Torsten Bronger wrote:
> > Also, is this recommended practice, to use "www-data" as the
> > backend database username?
>
> No, not recommended, but not forbidden either.
>
should be forbidden - one does not want apache to have direct access to the
database
--
Re
heya,
Using "www-data" as the backend database username in settings.py
doesn't quite work. If you try to run a ./manage.py syncdb, it spits
out:
Traceback (most recent call last):
File "./manage.py", line 11, in
execute_manager(settings)
File "/usr/local/lib/python2.6/dis
Hi,
I'm currently deploying Django on Apache with WSGI.
Anyhow, I've heard really good things about the Gunicorn (http://
gunicorn.org/) WSGI server, so I was hoping to try it out.
I'm running Ubuntu 10.04, so I've installed the packages from the
official PPA (https://launchpad.net/~bchesneau/+a
On Monday 21 June 2010 12:45:11 Victor Hooi wrote:
> I'm still curious what changed? Perhaps Ubuntu's default pg_hba.conf
>
default always has ident in all distros that I am aware of
--
Regards
Kenneth Gonsalves
Senior Associate
NRC-FOSS at AU-KBC
--
You received this message because you are s
i think i'd be right in saying that template tags are different to the
eggs issue.
i found a post on b-list which explained templatetags and where to put
them.
http://www.b-list.org/weblog/2007/dec/04/magic-tags/
so pretty much always drop the tags inside a folder named templatetags
in your app fo
On 21 June 2010 17:04, Kenneth Gonsalves wrote:
> On Monday 21 June 2010 12:24:58 Torsten Bronger wrote:
>> > Also, is this recommended practice, to use "www-data" as the
>> > backend database username?
>>
>> No, not recommended, but not forbidden either.
>>
>
> should be forbidden - one does not
On Jun 21, 6:46 am, DaNmarner wrote:
> There's a similar question as mine on stackoverflow.com:
>
> http://stackoverflow.com/questions/1081340/how-do-you-do-something-af...
>
> and there isn't a satisfactory answer there.
>
> Basically, how do I do some thing after a view returns the response?
> D
I'm just starting out with Django so using an hourly rate isn't really
applicable because I'm going to be much slower that a 'real'
developer. So far I've spent about 6 months part time.
What kind of ballpark amounts would people suggest this is worth?
I'm not going to tell you how much they thin
On Monday 21 June 2010 13:39:42 Sam Lai wrote:
> > should be forbidden - one does not want apache to have direct access to
> > the database
>
> Storing a password in plaintext file makes me uneasy, even though it
> is locked away through file-system permissions.
>
> Having spent some time recentl
I know this thread is rather old but for those who come across this
trying to identify their issues here's how I got things working for me
on Ubuntu 10.04.
The major issue to the above poster's issue was with permissions. The
www-data user that's running the lighttpd process needs to be able to
e
When installing Mysql-Python I get this error.
Traceback (most recent call last):
File "setup.py", line 5, in
from setuptools import setup, Extension
ImportError: No module named setuptools
Can anyone please help me.
--
You received this message because you are subscribed to the Google G
On Monday 21 June 2010 13:04:19 Eduan wrote:
> When installing Mysql-Python I get this error.
>
> Traceback (most recent call last):
> File "setup.py", line 5, in
> from setuptools import setup, Extension
> ImportError: No module named setuptools
>
install setuptools
--
Regards
Kenneth G
On 21 June 2010 19:47, Kenneth Gonsalves wrote:
> On Monday 21 June 2010 13:39:42 Sam Lai wrote:
>> > should be forbidden - one does not want apache to have direct access to
>> > the database
>>
>> Storing a password in plaintext file makes me uneasy, even though it
>> is locked away through file-
On Monday 21 June 2010 15:37:50 Sam Lai wrote:
> > and a single point of entry to all systems for a cracker
>
> I'm not running them all as admin (aka. root) obviously. Integrated
> auth doesn't mean every user account can access every resource. It's
> really just delegating an application's authe
On 21/06/10 06:46, DaNmarner wrote:
There's a similar question as mine on stackoverflow.com:
http://stackoverflow.com/questions/1081340/how-do-you-do-something-after-you-render-the-view-django
and there isn't a satisfactory answer there.
Basically, how do I do some thing after a view returns t
Federico,
When trying out what Karen suggests then in the unlikely event that
Red Hat doesn't load the environment variables from /etc/apache2/
envvars, one way to find it without consulting documents is to look at
the apache start-up script (e.g. /usr/sbin/apache2ctl) so find that on
your server
On 21 June 2010 20:16, Kenneth Gonsalves wrote:
> On Monday 21 June 2010 15:37:50 Sam Lai wrote:
>> >> You do bring up a interesting point though, and I don't know much
>> >> about the architecture of Apache and how holes are exploited when they
>> >> exist, but if the trespasser can execute arbit
I don't know I'm wondering how to use the fieldsets.can you
help me...how to use the fieldsets...?
On 20 jun, 15:01, Francis Gulotta wrote:
> You might want to look into a css solution.
>
> -Francis
>
> ---
> Francis Gulotta
> wiz...@roborooter.com
>
> On Fri, Jun 18, 2010 at 3:40 PM, Wa
On Monday 21 June 2010 16:21:10 Sam Lai wrote:
> >From the PGSQL docs [1],
>
> "On systems supporting SO_PEERCRED requests for Unix-domain sockets
> (currently Linux, FreeBSD, NetBSD, OpenBSD, BSD/OS, and Solaris),
> ident authentication can also be applied to local connections. In this
> case, no
... I've just noticed the title and hope this doesn't look too much
like spam!!
On Jun 21, 11:12 am, ALJ wrote:
> I'm just starting out with Django so using an hourly rate isn't really
> applicable because I'm going to be much slower that a 'real'
> developer. So far I've spent about 6 months par
On Mon, Jun 21, 2010 at 12:12 PM, Waleria wrote:
> I don't know I'm wondering how to use the fieldsets.can you
> help me...how to use the fieldsets...?
>
Be a bit clearer please.
Fieldset is a HTML tag, it has nothing to do with django. It is used
to group similar fields and surround th
I have some models that (simplified) look like the following.
class Answer(models.Model):
id = models.CharField(max_length=32, primary_key=True)
text = models.TextField(blank=False)
question = models.ForeignKey(Question)
candidate = models.ForeignKey(Candidate)
class Question(mode
Hi,
I am trying to optimize the search of users, as google does.
So I thought having a 2. column in DB with a "normalized" version of the string.
By normalize I mean convert ä to ae etc.
Someone done this before?
On my way searching for a solution, I found this lib for a "did you mean"
search:
On Jun 21, 12:51 pm, JeffH wrote:
> I have some models that (simplified) look like the following.
>
> class Answer(models.Model):
> id = models.CharField(max_length=32, primary_key=True)
> text = models.TextField(blank=False)
> question = models.ForeignKey(Question)
> candidate = m
On Mon, Jun 21, 2010 at 1:37 PM, Henrik Genssen
wrote:
> Hi,
>
> I am trying to optimize the search of users, as google does.
> So I thought having a 2. column in DB with a "normalized" version of the
> string.
> By normalize I mean convert ä to ae etc.
>
> Someone done this before?
>
> On my way
I had to clean my application database from old models without losing
data.
So, I copied my tables to another db, dropped them, run syncdb and
copied data back.
But the app stopped working, because some tables used GenericRelations
and still pointed to the old ContentType; so, I had to change that
Hi,
I had this code in a template file:
alert('{% trans "a string" %}')
It gave error when translated bacause the translated string had a '
inside. So, I replaced " with ' in the template line and all worked
fine.
To avoid any problem with 'escape chars', is there a way to escape
translated strin
On Mon, Jun 21, 2010 at 2:17 PM, donato.gr wrote:
> Hi,
> I had this code in a template file:
> alert('{% trans "a string" %}')
>
> It gave error when translated bacause the translated string had a '
> inside. So, I replaced " with ' in the template line and all worked
> fine.
>
> To avoid any pro
Ok thanks. I've installed the setuptools but now i get another error.
setup_windows.py", line 7, in get_config
serverKey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE,
options['registry_key'])
WindowsError: [Error 2] The system cannot find the file specified
Thanks for all your effort.
Regards
Ed
To clarify: Each race has a set of questions. The candidate may have
responded to none, some, or all. The answers are linked to the
candidate (and to the question). For each candidate, I want to display
all the questions, with or without answer. The way it works currently,
only the questions with a
hi all,
im using djapian for my search , it seems to work fine when i run it
in django development server
but when i configure my sites to use apach2 im always getting this
error when i try to search :
"Caught OSError while rendering: [Errno 13] Permission denied: '/
index'"
i am sure it is not a
It sounds like your project is pretty fully featured and if you claim
to be "inexperienced" in Django development this much work is pretty
impressive on a part-time basis over 6 months!
Currently the Django project I am working on has taken over 2.5 years
(and is ongoing). Although we don't just d
There may well be a better way to do this, especially since it's been
a good year since I was struggling with this myself. (Very similar
case to yours, different subject matter of course.)
The way I ended up doing it was to use a template tag and some list
comprehensions to whittle things down. E.
On Mon, Jun 21, 2010 at 2:12 AM, ALJ wrote:
> I'm just starting out with Django so using an hourly rate isn't really
> applicable because I'm going to be much slower that a 'real'
> developer. So far I've spent about 6 months part time.
>
> What kind of ballpark amounts would people suggest this
That looks reasonable... but I wonder if the ORM can do it directly
somehow. Anyone?
On Jun 21, 10:14 am, Scott Gould wrote:
> There may well be a better way to do this, especially since it's been
> a good year since I was struggling with this myself. (Very similar
> case to yours, different subj
Hi,
I'm trying to make model that has itself as a foreign key, in an
attempt to store a reverse tree in Django.
However, I can't find a way to set a default value to
models.ForeignKey or make it optional.
My model is like this:
class Node(models.Model):
name = models.CharField(max_length=100)
You want:
parent = models.ForeignKey('self', null=True, blank=True)
On Jun 21, 3:37 pm, Magnus Valle wrote:
> Hi,
> I'm trying to make model that has itself as a foreign key, in an
> attempt to store a reverse tree in Django.
> However, I can't find a way to set a default value to
> models.Forei
On Mon, Jun 21, 2010 at 10:37 AM, Magnus Valle wrote:
> Hi,
> I'm trying to make model that has itself as a foreign key, in an
> attempt to store a reverse tree in Django.
> However, I can't find a way to set a default value to
> models.ForeignKey or make it optional.
>
> My model is like this:
>
Hello to all,
I'm trying to do a POST from a python client to a Django webapp using
urllib2 but I'm getting http 403 error.
On the Django side I'm using a Form so I suspect the problem is {%
csrf_token %} (csrf middleware enabled) which I can't provide from the
client side.
Is there other way to
urllib2 can handle cookies and therefore you should be able to handle
the login. It will probably be a fair bit of work to get the client to
submit the various parts, but I'm sure I've seen some examples around
on how to do such a thing.
Euan
On Jun 21, 3:52 pm, srn wrote:
> Hello to all,
>
> I'
I'm no master of the law, I have a lawyer for that, but a quick read about
price fixing seems to suggest that this is not that at all. Rather, price
fixing is an agreement made so that competition in a market is lost by
vendors agreeing upon a rate to sell a product or service for current and
futur
Ah, OK, Thanks!
I didn't know that blank and null are available for all field-types, I
should have known.
Thanks!!
On Mon, Jun 21, 2010 at 15:41, Karen Tracey wrote:
> On Mon, Jun 21, 2010 at 10:37 AM, Magnus Valle wrote:
>>
>> Hi,
>> I'm trying to make model that has itself as a foreign key, i
I hope you get an ORM answer, too. I'm a newbie following this thread and
this sounds like the type of problem I have run into a couple of times
already.
On Mon, Jun 21, 2010 at 9:37 AM, JeffH wrote:
> That looks reasonable... but I wonder if the ORM can do it directly
> somehow. Anyone?
>
>
AFAIK there is no direct way to do this sort of thing in a single
query. select_related will only get foreign key relations into the
query so the ORM will always do an SQL query for each row in your many
to many. In these types of situations I tend to select everything I
need and then run some sort
Hi Euan,
Cheers for that. It's my first Django project and I think in hindsight
I should have started on something a little easier. Nevermind. It's
been a good learning experience.
Before they told me the spec, they said they thought it would cost
about £3k!
Cheers
ALJ
On Jun 21, 4:12 pm, "eua
For one, I want to know if request_finished works here.
On Jun 21, 3:39 am, Daniel Roseman wrote:
> On Jun 21, 6:46 am, DaNmarner wrote:
>
> > There's a similar question as mine on stackoverflow.com:
>
> >http://stackoverflow.com/questions/1081340/how-do-you-do-something-af...
>
> > and there is
I'll soon be deploying a project that will need to be able to
dynamically add domains.
Each domain will have different users, separate data, and a different
SITE_ID, but will all run off a single Django instance. The data will
all be housed in a single database, since all domains' data will need
class Material(models.Model):
products = ManyToManyField('Product', related_name='materials')
class Products(models.Model):
...
class ProductForm(forms.ModelForm):
class Meta:
model = Product
fields = ('materials', )
I want to do this.
I saw this discussion:
http
I would guess that you are trying to access /index with the webserver
user but that is owned by another user and the user that owns the web
process has not the sufficient permissions to do the attempted
operation. Set the permissions on the directory accordingly, perhaps
ownership as well. You co
I am working with my virtual hosting provider to enable him support
Django. I have used him for ages, and having converted myself to
Django would like to help establish another hosting provider with
support for Django.
I have a configuration for his servers and virtual hosting environment
that wor
First I'm new 2 django and have made rapid progress building my app
based on the tutorial. As soon as I get it a little better, I'll clean
it up and remove the "mysite/polls" references.
I have a series of url's like this
/mysite/myapp/datagrid/clients?letter=A
/mysite/myapp/datagrid/reports
/my
On Jun 22, 12:03 am, watad wrote:
> hi all,
>
> im using djapian for my search , it seems to work fine when i run it
> in django development server
> but when i configure my sites to use apach2 im always getting this
> error when i try to search :
>
> "Caught OSError while rendering: [Errno 13]
On Mon, Jun 21, 2010 at 8:49 PM, donato.gr wrote:
> I had to clean my application database from old models without losing
> data.
> So, I copied my tables to another db, dropped them, run syncdb and
> copied data back.
> But the app stopped working, because some tables used GenericRelations
> and
Hello all, i tried searching for a solution to this but didn't find
it. If it's answered somewhere, please point me in the right
direction :)
I was wondering how to create a weekly feed for django. Lets say i
have a table of objects that gets added to all week long. I'd like to
allow people to
On Tue, Jun 22, 2010 at 4:08 AM, maxweld wrote:
> I am working with my virtual hosting provider to enable him support
> Django. I have used him for ages, and having converted myself to
> Django would like to help establish another hosting provider with
> support for Django.
>
> I have a configurat
Doing a nested list comp has to be less efficient than an outer join
done at the db level. For my issue, it's a relatively small data set,
so I'd rather be more pythonic than eg running raw sql. Nonetheless, I
view this as a weakness in Django's ORM, and would plead with TPTB to
provide a solution,
On 2010-06-21, at 5:48 PM, TheIvIaxx wrote:
> I was wondering how to create a weekly feed for django. Lets say i
> have a table of objects that gets added to all week long. I'd like to
> allow people to subscribe to a feed that would give a single update
> with all items that were added that wee
Hi,
i recently encountered a problem due to inefficient performance of
django pagination. After researching, i realized that there is a need
to use django database queries when dealing with django-pagination as
"LIMIT" will automatically be added. This is useful especially when
dealing with huge c
The problem with the first is that users would get a bunch of single
items whenever they were added to the DB. I need to give them a
digest of what happened that week. I had thought of the range idea,
but then you're hitting the DB every hour all week for a single update
which doesn't sound corre
Answering my own question -- it is django.contrib.admindocs.view that
limits the admindocs view to only list methods on a model that has a
single argument. The lines:
for func_name, func in model.__dict__.items():
if (inspect.isfunction(func) and len(inspect.getargspec(func)
[0]) == 1)
60 matches
Mail list logo