Actually, what he wanted was just to override a field, and not the whole
form, but he can do it with slight modifications of your code. He would
override the form class he wants to modify, instead of creating a generic
one, and instead of iterating all the fields he would just set the relevant
one(
i follow these documentation for create form
http://docs.djangoproject.com/en/dev/topics/forms/
i use command for create application
#python manage.py startapp form
after this a use this code in model.py file
from django import forms
class ContactForm(forms.Form):
subject = forms.CharField
On Aug 4, 9:19 am, Jagdeep Singh Malhi
wrote:
> i follow these documentation for create form
>
> http://docs.djangoproject.com/en/dev/topics/forms/
>
> i use command for create application
> #python manage.py startapp form
>
> after this a use this code in model.py file
>
> from django import form
Hi,
SQL is created for models, not for forms. Maybe you should try following the
tutorial first (it's near the top of the Django documentation page), and
then move to other documentation for the specifics.
- Paulo
On Wed, Aug 4, 2010 at 9:19 AM, Jagdeep Singh Malhi wrote:
> i follow these docu
Hello,
I have an application that runs on Django 1.2.1 and uses
django_auth_ldap.backend.LDAPBackend in terms of authentication.
In version 1.2.1, is it possible to create local users without
superuser?
In fact, I added django.contrib.auth.backends.ModelBackend and I have
created a user local non-
Hi,
Is there a way to change the text shown in the select widget for each
option? I have the following form where player2 is a foreign key to
user.
class MatchForm(forms.ModelForm):
class Meta:
model = Match
fields = ['player2','result','date']
widgets = {'result': fo
Problem solve
@Steve Holden
Thanks sir
--
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.
>
> Why do you think you would get any SQL with that? You're creating a
> form, not a model.
ok
I also want to store the value in database using form.
Now what i can do?
any tutorial of that?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
If possible, the easiest way would be to create a form based on a model
(subclass ModelForm). When you save the form the values will be stores in
the appropriate database fields.
To answer your final question, the 4 part tutorial I mentioned covers that.
- Paulo
On Wed, Aug 4, 2010 at 10:09 AM,
Hello, Can anyone help me?
I have list of fields called 'allowed_fields' and I have object called
'individual'.
allowed_fields is sub set of individual. Now I want to run loop like
this
for field in allowed_fields:
obj.field = individual.field
obj have same fields like individual. Do you have
Oops! I copied the old class with the "self" mistake left in. The
correct class is:
class SettingsAdmin(admin.ModelAdmin):
def changelist_view(self, request, extra_context=None):
object_id = str(Settings.objects.all()[0].id)
return super(SettingsAdmin, self).change_view(self,
Hi Bill, thanks for the valuable inputs. I could hit a better solution
and I believe that is simplest one. Better, the solution is on the
application side and not on the DJango side.
What I did was this -
When my parser starts reading data from files (for which I don't know
the encoding), it first
Hi,
http://docs.djangoproject.com/en/dev/topics/testing/#multi-database-support
tells me to add "multi_db = True" to my unittest TestCase class to get
multi db support.
I'm using a doctest, however, and I can't figure out how to set that for
my doctest. Anyone know how to get that working?
Hi,
A quick search on google turned up the following:
http://trac-hacks.org/ticket/6321
It looks like it might be a similar issue. Was due to missing
dependencies - python-dev (among others)
Maybe if you use pip to install, it might take care of these
dependencies for you?
John
On Aug 4, 7:4
On Wed, 2010-08-04 at 01:19 -0700, Jagdeep Singh Malhi wrote:
> i use command for create application
> #python manage.py startapp form
>
> after this a use this code in model.py file
>
> from django import forms
>
> class ContactForm(forms.Form):
> subject = forms.CharField(max_length=100)
>
On Wed, 2010-08-04 at 02:09 -0700, Jagdeep Singh Malhi wrote:
> > Why do you think you would get any SQL with that? You're creating a
> > form, not a model.
> ok
> I also want to store the value in database using form.
make a model - use ModelForm - or just plain form
>
> Now what i can do?
> any
Hi.
im using python 2.6, django 1.1, eclipse3.4, and pydev 1.6, macbook
pro mac os 10.6.4.
trying to do the tutorial:
http://docs.djangoproject.com/en/dev/intro/tutorial02/
first of all, i DID syncdb. -> no problem.
i check using dbshell, .dump. -> says django_session DOES EXISTS.
Changed urls.p
On Wed, 2010-08-04 at 03:43 -0700, joconnell wrote:
> It looks like it might be a similar issue. Was due to missing
> dependencies - python-dev (among others)
actually it was due to missing python-dev
--
You received this message because you are subscribed to the Google Groups
"Django users" g
Have you run the script manage.py with syncdb option?
python manage.py syncdb
On Wed, Aug 4, 2010 at 12:44, merabi wrote:
> Hi.
> im using python 2.6, django 1.1, eclipse3.4, and pydev 1.6, macbook
> pro mac os 10.6.4.
> trying to do the tutorial:
> http://docs.djangoproject.com/en/dev/intro/tu
i did as i wrote above.
2010/8/4 Alexandre González
> Have you run the script manage.py with syncdb option?
>
> python manage.py syncdb
>
> On Wed, Aug 4, 2010 at 12:44, merabi wrote:
>
>> Hi.
>> im using python 2.6, django 1.1, eclipse3.4, and pydev 1.6, macbook
>> pro mac os 10.6.4.
>> trying
this is just a guess but i think the path is not set right.
but i don know how to set it correctly.
On Wed, Aug 4, 2010 at 8:39 PM, Yoji H wrote:
> i did as i wrote above.
>
> 2010/8/4 Alexandre González
>
> Have you run the script manage.py with syncdb option?
>>
>> python manage.py syncdb
>>
On Wed, Aug 4, 2010 at 6:40 PM, Reinout van Rees wrote:
> Hi,
>
> http://docs.djangoproject.com/en/dev/topics/testing/#multi-database-support
> tells me to add "multi_db = True" to my unittest TestCase class to get multi
> db support.
>
> I'm using a doctest, however, and I can't figure out how to
Hi dear friends
finally , i finish my first app tutorials of djangoproject.com . i
want to share this whith u ,
i wish it'll be helpfull .
note to change dir template in setting,py .
http://www.4shared.com/file/23TzJzLt/mysite.html
--
You received this message because you are subscribed to the G
On 8/3/2010 11:03 PM, shmengie wrote:
> I cobbled these two classes together which work very nicely for me,
> wish they could make into django.
> Drop these two classes into a util.py and import them instead of Form
> or ModelForm. When you want your form readonly instantiate it with
> "form=MyFor
hi , congratulation.
why don't you use a VCS like git or mercurial ?
--
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-user
On 8/4/2010 5:26 AM, ars_sim wrote:
>
>
> Hello, Can anyone help me?
>
> I have list of fields called 'allowed_fields' and I have object called
> 'individual'.
> allowed_fields is sub set of individual. Now I want to run loop like
> this
>
> for field in allowed_fields:
> obj.field = individual
On 8/4/2010 5:43 AM, Erisa wrote:
> Oops! I copied the old class with the "self" mistake left in. The
> correct class is:
>
> class SettingsAdmin(admin.ModelAdmin):
> def changelist_view(self, request, extra_context=None):
> object_id = str(Settings.objects.all()[0].id)
> retu
I am somewhat new to Django and am trying to use the ModelFormSets
alongside multiple-databases.
I'm trying to create an empty ModelFormSet that will allow me to
create objects for a specific database and pull in the appropriate
drop-downs from that database. What I'm seeing is that the Form Set
gedit + plugins + snippets is easier to learn than vim(gvim) and looks more
beautiful :) , but on windows there is bad support of python plugins (if you
really need to develop on win)
vim may be more flexible
Wing IDE not free. I meant version with django support
(http://wingware.com/wingide/featur
After I do:
kos...@baikal$ python manage.py runserver
Error: No module named messages
kos...@baikal$
Django 1.2.1 with python 2.6.5+ devel installed.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-u
SOLVED!
On Aug 4, 3:48 pm, kostia wrote:
> After I do:
>
> kos...@baikal$ python manage.py runserver
> Error: No module named messages
> kos...@baikal$
>
> Django 1.2.1 with python 2.6.5+ devel installed.
--
You received this message because you are subscribed to the Google Groups
"Django user
Hi,
On 2010-08-04 08:43:34 +0200, kostia said:
But I have a trouble with Imaging-1.1.7!
Take a look at Pillow: http://pypi.python.org/pypi/Pillow/1.2
Kai
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email to
I'm trying to move some code from a view to a decorator to use with
many views. This is the view:
views.py:
def list_type(request):
inst_id=request.session.get('inst_id',None)
## move to decorator
if not inst_id:
path = urlquote(request.get_full_path())
tup = reverse
A decorator is a specific construction in Python (and one that doesn't
appear in your code):
http://www.python.org/dev/peps/pep-0318/#current-implementation-history
http://www.artima.com/weblogs/viewpost.jsp?thread=240808
Good luck!
Franklin
On Wed, Aug 4, 2010 at 9:15 AM, Dan Gentry wrote:
>
On Aug 4, 1:20 am, lukaszb wrote:
> Hi all,
>
> I'd like to announce django-guardian - very basic yet usable per
> object permissions
> implementation for Django 1.2, using new authorization backend
> facilities.
>
> It was created during 2 days sprint, code have been released and may
> be found a
Hello friends,
this is André AS from São Paulo-Brazil, total beginner to Python
technologies, I am working on a project that uses those we are
converting all those to Java, so I would like to know where I must put the
logic rules I am a little confusing if I must put on Python or Django
code... Whi
On Aug 4, 2:38 pm, André A. Santos wrote:
> Hello friends,
> this is André AS from São Paulo-Brazil, total beginner to Python
> technologies, I am working on a project that uses those we are
> converting all those to Java, so I would like to know where I must put the
> logic rules I am a little co
On Aug 4, 2:15 pm, Dan Gentry wrote:
> I'm trying to move some code from a view to a decorator to use with
> many views. This is the view:
>
> views.py:
> def list_type(request):
>
> inst_id=request.session.get('inst_id',None)
>
> ## move to decorator
> if not inst_id:
> path
hmmm...
Dr thanks for answering... my doubt is if is better put the business rules
code on Python or Django... got it?
On Wed, Aug 4, 2010 at 10:50 AM, Daniel Roseman wrote:
> On Aug 4, 2:38 pm, André A. Santos wrote:
> > Hello friends,
> > this is André AS from São Paulo-Brazil, total beginner
On 2010-08-04, at 16:04 , André A. Santos wrote:
> hmmm...
> Dr thanks for answering... my doubt is if is better put the business rules
> code on Python or Django... got it?
>
As Daniel indicated, your question doesn't make sense. Django is Python, that's
like asking whether you should write with
2010/7/3 Sean Brant
>
> Im not even sure if this is best way to display things, I would like
> one main product edit screen that lets you attach "product types"
> which have "sizes" to a "product", it seems jumping between a bunch of
> screens is not good ux. Wondering if I need to create a custo
I did it by adding this to my models:
def get_model_name(self):
return self.__class__.__name__
And it works
But I don't want to define the 'get_model_name' method in my model.
Is there a built-in way?
Thanks.
--
You received this message because you are subscribed
Why Google has updated Youtube framework for Java, .NET and PHP, but not
for Python ?
It was a real question. I need it for my Python project. And, I don't
understand why Google choose to update Java, .NET and PHP apis and not
Python. It is my "cost to pay", because Python is not yet a mainstream
Hi,
You're asking if you'd rather put all the business logic in pure python classes
or django models ?
I'm not sure there's a straight answer to this, esp with no information about
what you're trying to do.
Regards,
Xavier.
Le 4 août 2010 à 16:04, André A. Santos a écrit :
> hmmm...
> Dr tha
How about writing a simple template tag that takes an object and
returns object.__class__.__name__?
On Aug 4, 10:20 am, "David.D" wrote:
> I did it by adding this to my models:
> def get_model_name(self):
> return self.__class__.__name__
>
> And it works
>
> But I don
When I attempt to use the decorator logic, the view becomes this:
views.py
@institution_required
def list_type(request):
inst_id=request.session.get('inst_id',None)
queryset = RecordType.objects.filter(institution=inst_id)
return object_list(request, queryset, paginate_by = 12)
I do
Forgot to paste in the urls.
urls.py
from django.conf.urls.defaults import *
from django.views.generic.simple import redirect_to
from views import *
urlpatterns = patterns('person',
url(r'^create_type/$',create_type,name='type_create'),
url(r'^view_type/(?P\d+)/$',view_type,name='type_v
Sorry if this is obvious and you're looking for a more direct way, but If
it's only the formset save that fails, I would suggest:
instances = formset.save(commit=False)
for instance in instances:
instance.save(using=database)
I have never used multiple databases though, so I don't know if tha
Well your example clarifies the problem. I removed the unicode calls.
The initial problem was an UnicodeEncodeError exception. I tried to
solve it by encoding the strings to utf-8. It seems that's not the
case.
So i'm at square one.
Note that..
-with python manage.py runserver the app runs flawl
now i got it... thx
On Wed, Aug 4, 2010 at 11:09 AM, Masklinn wrote:
> On 2010-08-04, at 16:04 , André A. Santos wrote:
> > hmmm...
> > Dr thanks for answering... my doubt is if is better put the business
> rules
> > code on Python or Django... got it?
> >
> As Daniel indicated, your question
for exemple using MVC parttern how it works ->
M - model (Python)
V - view (JSP)
C - controller (Django or also Django on Model tier?)
On Wed, Aug 4, 2010 at 12:00 PM, André A. Santos
wrote:
> now i got it... thx
>
>
>
>
> On Wed, Aug 4, 2010 at 11:09 AM, Masklinn wrote:
>
>> On 2010-08-04, at
Is there an equivalent mailling list for WAP?
I am in need of a very simple demo website/webpage accessible by
mobile handset and simply get a few critical data, e.g.
its id, or/and x, y, z position.
http://www.google.co.uk/search?hl=en&q=how+to+mobile+website&aq=8&aqi=g10&aql=&oq=how+to+mobile&gs_
There's no django's built-in way?
On Aug 4, 10:37 pm, Scott Gould wrote:
> How about writing a simple template tag that takes an object and
> returns object.__class__.__name__?
>
> On Aug 4, 10:20 am, "David.D" wrote:
>
>
>
> > I did it by adding this to my models:
> > def get_model_nam
This relates to:
http://docs.djangoproject.com/en/dev/faq/general/#django-appears-to-be-a-mvc-framework-but-you-call-the-controller-the-view-and-the-view-the-template-how-come-you-don-t-use-the-standard-names
Le 4 août 2010 à 17:02, André A. Santos a écrit :
> for exemple using MVC parttern how i
On 8/4/2010 10:52 AM, Dan Gentry wrote:
> When I attempt to use the decorator logic, the view becomes this:
>
> views.py
> @institution_required
> def list_type(request):
>
> inst_id=request.session.get('inst_id',None)
>
> queryset = RecordType.objects.filter(institution=inst_id)
> r
Surprising that anybody would be offended by the OP's post. Why do people so
readily see red? As for the "think special" part, one would have to be
pretty intent on getting upset to miss the sarcasm.
The English is not perfect, but this isn't a language course.
On Wed, Aug 4, 2010 at 4:24 PM, d
Hi,
I want to record an entry in admin log,everytime a user logs in.How
can I do this.I am using django's default authentication modules.
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...@
On 2010-08-04, at 17:35 , Sithembewena Lloyd Dube wrote:
> Surprising that anybody would be offended by the OP's post. Why do people so
> readily see red? As for the "think special" part, one would have to be
> pretty intent on getting upset to miss the sarcasm.
Surprising that anybody would read
I'm no expert on encodings so I can only suggest some alternatives that
might get around the issue:
First, maybe you can find something here:
http://docs.python.org/howto/unicode
You could try the literal method of generating a unicode string:
path = u'%s%s' % (ROOT, name)
Where exactly do you
On 2010-08-04, at 16:24 , didier rano wrote:
> Why Google has updated Youtube framework for Java, .NET and PHP, but not
> for Python ?
>
> It was a real question.
It isn't, however, one which has any reason to be asked on this mailing list
does it?
> because Python is not yet a mainstream langua
Not that I'm aware of, in which case I'd say a tag (or even a filter)
*is* the "built-in way". No great hardship:
@register.filter
def class_name(value):
return value.__class__.__name__
On Aug 4, 11:13 am, "David.D" wrote:
> There's no django's built-in way?
>
> On Aug 4, 10:37 pm, Scott Go
On 08/04/2010 01:49 PM, Russell Keith-Magee wrote:
Doctests don't do any database flushing, so there is no analog for the
multi-db flag. Just make your calls on the database as you normally
would.
Ah, ok.
Then I'm doing something else wrong (I've only got doctests right now):
my second datab
I don't believe anybody *was* offended - the OP asked "What do you think
about this post ?", and he got sincere responses that would, if taken to
heart, help to improve that post.
regards
Steve
On 8/4/2010 11:35 AM, Sithembewena Lloyd Dube wrote:
> Surprising that anybody would be offended by th
About "mainstream language"...
If you ask to Java, C# developers about Python, then some of them should be
know Python and have a good definition about it.
If you ask to Java developers about C#, then all of them should be know it
and have a good definition about it.
If you ask to C# developers ab
Effectively, my next post should be better. Maybe focus on more technical
subjects. And, I would like to work with someone to correct my bad english !
2010/8/4 Steve Holden
> I don't believe anybody *was* offended - the OP asked "What do you think
> about this post ?", and he got sincere respons
Hi,
The second database should be created. Maybe you want to double check you setup
a database router.
You also want to take care to fixture file name which expects you to add the
database name in the file name.
So far, the only issue I found with testing on multi database is that django
1.2 e
> If you ask to Java, C# developers about Python, then some of them should be
> know Python and have a good definition about it.
> If you ask to Java developers about C#, then all of them should be know it
> and have a good definition about it.
> If you ask to C# developers about Java, then a
One more thing... I have an iphone and a macbook air !!!
It could be dangerous to imagine be "different". Sometimes it is my case
too.
2010/8/4 didier rano
> Effectively, my next post should be better. Maybe focus on more technical
> subjects. And, I would like to work with someone to correct m
On 2010-08-04, at 17:59 , didier rano wrote:
> About "mainstream language"...
>
> If you ask to Java, C# developers about Python, then some of them should be
> know Python and have a good definition about it.
> If you ask to Java developers about C#, then all of them should be know it
> and have a
I'm using Editra now, it seems fine and lightweight and have plugin support.
2010/8/4 Рогалевич (Ковалевич)
> gedit + plugins + snippets is easier to learn than vim(gvim) and looks more
> beautiful :) , but on windows there is bad support of python plugins (if you
> really need to develop on win
On 2010-08-04, at 06:15 , Alexander Jeliuc wrote:
> gvim, emacs, eclipse, eric
Don't forget pycharm, whose specific Django support is one of the majorly
pushed features.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, se
Free django hosting:
http://www.alwaysdata.com/
Two details:
- It is in French.
- Not sure if it is allowed for commercial sites so please, be
careful.
Good luck !
On Aug 4, 3:38 am, kostia wrote:
> I'm looking for private person from some government institution/
> university or with his own h
I would like to prevent saving a new value if the database contains a
specific value. This is on a per field, per record basis.
If I override the save() method; is there a way to find the existing (in
the DB) values and the new (to be stored) values?
--
You received this message because you are
I think that you know the answer, no ?
Fortran was a mainstream language
Objective-C is not a mainstream language.
But, mainstream language doesn't mean that these languages are the best.
Python is a good language, and same for Java, C#, Objective-C or Fortran.
Cobol is a good language (Hum, sor
On 2010-08-04, at 19:30 , didier rano wrote:
> I think that you know the answer, no ?
Of course. The answer is that you're making up everything on the spot and
arbitrarily tagging languages as "mainstream" or "non-mainstream" in a feeble
attempt to try and support whatever point you believe havin
Back to django development ?
2010/8/4 Masklinn
> On 2010-08-04, at 19:30 , didier rano wrote:
> > I think that you know the answer, no ?
> Of course. The answer is that you're making up everything on the spot and
> arbitrarily tagging languages as "mainstream" or "non-mainstream" in a
> feeble a
On 8/4/2010 1:38 PM, didier rano wrote:
> Back to django development ?
>
Probably the best idea.
regards
Steve
--
I'm no expert.
"ex" == "has-been"; "spurt" == "drip under pressure"
"expert" == "has-been drip under pressure".
--
You received this message because you are subscribed to the Goog
Im working on an application which will act as a middleware between my
CMS (multiple) and my Video provider. People will be uploading files
through this django application.
Im currently leveraging Django built in file upload handler with the
default settings for chunking. We run django under mod_w
Hi,
I have tried to follow the tutorial for 1.2.1 but i'm having problems
the explanation for adding __unicode__() or __str__() to the class to
make it to list the polls correctly without any success.
addition of this code did not really fix anything in the polls
listings;
lass Poll(models.Model
thanks
On Wed, Aug 4, 2010 at 12:28 PM, Xavier Ordoquy wrote:
> This relates to:
>
> http://docs.djangoproject.com/en/dev/faq/general/#django-appears-to-be-a-mvc-framework-but-you-call-the-controller-the-view-and-the-view-the-template-how-come-you-don-t-use-the-standard-names
>
> Le 4 août 2010 à
I just wonder if there's some way requires writing nothing. Just like
an attribute.
thanks.
On Aug 4, 11:53 pm, Scott Gould wrote:
> Not that I'm aware of, in which case I'd say a tag (or even a filter)
> *is* the "built-in way". No great hardship:
>
> @register.filter
> def class_name(value):
>
I have one dedicated server of my client where we are hosting Plone/
Django sites.
Just mail me and I believe can help you with hosting for a while.
Bests,
Mykola Lys.
On 3 Сер, 19:57, kostia wrote:
> I'm looking for a free Django hosting. Please, write me, if you can
> help.
>
> The web site wi
André,
It seems that you don't understand what Django is. Your question
make no sense.
Take a look at this website: www.aprendendodjango.com/ (it is in portuguese)
It will explain what Django is and what you can do with it.
On Wed, Aug 4, 2010 at 12:02 PM, André A. Santos
wrote:
> fo
Welll, at the django.contrib.auth there are only those (User and
Group) models for which one may define permission sets and I wanted
guardian to be as simply as possible - so it is not possible to assign
permission to other model even if it "groups users". At one point I
thought it could be nice t
For python/django development i'm using... NetBeans! It fails to
autocomplete items properly, but still, i find it most comfortable also
for html, javaScript, CSS.
Sometimes i use Geany, it's really simple, yet nice IDE.
All under Linux.
--
You received this message because you are subscribed
Thanks for the comment! I really do think that this "backends ready &&
included" parts of Django are extremely useful (and fun to extend if
needed).
About the admin, I haven't really get into admin integration yet as I
cannot answer this: should user with "flatpages.change_flatpage"
permission for
wow thank you so much... you have helped me a lot...
AS
On Wed, Aug 4, 2010 at 3:48 PM, Renne Rocha wrote:
> André,
>
> It seems that you don't understand what Django is. Your question
> make no sense.
>
> Take a look at this website: www.aprendendodjango.com/ (it is in
> portuguese)
>
> It
On Aug 4, 6:48 pm, Alec Shaner wrote:
> I'm no expert on encodings so I can only suggest some alternatives that
> might get around the issue:
>
> First, maybe you can find something here:http://docs.python.org/howto/unicode
i've read , pretty much everything, available at docs.python.org
reg
On 08/04/2010 06:08 PM, Xavier Ordoquy wrote:
The second database should be created. Maybe you want to double check you setup
a database router.
I *do* have a database router. The router makes sure that 5 tables end
up in the second database (and the others end up in the default database).
On 31/07/10 Russell Keith-Magee said:
> Ok - I'm repeating myself here, but we take backwards compatibility
> *very* seriously. If anyone can point at a specific backwards
> incompatible change that was introduced in Django 1.2, then that is a
> bug that we need to address, and would in all likeli
I've just spent the better part of an afternoon dealing with this
issue, then finally figured it out this morning.
Supposing you have this situation (which I saw in a django app that
I've been using lately):
urls.py:
(r'^viewtest1$', 'testapp.views.viewtest1'),
(r'^viewtest2$', 'testapp.v
Hi, Im trying to import my models to another python file that I am
making to use the database data. The problem is, I can't import the
models for some reason. It keeps saying "ImportError: no module named
" The thing is, it works on my home computer when I do it, but
when I do it on webfacti
Hi, Im trying to import my models to another python file that I am
making to use the database data. The problem is, I can't import the
models for some reason. It keeps saying "ImportError: Settings cannot
be imported, because environment variable DJANGO_SETTINGS_MODULE is
undefined."
The thing is
i know this isn't what you want, but I'd use the Content Type
middleware.
def getType(self):
if (self._type == None):
self._type = ContentType.objects.get_for_model(self)
return self._type
for me personally this worked out well, but mostly because I have an
abstrac
> Ok, so it appears that (in Python 2.5 at least) there is no way to capture
> the stdout of subprocess.Popen()
just do this
from subprocess import Popen, PIPE
p = Popen([cmd], stdout=PIPE)
p.stdout.readlines()
thats it!
--
You received this message because you are subscribed to the Google Gr
Ah, maybe that makes more sense then. It does indeed sound like locale issue
with your apache + mod_python envrionment. I see an old django ticket that
sounds pretty similar:
http://code.djangoproject.com/ticket/8965
Sounds like you're still getting ASCII as the default encoding despite the
env s
I am attempting to change the redirected for the django admin save
button. What I pasted below works on saving an already existing entry
(updating) but not on saving a new one. Any thoughts?
def change_view(self, request, object_id, extra_context=None):
result = super(TodoAdmin, self).change
If you are looking for a "Full IDE" I have used Eclipse+PyDev (and
other plugins) and works quite well, completion is reasonable and you
have a wealth of extensions such as VCS support, Mylyn Integration (to
work with remote task/issue managers), HTML editing, etc. It is a
little bloated if you are
Shamefully, I didn't even give it a good once over before posting it.
However, I have read through it, and I'm not too ashamed ;) More
comments would be nice, but I was more concerned with the results at
the time and it's not terribly complex code, so I think it stands well
on it's own.
I couldn'
I want to be able to link one model to another model, regardless of
what models they are. Articles can be related to Photos, Videos, other
Articles, etc etc etc.
I have created a Relationship model to represent these relationships,
but I'm unsure if this is the best solution. First off, my
require
1 - 100 of 120 matches
Mail list logo