Op 28-jan-2011, om 04:09 heeft Corey Richardson het volgende geschreven:
> I'm following the tutorial at [1]. I'm trying to add the app to the
> admin site. I've run manage.py syncdb, and I've restarted the dev
> server. Any hints? The appropriate files that I was instructed to modify
> can be se
Hi,
if I have got several models that have identical code, except for
their save method, how can I use an abstract base class for them? Will
I have to overwrite save() for each model? Or is there a generic way
to define save(), i.e. a way that I have to use only once -- in the
abstract base class?
I have an email template in more than one language, how can I force a value to
be localized to a specific language?
I saw the localize on/off filter tag, but that is not what I need. I need to do
something like this, so I am independent of the current Language ot the user.
{{ event.start_date
On Friday, January 28, 2011 9:21:48 AM UTC, Jaroslav Dobrek wrote:
>
> Hi,
>
> if I have got several models that have identical code, except for
> their save method, how can I use an abstract base class for them? Will
> I have to overwrite save() for each model? Or is there a generic way
> to d
> The whole point of subclassing is that subclasses inherit models from the
> superclass. That's how the model save() method is definted in the first
> place, if you don't override it. What exactly are you having problems with?
It seems that my problems were due to another mistake of mine. I was
t
Cheers for the reply. The database in question is a remote database. I
presume by Django user that you're referring to the local user account?
Otherwise the user credentials in settings should be adequate.
I'm guessing the only resolution to this is to hand craft the models?
--
You received t
The "save def save(self, *args, **kwargs):" should not have the leading save.
Also, if you are making a car system then this structure seems more appropriate:
class CarMake(models.Model):
...
class Car(models.Model):
make = models.ForeignKey(CarMaker)
...
def save(self, *args, **kwargs
Hello,
I just read Messages documentation
(http://docs.djangoproject.com/en/1.2/ref/contrib/messages/#behavior-of-parallel-requests),
and in the "Behavior of parallel requests" section is this note:
"...Note that this is typically not a problem in most applications and will
become a non-issue i
On 26 Jan., 18:33, Roman Klesel wrote:
> Should I open a bug report?
That's what I just did:
http://code.djangoproject.com/ticket/15184
--
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@google
On Friday 28 January 2011 11:45:48 Nathan wrote:
> Cheers for the reply. The database in question is a remote database. I
> presume by Django user that you're referring to the local user account?
> Otherwise the user credentials in settings should be adequate.
>
> I'm guessing the only resolution
On 01/28/2011 03:43 AM, Jonas Geiregat wrote:
>
> Op 28-jan-2011, om 04:09 heeft Corey Richardson het volgende geschreven:
>
>> I'm following the tutorial at [1]. I'm trying to add the app to the
>> admin site. I've run manage.py syncdb, and I've restarted the dev
>> server. Any hints? The approp
On Friday, January 28, 2011 3:09:34 AM UTC, kb1pkl wrote:
>
> I'm following the tutorial at [1]. I'm trying to add the app to the
> admin site. I've run manage.py syncdb, and I've restarted the dev
> server. Any hints? The appropriate files that I was instructed to modify
> can be seen at [2]. Requ
I'm interested in using the ogrinspect command to help build a load.py
file for bringing data from one PostGIS table (in a legacy db) into my
Django project's db. What I can't seem to figure out is how to write the
data source location for a PostGIS layer. Can it be done?
I tried the following:
og
Hey guys does anyone know how i can embed google maps into django? i
am new to django but i am trying to develop an app in which i will
embed a google map of a particular area.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this grou
Hi,
I'm trying to get my first Django app up and running on amazon ec2
fedora 8 instance on apache with mod_python. I've got mod_python MySQL-
python python-devel Django mysql-server installed.
I've got the homepage to show up, but its a very simple view that just
returns text. Anything more comp
Hi all,
I have come across an error when I tried to format a datetime in a webpage.
This the part of webpage:
{% for record in records.object_list %}
{{record.ComplaintPhone}}
{{record.CustomerName}}
{{record.ComplaintTime|time:"Y-m-d
H:i"}}
{{record.Complai
On 01/28/2011 06:30 AM, Daniel Roseman wrote:
> On Friday, January 28, 2011 3:09:34 AM UTC, kb1pkl wrote:
>>
>> I'm following the tutorial at [1]. I'm trying to add the app to the
>> admin site. I've run manage.py syncdb, and I've restarted the dev
>> server. Any hints? The appropriate files that I
> {{record.ComplaintTime|time:"Y-m-d
> H:i"}}
>From the documentation:
"The time filter will only accept parameters in the format string that
relate to the time of day, not the date (for obvious reasons). If you
need to format a date, use the date filter."
So, you need to use:
is there any reason you are using mod_python instead of, say, wsgi?
modpython is deprecated and there are "better" alternatives.
id start with that. looking in apache logs to find out why you have
the 500 error might help.
(a hunch tells me it might be a python path error)
ash
On 28 Jan., 07:45,
Just do a Google search for the Google Maps API. It's the same regardless of
whether you're using Django or something else to generate the HTML pages. You
mainly have to write JavaScript.
Also, search github and bitbucket to see if someone's created and shared some
code for Django to easily gen
You might take a look at
https://launchpad.net/ubuntu-django-foundations/map
It's a fairly new project, but is actively being developed.
--
Michael
On Thu, 2011-01-27 at 21:23 -0800, roy mukasa wrote:
> Hey guys does anyone know how i can embed google maps into django? i
> am new to django but
>>
>> Are you logged in as a user with permission to change models in that app? It
>> won't appear if not.
I once changed my admin.py file and after reloading nothing had changed.
What did solve this issue was restarting the server or hard refreshing the page
(Shift + F5 or something like that
After making this change, I got the admin interface's look and feel,
and then put back the original and did not get the look and feel, When
I put this change back ADMIN_MEDIA_PREFIX = BASE_URL + 'media/admin/',
I no longer get the look and feel. I've cleared the cache and
rebooted. It looks like th
I downloaded the new django-cms and it's quite a great package. It
offers video and images plus many more plugins. It's overkill for a
smaller portfolio site but it offers everything.
Still just testing though, haven't had to edit much but think that
when I need to change things then the hard times
So in a case like this the value previously selected can't be put back
out to the screen when the errors are displayed, to avoid the user
having to reselect the same file again when he inputs the previously
missing data?
On Jan 27, 8:40 pm, Karen Tracey wrote:
> On Thu, Jan 27, 2011 at 5:30 PM, h
In addition, I can't get the built-in server to serve the admin's look
and feel. I see that as a good thing, because clearly it's a wrong
setting that affects both servers. Here are the settings again.
# Main URL for the project
BASE_URL = 'http://localhost:8002'
# Absolute path to the directory
I got the look and feel back by substituting this:
# URL prefix for admin media -- CSS, JavaScript and images.
ADMIN_MEDIA_PREFIX = BASE_URL + '/media/'
and yet the other value did work
ADMIN_MEDIA_PREFIX = BASE_URL + 'media/admin/'
Oh, well. Thanks for the answers.
On Jan 28, 10:04 am, octop
Hello,
my model Product has an attribute spelling_variants and a property
variants:
class Product(models.Model):
canonical_name = models.CharField(max_length=200)
spelling_variants = models.ManyToManyField(String,
related_name="product spellings", blank=True)
...
@property
def var
So I have a function that sets cache (and successfully outputs it):
def push_cache:
cache.set('foo_cache', 'FUBAR!!!')
foodata = cache.get('foo_cache')
print(foodata) # this works
However when I try to access that cache from within a view and
directly output it it returns None:
def f
Did you create a superuser when you originally ran syncdb? If so, you
can work around the problem in the admin, logged in as that original
superuser, making additional superuser through the web.
Have you tried logging in as the "jack" user? The fact that the name is
now already taken implies tha
I am running Django 1.2.4 mod_wsgi. My admin site loads with its look
and feel. I am trying to add css to my application, which works fine.
I have looked through the docs, and cannot get a sample css file to
load. I would appreciate some pointers to get this working.
Here are the appropriate lines
Well,
I'm just trying to figure out if this should be reported.
Thanks, regards
Miguel Araujo
@maraujop
2011/1/22 Miguel Araujo
> Hi everyone,
>
> I have a model A that has a overwritten save method that updates a model
> B's field. Both (A & B) have model validation using full_clean met
Hi,
Please anyone confirm if this is normal, so I can report it or not.
Thanks, regards
Miguel Araujo
@maraujop
2011/1/22 Miguel Araujo
> Hi everyone,
>
> I have been working on reducing DB queries in my project with great
> results. But I have realized that select_related in one of my
On Saturday, January 22, 2011 1:38:22 PM UTC, maraujop wrote:
>
> Hi everyone,
>
> I have been working on reducing DB queries in my project with great
> results. But I have realized that select_related in one of my models doesn't
> preload all the ForeignKeys and OneToOneFields, it preloads 3 out
On 28 jan, 16:46, Santiago Caracol wrote:
(snip)
> Caught TypeError while rendering: 'NoneType' object is not iterable
>
> I think the problem in these cases is that when Python tries to
> execute self.variants() it does not yet have a value for
> self.spelling_variants.
Dont "think". You do h
Hi,
I am using django strictly as a backend for data processing. As such I
am not using any forms or templates, just database tables as models.
The page is js driven and POSTing data is causing me some issues.
A user action triggers a POST that looks like:
action "update"
data{ "field1": 8,"
On Friday, January 28, 2011 7:05:21 PM UTC, taso wrote:
>
> Hi,
>
> I am using django strictly as a backend for data processing. As such I
> am not using any forms or templates, just database tables as models.
> The page is js driven and POSTing data is causing me some issues.
>
> A user action
Excerpts from taso's message of Fri Jan 28 17:05:21 -0200 2011:
> Hi,
Hi,
> I am using django strictly as a backend for data processing. As such I
> am not using any forms or templates, just database tables as models.
> The page is js driven and POSTing data is causing me some issues.
>
> A user
Thanks for the reply Matias. I'll give signals a try but pagination is
definitely a no go. I want to see all the members at a stretch.
Isn't there a simple way to tell the django cache to get a new copy,
if changes are made?
I'm sure the admin or something must have something like what i
want
On Jan 28, 11:15 am, Matias Aguirre wrote:
> Excerpts from taso's message of Fri Jan 28 17:05:21 -0200 2011:
> > A user action triggers a POST that looks like:
>
> > action "update"
> > data { "field1": 8,"id": 2 }
> > (copied from firebug)
>
> So, it's a POST with an "action" fiend and a "dat
Hello all, is there a way to display a word .doc in the user profile and let
the users edit it and save it to keep in their profile.??
--
Saludos.
Nicolas Lubkov
Ing. Informatica de gestion
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To p
Hi folks --
I'm starting the switchover to the new djangoproject.com server right
now. Might be around 5 mins of downtime or so.
Jacob
--
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@googlegrou
Thanks :)
i used the idead behind remoteuserbackend and coded something
similar :) thanks again!
regards
Pete
--
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 f
On Fri, Jan 28, 2011 at 3:33 PM, Jacob Kaplan-Moss wrote:
> I'm starting the switchover to the new djangoproject.com server right
> now. Might be around 5 mins of downtime or so.
Migration should be complete now. I'm still cleaning up a few
last-minute things, but if you notice anything wrong ple
On 28 January 2011 21:33, Jacob Kaplan-Moss wrote:
> Hi folks --
>
> I'm starting the switchover to the new djangoproject.com server right
> now. Might be around 5 mins of downtime or so.
>
> Jacob
>
Hurray for upgrading the Trac instance! Are there any additional Trac
features planned ? (like th
2011/1/28 hollando
Hi hollando,
You can use proxy models. Refer to
>
> http://stackoverflow.com/questions/2223375/multiplue-modeladmins-views-for-same-model-in-django-admin
>
I can't set permissions for proxy models, i think because the table
auth_permissions doesn't have the proxy records.
Tha
I'm trying to implement a stand-alone python script to check a session
cookie for group authorization. I cribbed from the auth and session
middleware, so I could take the sessionid from the cookie, look up the
session, look up the user, and get the list of groups.
This all basically works, except
On Friday, January 28, 2011 12:22:04 AM UTC, Mario8k wrote:
>
> Hello,
>
> How can I customize a form by the user who is logged in?
> For example, if the user is_superuser(), i need to display the
> standard admin form, but if the user is another one, show only some
> fields and not all model f
On 01/28/2011 08:43 AM, Jonas Geiregat wrote:
>>>
>>> Are you logged in as a user with permission to change models in that app?
>>> It
>>> won't appear if not.
>
> I once changed my admin.py file and after reloading nothing had changed.
> What did solve this issue was restarting the server or ha
Thanks for describing the four possible reactions.
My main concern is organisation, alas I imagine a Django solution, not
just one for me.
So the model needs to know about the view, i.e. we'd need a read-only
attribute in models.py table definitions, so that
a) Developer sets the attribute manually
Hi everyone,
My main project at the moment is Lanyrd, the social conference
directory. It's a site that helps you find conferences to attend or
speak at, and that enables you to build a profile of talks you've
given and events you've attended in the past.
There's just one problem: right now we on
Digging into the problem I'm having with a standalone django script,
the problem seems to be that django doesn't see updates to the
database unless it writes to the database.
In the following lines,
ss = engine.SessionStore(session_id)
session=ss.load()
If session_id "abcd" has been added t
On Fri, Jan 28, 2011 at 9:45 PM, Brian Craft wrote:
> Digging into the problem I'm having with a standalone django script,
> the problem seems to be that django doesn't see updates to the
> database unless it writes to the database.
>
Sounds a lot like:
http://groups.google.com/group/django-users
On Fri, Jan 28, 2011 at 4:45 PM, Jacob Kaplan-Moss wrote:
> On Fri, Jan 28, 2011 at 3:33 PM, Jacob Kaplan-Moss
> wrote:
> > I'm starting the switchover to the new djangoproject.com server right
> > now. Might be around 5 mins of downtime or so.
>
> Migration should be complete now. I'm still clea
Thank you!
'set transaction isolation level read committed' had no effect, but
'set autocommit=1' appears to fix it.
I wondered if there was some more general way of doing this (I mean,
besides passing in raw sql). Perhaps the set_autocommit() method in
db.backends.creation?
On Fri, Jan 28, 20
HI
I am NEWBIE i am trying to run an server and my POST request is from
java api(client) and i cant able to see exact error in java api its just
showing HTML request is not accepting in java b coz django giving me error
iin html format but by some how i manage to print request.POST from my
req
56 matches
Mail list logo