Hi,
I have unittests in my django applications and I have a strange
behavior:
When I run the tests, I am getting each print-out to log from my
application twice.
I am using the standard python logging libraries.
Does anyone know this issue?
Thanks,
Arshavski Alexander.
--~--~-~--~~--
I think you can try accessing books/publisher_list.html instead of
just publisher_list.html
This should solve the problem, if I understand it correctly.
Regards, Alex A.
On Jan 4, 11:11 am, HB wrote:
> Hey,
> My Django project has the following structure:
> +++
> djcode
> # Django files
Try something like:
students = Student.objects.all()
absences = Absences.objects.all()
for absence in absences:
students.remove(absence.fk)
Maybe I'm wrong somewhere in the syntax, but the idea should be clear.
Regards, Alex A.
On Jan 2, 6:57 pm, Mathieu Steele wrote:
> Here is an example
Hi,
I have the following problem:
I have models.py with the following class:
class Section(Feed):
parent = models.ManyToManyField('self', blank=True, null=True)
depth = models.IntegerField(editable=False)
def save(self):
self.depth = 1
if self.parent:
self
Thanks, Meir.
On Jan 7, 11:24 am, mksoft wrote:
> Hi Alex,
>
> On Jan 4, 12:27 pm, knight wrote:
>
>
>
> > Hi,
>
> > I have the following problem:
> > I have models.py with the following class:
>
> > class Section(Feed):
> > parent
Hi,
You can do it by adding:
class Meta:
ordering = ['name']
to you Name class.
Regards, Alex A.
On Dec 24 2008, 9:17 am, "Aaron Lee" wrote:
> Hi I have a ManyToMany field names in my class and I would like to show the
> names in sorted order (according to 'name') in the admin interfa
Hi,
My question is:
Is there a way to change my default app url in development server
from http://localhost:8000 to http://localhost:8000/peergw.
If it's a problem, maybe someone have a good reference for configuring
apache server on MAC.
Regards,
Arshavski Alexander.
--~--~-~--~~-
Hi,
I want to override admin template: index.html.
I have found the template but not the view that renders it.
Maybe someone know how django rendering index.html template and where
I can find the view?
Thanks,
Arshavski Alexander.
--~--~-~--~~~---~--~~
You receive
Hi,
Thanks for the fast reply.
I read this but I still cannot find the view that renders index.html.
Regards,
Arshavski Alexander
On Feb 4, 9:52 am, Kenneth Gonsalves wrote:
> On Wednesday 04 Feb 2009 1:18:53 pm knight wrote:
>
> > I want to override admin template: index.html
you trying to do? If your development appserver is conflicting with
> a locally installed apache then why not just use a different port?
>
> python manage.py runserver 8001
>
> 2009/2/4 knight
>
>
>
> > Hi,
>
> > My question is:
>
> > Is there a way
My problem is that I want to pass additional variables to index.html.
So I thought I can do it if I add these variables to view that renders
index.html.
Regards, Alex A.
On Feb 4, 10:55 am, Kenneth Gonsalves wrote:
> On Wednesday 04 Feb 2009 2:05:37 pm knight wrote:
>
> > Thanks
d be used
> > > >> only for dev server, not for apache.
>
> > > > What about simply using the django.root PythonOption when running under
> > > > Apache:
>
> > > >http://docs.djangoproject.com/en/dev/howto/deployment/modpython/#basi...
>
&
Hi,
I have the following classes in my models.py:
class Default(models.Model):
name = models.CharField(max_length=50, choices =
(('rental_period', 'rental_period'), ('currency', 'currency')),
unique=True)
value = models.CharField(max_length=50)
class Media_biz(models.Model):
name =
, Alex A.
On Feb 5, 10:59 pm, Rajesh Dhawan wrote:
> On Feb 5, 10:59 am, knight wrote:
>
>
>
> > Hi,
>
> > I have the following classes in my models.py:
>
> > class Default(models.Model):
> > name = models.CharField(max_length=50, choices =
> >
Thanks,
My Media_biz is edited inline in another class. So I have:
class MetadataInline(admin.StackedInline) and
class MetadataAdmin(admin.ModelAdmin)
Can you tell what method I should override and in which class in order
to set the initial value while editing inline?
Regards, Alex Arshavski.
Hi,
I have models.py like this:
class Media_biz(models.Model):
---
default = models.BooleanField("Default", blank=True, null=True)
---
def get_default_Media_biz():
if Media_biz.objects.filter(default=True).count() != 0:
return Media_biz.objects.filter(default=True)[0]
Hi,
I'm using postgres database in my Django application.
Is there a way to check if the database is empty from my models.py? (I
mean before the first syncdb)
Thanks, Arshavski Alexander.
--~--~-~--~~~---~--~~
You received this message because you are subscribed t
Hi,
I have a django application where I override the main admin page
(index.html in template/admin)
I use apache, I have a link to admin media folder and I have a
following problem:
In my admin pages I see the admin templates on all the pages except
the one I overrided (index.html).
Is anyone kn
Hi,
I am trying to install django application on CentOS 5 and I'm getting
this error, when I go to the admin page:
ImportError: Could not import settings 'mx30.settings' (Is it on
sys.path? Does it have syntax errors?): No module named mx30.settings
my httpd.conf looks like this:
LoadModule py
Hi,
I have the following class in my models.py:
class MainCategory(models.Model):
title = models.CharField(max_length=50)
value = models.DecimalField(default=0, max_digits=5,
decimal_places=3)
secid = models.SlugField(max_length=1000, editable=False)
def save(self):
if no
Hi,
I have html page with inline editing. (I have text, that when I click
on it, it changes to edit box, and I can change the text)
I do it with some java scripts. (http://www.yvoschaap.com/index.php/
weblog/ajax_inline_instant_update_text_20/)
The problem is that I should save the text that I ch
Hi,
I have a django project with the following apache configuration:
LoadModule python_module modules/mod_python.so
SetHandler python-program
PythonPath "['/home/alex'] + sys.path"
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE mx30.settings
PythonOption django.root
Hi,
I want to turn off the login when going to the admin page url.
I want to enter to admin pages as anonymous/no user and require login
only in 2 specific urls.
How can I turn off the login request in the beginning?
Thanks, Arshavski Alexander.
--~--~-~--~~~---~--~--
Hi,
I'm trying to install my django application on CentOS 5 and I'm
getting the following error:
ImportError: Could not import settings 'mx30.settings' (Is it on
sys.path? Does it have syntax errors?): No module named mx30.settings
My httpd.conf looks as follows:
Listen 80
SetHandler python-p
Hi,
I have 2 servers with my django app:
The first one has python2.5 as default python and the second don't (It
has python2.5 installed together with the older version).
I want to run dumpdata from my application and I have the following
problem:
If I call: "python manage.py dumpdata" the second
Hi,
I have a django application running on apache2 with default
httpd.conf.
Is anybody knows a simple way to configure apache2 (httpd.conf) for
the best performance.
I mean allow maximum amount of simultaneous users?
Thanks, Alex A.
--~--~-~--~~~---~--~~
You recei
Hi,
I have a django application running on apache2 with default
httpd.conf.
Is anybody knows a simple way to configure apache2 (httpd.conf) for
the best performance.
I mean allow maximum amount of simultaneous users?
Thanks, Alex A.
--~--~-~--~~~---~--~~
You recei
Hi,
I have installed django app with wsgi. I see that by default I have
directory browsing enabled in my static files and I want to turn it
off.
My httpd.conf:
LoadModule python_module modules/mod-wsgi.so
WSGIScriptAlias /peergw /home/alex/mx30/django.wsgi
Alias /media/ /var/www/media/
Alias /
Hi,
I have override 2 admin templates: index.html and base_site.html.
The first line of index.html is: {% extends "admin/base_site.html" %}
Everything works fine, but if I insert {{ MEDIA_URL }} in
base_site.html, I get the following error when going to my admin page:
TemplateSyntaxError at /adm
Thanks for the reply.
It doesn't matter where I put {{ MEDIA_URL }}.
I get the error in any case
On Oct 20, 11:09 am, bruno desthuilliers
wrote:
> On 20 oct, 09:56, knight wrote:
>
> > Hi,
>
> > I have override 2 admin templates: index.html and base_site.html.
> &
Hi. I have a problem with configuring my django site with mod_wsgi.
My httpd.conf is:
LoadModule wsgi_module modules/mod-wsgi.so
WSGIScriptAlias /peergw C:/mxhw/mx30/django.wsgi
Order deny,allow
allow from all
Alias /media/ "C:\Program Files\Apache Software Foundation
\Apache
ia alias looks like:
>
> Alias /media/ "C:/Program Files/Apache Software
> Foundation/Apache2.2/htdocs/django/media/"
> Foundation/Apache2.2/htdocs/django/media/">
> Order allow,deny
> Allow from all
>
>
>
>
> On Sun, Nov 8, 2009 at 11:37 PM, kni
I'm trying to install app engine with django 1.1 on windows.
When launching the app engine I'm getting the following error:
http://slexy.org/view/s21oLrbkHh
The steps I do are:
1.) Create new app via launcher
2.) Copy my code (Which is empty django project)
My main.py code: http://slexy.org/view/
Hi,
I need my django app to listen to port 80 and port .
I have 2 servers. One is listening to both ports and one is not
listening to .
The first one's apache conf is:
Listen
WSGIRestrictStdout Off
WSGIPassAuthorization On
LoadModule wsgi_module modules/mod-wsgi.so
WSGIScriptAlias /
I have OSX machine running django app with appengine launcher and a
wirtual machine with windows XP running the same app.
The problem is that I have 2 XP machines where I get: "No module named
urls". What can be the problem? Maybe some system variables?
The code is exactly the same.
Regards, Arsha
HI
I have a django application running on app engine and I want to add a
twitter login to my application.
Do you have a good links how to do that. I already registered my app
in twitter.
Just don't know how to do login/logout buttons.
Thanks, Arshavski Alexander
--
You received this message bec
I have the following form:
class ModuleItemForm2(forms.ModelForm):
class Meta:
model = Module_item
fields = ('title', 'media', 'thumb', 'desc', 'default',
'player_option')
The model is:
class Module_item(models.Model):
title = models.CharField(max_length=100)
layout =
If that's actually in the source, I'd fix it before looking any
> harder.
>
>
>
>
>
> On Wed, Apr 28, 2010 at 10:32 AM, knight wrote:
> > I have the following form:
>
> > class ModuleItemForm2(forms.ModelForm):
> > class Meta:
> >
Hi,
I want to upload a file in 2 steps.
First I want to upload it and show the errors and on the second step I
want actually to save the file data in the database.
So I made a simple form and my problem is how to pass the same file to
the form on the second step.
I mean how to insert request.FILES
Hi,
I'm trying to deploy a django app with fabric and get the following
error:
Alexs-MacBook:fabric alex$ fab config:instance=peergw deploy -H -
u -p
[192.168.2.93] run: cat /etc/issue
Traceback (most recent call last):
File "build/bdist.macosx-10.6-universal/egg/fabric/main.py", line
419, i
Hi,
I have pretty big django app running on django 1.0.2 and I want to
move it to django 1.2.1 since I want to use multiple databases.
What are the minimal changes that I need to make in order to work with
1.2.1?
I mean, what should I do regarding csrf and so on...
Is there a good place to read ot
Is anybody knows a good post or blog about these thing including csrf
changes?
On Jul 28, 4:33 pm, Maksymus007 wrote:
> On Wed, Jul 28, 2010 at 3:29 PM, Massimiliano Ravelli
>
> wrote:
> > On Jul 28, 3:13 pm, knight wrote:
> >> What are the minimal changes that I need
Does anybody knows a good post or blog about the changes including
csrf?
On Jul 28, 4:33 pm, Maksymus007 wrote:
> On Wed, Jul 28, 2010 at 3:29 PM, Massimiliano Ravelli
>
> wrote:
> > On Jul 28, 3:13 pm, knight wrote:
> >> What are the minimal changes that I need to ma
Thank you all for the links and advises.
It really helps me.
Regards, Alex A.
On Jul 29, 10:32 am, Russell Keith-Magee
wrote:
> On Wed, Jul 28, 2010 at 9:29 PM, Massimiliano Ravelli
>
> wrote:
> > On Jul 28, 3:13 pm, knight wrote:
> >> What are the minimal changes that
Hi,
I am using django 1.2.1. I dumped the auth data with natural keys (--
natural), but when I try to load them I get the following error:
Installing xml fixture 'auth' from absolute path.
Problem installing fixture 'auth.xml': Traceback (most recent call
last):
File "/var/peertv/peergw/.env/li
I have django application and I'm using postgres.
I try to execute the bollowing line in one of my tests:
print BillingUser.objects.all()
and I get the following error: "current transaction is aborted,
commands ignored until end of transaction block."
My postresql log is here: http://slexy.org/vi
Hi,
I want to use some fixtures in my tests.
I have cms_sample app and a fixtures folder inside with
cms_sample_data.xml
I use the following in my test.py:
class Funtionality(TestCase):
fixtures = ['cms_sample_data']
But the fixtures are not loaded. What am I missing?
Thanks, Arshavski Ale
Thanks. I solved the problem. I added transaction.rollback() to one of
the exceptions. Thanks
On Feb 1, 2:27 pm, Shawn Milochik wrote:
> Do you have any messages coming from prior to that? The error you're
> receiving comes when something else has blown up with your database
> transaction, and
Hi,
Thanks for the reply.
Checked both things and it's fine.
I mean, I can load the fixtures with loaddata and I'm importing from
django.test.
Any other ideas?
On Feb 1, 4:28 pm, Russell Keith-Magee wrote:
> On Mon, Feb 1, 2010 at 10:01 PM, knight wrote:
> > Hi,
>
Hi,
I'm trying to move from django 1.0.2 to 1.1 and I am getting the
following error in one of my templates:
Request Method: GET
Request URL:http://localhost:8000/conserv/media_assets/vod/
Exception Type: TemplateSyntaxError
Exception Value:Caught an exception while rendering: 'NoneTy
Thanks,
You are great. It also solves my problem. :)
On Feb 15, 3:32 pm, bruno desthuilliers
wrote:
> On Feb 15, 1:30 pm, knight wrote:
>
> Don't know if it has anything to do with your problem, but there's an
> error in your form:
>
>
>
> > My form:
How can I just enable anonymous user in Django?
I mean, what is the minimum I should do to be logged in as anonymous
first time I go to my site?
Regards, Arshavski Alexnder.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group,
I have the following models: http://slexy.org/view/s20T8yOiKZ.
When I try to click add button for worlds in admin page it shows me
the following error:
has more than 1 ForeignKey
to .
I think it's something to do with inline.
What can it be?
Regards, Arshavski Alexander.
--
You received this me
Hi,
I'm trying to add filter and search to my site.
It's exactly the same code as in another working django project. The
difference is that this time I do it with app engine.
my views: http://slexy.org/view/s21GMw2sh1
my forms: http://slexy.org/view/s21XX8bquM
my search function: http://slexy.org
Thanks.
On Apr 2, 4:22 pm, Waldemar Kornewald wrote:
> On Apr 2, 12:26 pm, knight wrote:
>
> > 1.) I get error: "'Query' object has no attribute 'all'" on line 59 in
> > views.
> > As I understand it's something to do with the f
Hi,
I have a large fixture initial_data.xml and I'm trying to syncdb on
new Postgres database, & though it says it imported 764 objects, I see
none in the db.
After a little investigation, I think it is related to dependencies
between classes (foreign keys), which aren't handled in the right
orde
Hi,
I have a large fixture initial_data.xml and I'm trying to syncdb on
new Postgres database, & though it says it imported 764 objects, I see
none in the db.
After a little investigation, I think it is related to dependencies
between classes (foreign keys), which aren't handled in the right
orde
If I put the objects in my fixture in the right order, I can see them
in the database after they are loaded.
Do you have any other suggestions?
Regards,
Alex.
On Jan 15, 12:40 am, "Russell Keith-Magee" <[EMAIL PROTECTED]>
wrote:
> On Jan 14, 2008 11:46 PM, knight <[E
Arshavski.
On Jan 15, 9:09 am, knight <[EMAIL PROTECTED]> wrote:
> If I put the objects in my fixture in the right order, I can see them
> in the database after they are loaded.
> Do you have any other suggestions?
>
> Regards,
> Alex.
>
> On Jan 15, 12:40 am, "Rus
Arshavski.
On Jan 15, 9:09 am, knight <[EMAIL PROTECTED]> wrote:
> If I put the objects in my fixture in the right order, I can see them
> in the database after they are loaded.
> Do you have any other suggestions?
>
> Regards,
> Alex.
>
> On Jan 15, 12:40 am, "Rus
I used the same fixtures data.
I'm sorry, but I don't have Python 2.3.5 environment anymore, so I can
not check it.
Regards, Alex Arshavski.
On Jan 17, 12:42 am, "Russell Keith-Magee" <[EMAIL PROTECTED]>
wrote:
> On Jan 16, 2008 10:47 PM, knight <[EMAIL PROTE
something to make it more complicated! Woo!
More:
http://stackoverflow.com/questions/1380281/set-snow-leopard-to-use-python-2-5-rather-than-2-6
Adam Knight
codepoetry - http://www.codepoetry.net/products/
On Nov 16, 2009, at 11:40 PM, jd_python wrote:
> What am I possibly doing wrong?
pics/db/queries/#complex-lookups-with-q-objects
Adam Knight
codepoetry - http://www.codepoetry.net/products/
--
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 unsub
mands/convertdrupal.py)
Adam Knight
codepoetry - http://www.codepoetry.net/products/
--
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 t
, {'url': '/admin/wkw1/lawyer/'}),
> )
>
> but this too results in a server error.
>
> Any suggestions?
>
> Thanks.
Order matters.
urlpatterns = patterns('',
(r'^wkw1/$', 'sw1.wkw1.views.index'),
)
urlp
hem with the conditions you want and then apply the
aggregate operation to that.
Adam Knight
codepoetry - http://www.codepoetry.net/products/
--
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...
Ensure it's the save() method on the FORM and not the MODEL. :)
On Mon, Jan 18, 2010 at 12:23 PM, GoSantoni wrote:
> Hi Nek4life,
>
> Unfortunately that didn't work.
>
> TypeError at /blog/new/
> save() got an unexpected keyword argument 'commit'
> Request Method: POST
> Request URL: http://lo
Thanks
Ramdas
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
No, I neve touched any of those
I guess it has to do with the fact that I do not have article.id
property.
What did I do wrong in models this time around
Ramdas
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"D
Hi,
I am using Django 1.2 and developing using Model formsets. Using
JavaScript, I am allowing the user to dynamically "Add another" formset on
the template, but I can't figure out what exactly I have to modify in the
management forms, for all the formsets to be successfully saved.
The documen
check this snippet out: djangosnippets.org/snippets/1389
> */*
> Le 1 juil. 2012 06:27, "Knight Samar" a écrit :
>
>> Hi,
>>
>> I am using Django 1.2 and developing using Model formsets. Using
>> JavaScript, I am allowing the user to dynamically "
Just so you know, it is bad practice to use "import * " when importing
modules in python.
With many modules being used, you can run into conflicting definitions.
Plus, it increases overhead - potentially an exponential decrease in
performance!
--
You received this message because you are subs
I am using Django 1.3.1 and I have the following piece of models:
class masterData(models.Model):
uid = models.CharField(max_length=20,primary_key=True)
class Meta:
abstract = True;
class Type1(masterData):
pass;
class Type2(masterData):
pass;
Now, I am trying to get
Hi,
I have a model
> from django.db import models
>
> class Organization(models.Model):
> name = models.CharField(max_length=100,
> blank = False, #mandatory
> help_text = "Name of your Organization",
> verbo
On the description for django.contrib.auth.views.login at
http://docs.djangoproject.com/en/1.2/topics/auth/#django.contrib.auth.views.loginthe
documentation says:
If you are using alternate authentication (see Other authentication sources)
> you can pass a custom authentication form to the login v
3. "(?i)pattern" matches "PATTERN"
--~--~-~--~~~---~--~~
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
76 matches
Mail list logo