Thank you for all your insights.
> I think you are stuck in the monolithic point of view. I'm also not sure if
> you understand that django apps are python modules and the same rules apply.
>
> The apps location within the PYTHONPATH is immaterial to a project, as long as
> the project can find
i tried djangohosting.ch after webfaction. webfaction have better support
response times which as a noob i needed. wf have some incredibly
knowledgable staff on their support team. so it depends what you want. dh
have a great installer, so long as you know what you're doing they're a good
choic
On Fri, 2011-03-11 at 01:33 -0800, shofty wrote:
> i tried djangohosting.ch after webfaction. webfaction have better
> support
> response times which as a noob i needed. wf have some incredibly
> knowledgable staff on their support team. so it depends what you want.
> dh
> have a great installer
On 11 mar, 07:58, Anoop Thomas Mathew wrote:
> Hi all,
>
> I have a Profile model, which has a ForiegnKey to User model. I want to edit
> both of it at same form.
>
> this is what I tried,http://dpaste.de/ODOJ/
> Still, no success. Please help.
You'll have to provide a bit more informations if
Hi,
I know this topic was discussed a lot, but in every post for this
topic there are diffrent configuration and this stop helping for me.
Long story short : I changed DEBUG = True to False and all static
media are gone, so this is something wrong in web server conf.
#settings.py#
impor
On Fri, Mar 11, 2011 at 9:32 AM, Bruno Tikami wrote:
> have you tried Geraldo Reports [0] ? It's flexible, easy to use and worth a
> look ;-)
>
Looks neat - i havent tried it, but does it support non-pdf output too?
--
You received this message because you are subscribed to the Google Groups
Hi all :)
I tried to deploy django with the following. But I couldn't able
succeed. Please let me know the exact steps in configuring apache
server, configuring mod_wsgi.
I had gone through the official site. But couldn't understand it
completely the configuration process.
apache, mod_wsgi, ngin
On Fri, 2011-03-11 at 04:17 -0800, balu wrote:
> I tried to deploy django with the following. But I couldn't able
> succeed. Please let me know the exact steps in configuring apache
> server, configuring mod_wsgi.
>
> I had gone through the official site. But couldn't understand it
> completely th
It's a date format MySQL will accept into a date field.
On Mar 10, 8:07 pm, Kenneth Gonsalves wrote:
> On Thu, 2011-03-10 at 09:46 -0800, octopusgrabbus wrote:
> > load_date = '-00-00'
>
> what on earth is this?
> --
> regards
> KGhttp://lawgon.livejournal.com
> Coimbatore LUG roxhttp://ilugc
I want to make a specific odrer of WHERE statements in my query to use
multicolumn index in database.
But oder in code is not the same as result query:
code:
filter(user=self.user, province=self.province, city=self.city)
Mysql result:
WHERE (`accounts_usercity`.`province_id` = 6 AND
`accounts_us
> [0] http://geraldoreports.org/
>
Doesn't work without www
http://www.geraldoreports.org
- Gennadiy
--
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
On Fri, 2011-03-11 at 04:28 -0800, octopusgrabbus wrote:
> It's a date format MySQL will accept into a date field.
I suppose it can be used for recording Adam's date of birth?
--
regards
KG
http://lawgon.livejournal.com
Coimbatore LUG rox
http://ilugcbe.techstud.org/
--
You received this messag
Le 11 mars 2011 à 13:25, Kenneth Gonsalves a écrit :
> On Fri, 2011-03-11 at 04:17 -0800, balu wrote:
>> I tried to deploy django with the following. But I couldn't able
>> succeed. Please let me know the exact steps in configuring apache
>> server, configuring mod_wsgi.
>>
>> I had gone through
In my opinion you should add alias in nginx.conf for admin media
files. Put this code in server{}
# admin uses admin-media/
# alias works different than root above by dropping admin-
media
location ^~ /media/admin/ {
alias /usr/local/lib/python2.6/dist-packages/django/
Hi guys. Am using django non-rel on appengine. I am using django's
auth backend for my authentication, since I did not want to have to
force my users to use gmail logins, and appengine models
{google.appengine.ext.db} for the other models. I have a form where I
allow users to edit their email. So :
Hi,
I am just getting started with Django (1.2.5) on Fedora. I would like
to create separate test data files to be loaded to the test database
for each test case for the mysite/ app. I have the following code
snippets (based on the Django tutorial):
=== mysite/polls/tests.py ===
from django.test
On Fri, 2011-03-11 at 13:40 +0100, Xavier Ordoquy wrote:
> >> I had gone through the official site. But couldn't understand it
> >> completely the configuration process.
> >>
> >> apache, mod_wsgi, nginx, mysql on ubuntu 10.10
> >
> > first make up your mind - do you want apache or nginx? You ca
Here is the error log sir.
[Wed Feb 09 22:23:25 2011] [notice] Apache/2.2.16 (Ubuntu) configured
-- resuming normal operations
[Wed Feb 09 23:28:09 2011] [notice] caught SIGTERM, shutting down
[Wed Mar 09 20:10:30 2011] [notice] Apache/2.2.16 (Ubuntu) configured
-- resuming normal operations
[We
On Fri, 2011-03-11 at 16:48 +0530, Shakthi Kannan wrote:
> No fixtures found.
I tried this out after you brought it up in IRC and made the smallest
possible test. It works for me regardless of what name I give the
fixtures file as long as it is in the fixtures directory of the
application. You mus
On Fri, 2011-03-11 at 04:46 -0800, balu wrote:
> Here is the error log sir.
nobody asked you for the apache error log. To repeat:
please paste the following:
1. what error does your browser show
2. the relevant part of your apache config file (please do not post the
whole config file)
3. your dj
hai
I have two models as shown belove
from django.db import models
from django.db.models import Sum
# Create your models here.
class polls(models.Model):
question = models.CharField(max_length=200)
pubish_date = models.DateTimeField('Date published')
def __unicode__(self):
OK - I'm going to ask the obvious question here - have you made sure
that Apache web server user can read ALL your configuration files? The
log reveals that there are permission problems on .htaccess file that
is stored in your home directory (where Apache can't reach by
default). I'm going to make
I tend to use the Admin for internal tasks - ones that would be
performed by a application or system administrator. These are people
that understand the data structure and know things like the effects of
a cascaded delete.
For users, even a customer 'admin' person, I would write my own views
that
1. When I open "http://localhost/"; page, it is an error message
"Forbidden. You don't have permission to access / on this server".
2. with in /etc/apache2/sites-available/ directory I created a file
named "locahost". In that I placed the Virtual Host settings.
NameVirtualHost *:80
DocumentRoo
I guess it's because of Django v1.0 release - people started to
consider it like stable production-safe framework. So most of Django
books came out after that, though most of them have few revisions to
be up to date, but in searches first revision usually most noticeable.
--
You received this mes
Go watch:
http://code.google.com/p/modwsgi/wiki/WhereToGetHelp?tm=6#Conference_Presentations
That presentation explains a lot about permissions and other errors you can.
Recommend that before you even try and get Django running that you get a
WSGI hello world script running. Use what is shown i
One can if you want to get a development system closer to production use
Apache/mod_wsgi in such a way that automatic code reloading on any change
works, just like Django development server. See:
http://blog.dscpl.com.au/2008/12/using-modwsgi-when-developing-django.html
http://blog.dscpl.com
Hello folks,
I'm a long time Python developer that is new to Django. I have a few
questions about the role of inheritance in the models for an app.
As I build my models, I'm finding at least somewhat of a need to start
doing some inheritance, and if not a need--at least a design-related
desire t
On Friday, March 11, 2011 12:41:52 am DaleB wrote:
> One last point.
> Now, how do i deal best with different versions/branches of my app? Do
> you just switch branches while developing or do you use pip in project
> env to refer and switch to different tags/branches in your sourcecode.
> The firs
I guess i wasn't clear enough. I am not so much concerned with when to
use tags and when to use branches.
I am still looking for a smooth development workflow.
I created a libs-dir which i put on my python path an put my different
apps in it.
Okay, now i can refer to my apps from any project withou
Hi,
I am looking for the most straightforward way to introspect
the model field name a ManyRelatedManager is bound to.
from django.db import models
class Topping(models.Model):
pass
class Pizza(models.Model):
toppings = models.ManyToManyField(Topping)
def get_fieldname(manager):
Im using webfaction and its the best!
I have 2 question,
1 How can I make an online backup with webfaction?
2 I start to have new customers and I need a hosting to resell to my
customers. Can I use webfaction but actually I can only buy new ram
for my hostcan I buy one hosting per customer
On Friday, March 11, 2011 07:52:22 am DaleB wrote:
> I guess i wasn't clear enough. I am not so much concerned with when to
> use tags and when to use branches.
> I am still looking for a smooth development workflow.
> I created a libs-dir which i put on my python path an put my different
> apps in
I could easily have used the Informix "null" date of 12/31/1899, but
chose that instead. I put the dates into a table, so when they were
processed they'd be set to a real date, today's.
On Mar 11, 7:39 am, Kenneth Gonsalves wrote:
> On Fri, 2011-03-11 at 04:28 -0800, octopusgrabbus wrote:
> > It'
On Fri, Mar 11, 2011 at 3:41 AM, DaleB wrote:
> One last point.
> Now, how do i deal best with different versions/branches of my app? Do
> you just switch branches while developing or do you use pip in project
> env to refer and switch to different tags/branches in your sourcecode.
> The first ap
On Fri, Mar 11, 2011 at 3:52 PM, DaleB wrote:
> I guess i wasn't clear enough. I am not so much concerned with when to
> use tags and when to use branches.
> I am still looking for a smooth development workflow.
> I created a libs-dir which i put on my python path an put my different
> apps in it.
Hi,
I'm wondering if it's possible to chain StackedInlined object in a
django admin page.
Let me explain it:
I have a class UserProfile which is linked by a OneToOneField to the
django auth module class User. By this way (which is recommended) I
store additionnal informations about my users. In th
Hi ,
I am trying to sum in HTML,but template tag return 0 ,
View.py
def gen_Report(request):
### query returns below output
list=[{'total': 1744, 'user': u'x'}, {'total': 13, 'user': u'y'},
{'total': 126, 'user': u'z'}, {'total': 46, 'user': u'm'}, {'total': 4,
'user': u'n'}
Hi JAson,
Thanks a ton,it worked
--
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 m
Hi all -
I have two models with a many-to-many relationship: Restaurant and
Cuisine. The Cuisine table contains, e.g., "Italian", "Mexican",
"Chinese", etc. Each Restaurant record can be associated with one or
more Cuisines.
Here's the thing: I'd like to limit this to three Cuisines per
Restauran
On Mar 11, 2011, at 5:02 AM, pols wrote:
> hai
> I have two models as shown belove
>
> from django.db import models
> from django.db.models import Sum
> # Create your models here.
> class polls(models.Model):
> question = models.CharField(max_length=200)
> pubish_date = models.DateTime
I have in my models, some tables that hold static information, like
status codes, types and descriptions, for example:
in models.py:
class CustomerStatus(models.Model):
name = models.CharField()
class CustomerType(models.Model):
name = models.CharField()
class Customer(models.Model):
greetings,
we are using django trunk, updated from time to time. we were using
revision 13303, and then wanted to update to the current revision
(15776 at the time). upon updating to 15776, the caching behaviour of
our apps changed. we are using CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True
and authenti
I put a simple Django site (using only admin so far) in front of a
MySQL DB used as a backend by a freeradius server.
For each radius user, I need to update the 'radcheck' table, which
contains one or more attributes for each user.
+---+--
| Field| Type
+--
On Thursday, March 10, 2011 11:59:15 PM UTC-8, Ndungi Kyalo wrote:
>
> Hi guys. Am using django non-rel on appengine. I am using django's
> auth backend for my authentication, since I did not want to have to
> force my users to use gmail logins, and appengine models
> {google.appengine.ext.db} f
On Mar 11, 2011, at 10:46 AM, Daniel Roseman wrote:
> On Thursday, March 10, 2011 11:59:15 PM UTC-8, Ndungi Kyalo wrote:
> Hi guys. Am using django non-rel on appengine. I am using django's
> auth backend for my authentication, since I did not want to have to
> force my users to use gmail login
> If I have my abstract super classes inherit models.Model, things
> technically can work. However, I arrive with a rather overly complex
> SQL design generated from them (like needless tables for abstract
> super classes).
>
> On the other hand, if I have my abstract super classes NOT inherit
>
How can I have "user defined fields" ( not field types).
So user will define some custom fields (with standard types) and it
will be shown and available to all members of his group on screens and
forms.
--
You received this message because you are subscribed to the Google Groups
"Django users
Hi greenie,
you just need to override the save method from your model Restaurant.
Before saving each instance, you check if the restaurant already has
3 Cuisine's objects associated. If yes, you don't save the instance
and raise an error for exemple, if no, just call the standard method
of the su
edit: you don't need to raise an error if the restaurant already has 3
Cuisine's objects associated, you just need to return a string with
the explanation of the error.
On 11 mar, 20:11, gontran wrote:
> Hi greenie,
>
> you just need to override the save method from your model Restaurant.
> Befor
I see this project is an old project http://code.google.com/p/django-voting/
Not sure if it is actively maintained anymore. is this the one I
should look into using or is there a newer one that super seeded this
app.
--
You received this message because you are subscribed to the Google Groups
"
Reload, restart and still nothing.
I have my admin-media syn-linked to my media folder, is it wrong ?
Because I see alias to this folder.
>From apache error log I know only that every request get [error
500].
On 11 Mar, 13:42, krzysiekpl wrote:
> In my opinion you should add alias in nginx.conf
Dnia 11-03-2011 o 18:06:43 greenie2600 napisał(a):
Hi all -
I have two models with a many-to-many relationship: Restaurant and
Cuisine. The Cuisine table contains, e.g., "Italian", "Mexican",
"Chinese", etc. Each Restaurant record can be associated with one or
more Cuisines.
Here's the thing:
I think proxies are the solution.
I am struggling to wrap my head 'round this concept, but I believe
this will be helpful:
http://lincolnloop.com/blog/2010/dec/16/using-proxy-models-customize-django-admin/
--
You received this message because you are subscribed to the Google Groups
"Django user
gontran -
Thanks.
However, I tried the sample code in your link, and I don't think it
will work. Returning a string from the overridden save() method
prevents the record from being saved to the database, but by the time
the save() method is invoked, my ModelForm (and consequently, I
presume, the
bagheera -
I had seen the limit_choices_to parameter, but I thought it controlled
*which* choices are available to the user - not *how many* they're
allowed to choose.
I want to show the user a list of 20 or 30 cuisines, but forbid them
from checking more than three.
Can you show me an example o
Dnia 11-03-2011 o 21:23:38 greenie2600 napisał(a):
gontran -
Thanks.
However, I tried the sample code in your link, and I don't think it
will work. Returning a string from the overridden save() method
prevents the record from being saved to the database, but by the time
the save() method is i
Dnia 11-03-2011 o 21:29:29 greenie2600 napisał(a):
bagheera -
I had seen the limit_choices_to parameter, but I thought it controlled
*which* choices are available to the user - not *how many* they're
allowed to choose.
I want to show the user a list of 20 or 30 cuisines, but forbid them
from
Dnia 11-03-2011 o 21:29:29 greenie2600 napisał(a):
bagheera -
I had seen the limit_choices_to parameter, but I thought it controlled
*which* choices are available to the user - not *how many* they're
allowed to choose.
I want to show the user a list of 20 or 30 cuisines, but forbid them
from
Dnia 11-03-2011 o 21:39:01 bagheera napisał(a):
Dnia 11-03-2011 o 21:29:29 greenie2600
napisał(a):
bagheera -
I had seen the limit_choices_to parameter, but I thought it controlled
*which* choices are available to the user - not *how many* they're
allowed to choose.
I want to show the us
Hello,
Can Model.clean() method help you? [1] You'll still have to pay
attention to validation before trying to save your instances.[2]
Regards,
[1]
http://docs.djangoproject.com/en/dev/ref/models/instances/#django.db.models.Model.clean
[2] http://docs.djangoproject.com/en/dev/releases/1.2/
I didn't try it, but werefr0g may be right. It seems that
Model.clean() is the method do you need. And you can still add a
javascript control for more convenience without the risk that if a
user deactivate javascript, the error will be saved.
Let us know greenie if it's ok with this method.
On
On Ubuntu 10.10, the libmod_wgsi uses Python 3.1. Will this be
incompatible with Django? Must I compile the mod_wgsi for Python 2.6?
Thanks much in advance,
gr
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
I have an app that I'm starting to write tests for. The app uses
south for all migrations and mysql for the db.
I wrote some tests and also created an initial_data.json fixture to
provide some default data. If I run "python manage.py test", the
database is created via sqlite, the tests are run,
On Fri, Mar 11, 2011 at 4:21 PM, groovyroovy wrote:
> On Ubuntu 10.10, the libmod_wgsi uses Python 3.1. Will this be
> incompatible with Django? Must I compile the mod_wgsi for Python 2.6?
>
>
I don't believe so, per this thread:
http://groups.google.com/group/modwsgi/browse_thread/thread/796974f
Hi,
I am testing django 1.3 class based generic views. I have a model like
this one:
class Book(models.Model):
name = models.CharField(max_length=50)
author = models.CharField(max_length=50)
and in views.py:
class BookUpdateView(CreateView):
model = Book
template_name = "create_
I'm trying to use the the built-in authentication framework/middlework
but so far haven't figured out how to use it correctly. I'm just
starting a new project with this and I have placed the
"@login_required" decorator in front of my first view and want to
force the user to login at this time. I ha
werefr0g—
Yep, that's actually the solution I'm looking into right now. However,
I'm getting an error when trying to save a new instance of the
Restaurant model:
"'Restaurant' instance needs to have a primary key value before a many-
to-many relationship can be used."
Here's the new code that's
Hi
You should use {{ list | running_total }}
and the filter should look like this:
from django.template import Library
register = Library()
@register.filter
def running_total(role_total):
return sum( [d.get('total') for d in role_total] )
2011/3/11 sushanth Reddy
> Hi ,
>
> I am trying t
On Fri, Mar 11, 2011 at 5:59 AM, Benjamin Roberts wrote:
> So I don't mean to be confrontational at all. I am learning Django
> and really like it.
We all do :)
> I'm forming a startup and we've already decided
> to go with it to build our applications.
I think Python/Django is perfect for
Hi,
I'm doing a file upload from one of my forms and writing the content
to a temp file on the server. The problem is any file of size more
than 250 KB is throwing the below error:
Request Entity Too Large
The requested resource
/tera/tera_upload/
does not allow request data with POST requests, o
On Fri, 2011-03-11 at 05:34 -0800, balu wrote:
> 1. When I open "http://localhost/"; page, it is an error message
> "Forbidden. You don't have permission to access / on this server".
see if your home directory has an 'x' permission at the end:
drwx--x--x 103 lawgon lawgon 4096 2011-03-11 18:
hi,
I am trying to run a test using assertContains, but get this error:
AttributeError: 'SourceTestCase' object has no attribute
'assertContains'
my code:
from django.utils import unittest
from incident.models import Source
from django.test.client import Client
class SourceTestCase(unittest.
On Friday, March 11, 2011 10:19:27 pm Kenneth Gonsalves wrote:
> hi,
>
> I am trying to run a test using assertContains, but get this error:
>
> AttributeError: 'SourceTestCase' object has no attribute
> 'assertContains'
>
> my code:
>
> from django.utils import unittest
from django.test impor
On Friday, March 11, 2011 11:04:39 pm Mike Ramirez wrote:
> assertContains is a django specific test and located in test.TestCase with
> the others (you can find TransactionTestCase in there also).
>
I should also add, TransactionTestCase is the base for TestCase and TestCase
is really a patch
On Fri, 2011-03-11 at 23:04 -0800, Mike Ramirez wrote:
> >
> > from django.utils import unittest
>
> from django.test import TestCase
>
> the stuff in utils.unittest is unittest2 stuff if you're using python
> <2.7
> (unittest2 is part of 2.7 now as unittest).
I am using 2.6, but according to
On Friday, March 11, 2011 11:11:21 pm Kenneth Gonsalves wrote:
> On Fri, 2011-03-11 at 23:04 -0800, Mike Ramirez wrote:
> > > from django.utils import unittest
> >
> > from django.test import TestCase
> >
> > the stuff in utils.unittest is unittest2 stuff if you're using python
> > <2.7
> > (unit
On Friday, March 11, 2011 11:21:02 pm you wrote:
> The problem here is that assertContains is not part of unittest/unittest2.
>
> It's defined in TransactionTestCase in django.test, which extends
> unittest2.TestCase and adds in assertContains, assertNotContains,
> assetFormError, basically django
On Fri, 2011-03-11 at 23:23 -0800, Mike Ramirez wrote:
> On Friday, March 11, 2011 11:21:02 pm you wrote:
> > The problem here is that assertContains is not part of
> unittest/unittest2.
> >
> > It's defined in TransactionTestCase in django.test, which extends
> > unittest2.TestCase and adds in as
79 matches
Mail list logo