DeWitt wrote:
> Hi,
>
> I am wondering if anyone has successfully used "setup.py bdist_rpm" to
> create a Django RPM.
>
> I have tried using both the 0.95 release and the SVN head release, but
> in both cases the RPM build process fails on RedHat Fedora Core 5,
> seemingly on the bytecompiled .pyo
not, file a ticket and let
us know and we will fix the problem, whatever
it might be.
/Lars
> I'll start digging in to bdist_rpm unless anyone has some experience
> here and wants to point me in the right direction.
>
> -DeWitt
>
>
> On Nov 13, 9:37 am, "stava"
we do the same. You'll be grateful
for that decision when it comes to upgrade time:)
R/Lars
> On Nov 13, 11:23 am, "stava" <[EMAIL PROTECTED]> wrote:
> > DeWitt wrote:
> > > Great, this looks like it would work. Thanks so much!
> >
> >
ime.auth_users' doesn't exist")
However, if I comment out the 'choices' part of the 'manager'
definition in the Department class, it works like a charm. Then I can
uncomment the 'choices' and everything works as expected.
Please advice anyone? Is there a better way to implement dynamic
choices?
/stava
stava wrote:
> I'm having a bit of a problem with dynamic choices. I'm working on a
> simple timesheet system where I've extended the auth.users with a
> couple of fields including something I call "primary group":
>
> def getUsers(group = None):
> u
I'm trying to import a simple utils.py from the toplevel of my
application, i.e.
from ttime.utils import *
All I get from djangoadmin.py runserver is: "ImportError: No module
named utils".
The utils.py is there, but the django server can't seem to find it, I
suspect this is a true newbie questi
Hi all,
I've started to play around with django just a few weeks ago. I'm a
newbie at python and, of course, django, but I have some experience
with database systems, especially RDBMSs. It seems to me that django
(together with python) represents the solution to what they tried to do
with the 4GL
Adrian, thanks for your reply.
Yes, I'm really interested, mostly because I'm a newbie and want to
learn, but secondly, I feel that the admin interface is user friendly,
with the type of colors and messages, and overall handling that gives
an intuitive interface, and I really would like to get th
Adrian Holovaty wrote:
> On 10/22/05, stava <[EMAIL PROTECTED]> wrote:
> > Do you have a similar trick for the object list view?
>
> Sure! To view the automatically-generated template for the object list
> view, find the line "t =
> loader.get_template_from_stri
Adrian Holovaty wrote:
> On 10/22/05, stava <[EMAIL PROTECTED]> wrote:
> > Do you have a similar trick for the object list view?
>
> Sure! To view the automatically-generated template for the object list
> view, find the line "t =
> loader.get_template_from_stri
Does anyone now how the auth_messages table is used?
Presumably for sending messages to the user(s).
But how?
R
/LarS
I'm logging the solution here, in case someone else needs this:
The correct statement is:
return HttpResponse(''.join(raw_template), mimetype='text/plain')
I.e., the raw_template variable is actually a list of strings, and has
to be translated into one simple string in order for HttpResponse()
urn "%s" % self.subproject
The admin seems to work fine for both objects.
However, when I play with the objects it looks really strange:
Python 2.3.4 (#1, Feb 7 2005, 15:50:45)
[GCC 3.3.4 (pre 3.3.5 20040809)] on linux2
>>> from django.models.ttime import *
>>> auth.user
In a foreign key relationsship (like Polls and Choices in the
tutorial), the _pre_save() definition tries to retrieve the subordinate
("choices") items from the database. I really would like to get hold of
the subordinate items prior to being saved to database (well, it's
called pre_save, right?)
In a foreign key relationship, the main objects pre_save() and
post_save() both get performed prior to the subordinate object's pre
and post save, e.g.:
poll._pre_save()
poll._post_save()
choice._pre_save()
choice._post_save()
choice._pre_save()
choice._post_save()
Is this intentional?
I would
OK, thanks.
OK, thanks, that cleared things up.
I have difficulties using field lookups on foreign keys. I'm trying to
retrieve a list of items with a specific state using the following
model:
class State(meta.Model):
state = meta.CharField(maxlength = 12, primary_key = True)
class Item(meta.Model):
wdate = meta.DateField()
state = meta
God you're quick, I just posted this.
Just tested it and it works fine now.
Another alternative I tried out in the meantime was to change the
definition of State taking out the "primary_key = True". That worked
fine as well.
Thanks a bunch!
/LarS
the application seems to work OK and nothing bad seems to
happen. However, it's a bit worrying.
Any hints, anyone?
/stava
OK, not scared anymore, thanks.
/stava
I'm thinking of using a model for a database view (for convinience). Is
there anyway one could set anything int the META of a model to tell it
*not* to create a database table when doing a "django-admin sqlreset",
or do I have to manually filter out the "create table..." statement?
/stava
Yeah, the meta.AbstractModel seems to come in handy. In the mean time,
I'll do it manually. Thanks!
stava
Hi all,
in the template doco there's some mentioning of other formats than
HTML, e.g. CSV and email.
Has anyone tried to use the django template framework for producing CSV
files or emails?
Does anyone know how that could be done?
R
/stava
Many thanks!
/stava
Hi all,
does anyone now how to use the {% block nav-global %} tag in
admin/base_site.html? I'm looking to get a nice main menu bar kinda'
thing like on the django site, but I'm not experienced (clever) enough
to figure it out.
/stava
Thanks!
/stava
Thanks a million, this is what I was looking for.
Cheers
/stava
Hi all,
can't seem to get my application user's passwords working properly
after the last changes to the password algorithm. User's with old md5
passwords can login once, but after that their passwords don't work
anymore. What gives?
Also, is there anyway of using mysql to create the new passwor
I had much the same problem and solved it using views and forms in the
following way:
create a template were, for example, the first part is a form with
selection items like start date, end date (providing a date range),
etc. Then, when the user POST's this form via a submit button, capture
the s
Well, I'm using new-admin, and I've extended the auth.user class:
class User(auth.User):
primary_group = meta.ForeignKey(auth.Group, default = 1,
verbose_name = 'primary group')
new_password = meta.CharField(maxlength = 40, blank = True)
fullname = meta.CharField(m
I've tried it with trunk, same result.
Trying, trying...
1)
from django.models.ttime import *
u = User('stava', 'Lars', 'Stavholm', '[EMAIL PROTECTED]', 'password',
True, True, '2005-11-25', '2005-11-25')
u.save()
Traceback (most recent call last):
File &
I've removed my subclassing alltogether, it all seems to work fine
know, I can login and logout and log back in again as expected.
Has anyone successfully extended the auth.users class by subclassing
it? If so, how?
I just had to join in the praise: brilliant work guys!
/LarS
Yes, of course, should have read the question properly. Anyhow, I
haven't found a readymade generic view to do the job for me so here's
the sample I use:
-- view:
@login_required
def projects(request):
"""Get list of projects and project details for logg
Has anyone been able to capture the output from "DEBUG = True" when
using mod_python? I would have expected it to show up in the apache
log, but it didn't.
Cheers
/LarS
Yup, that's great, thank you.
But what I'm really looking for is DEBUG capabilities when using
mod_python, i.e. I would like to be able to see my print statements
embedded in "if DEBUG:" and especially the db queries timings (which
are available somehow?). I do most of the debugging using the
dja
Well, being a newbie, I'm not sure of the best way to do this, but
here's one solution I use myself:
the view (.../views/reports.py):
from django.views.decorators.auth import login_required
@login_required
def index(request):
return render_to_response('ttime/reports', {'title' : 'Reports'})
fr
I'm trying to use generic views together with the newly separated admin
templates, but it's failing miserably.
I specify the generic view I want to use in url.py:
countries = {
'app_label': 'ttime',
'module_name': 'countries',
}
urlpatterns = patterns('',
(r'^countries/$',
'django.views
I just don't get it (newbie:). Isn't there a way of using generic views
together with the recently separated admin templates? In order to
learn/understand: I'm taking a small part of my model, the Country()
class with two fields (country_code and country_name); I copy the
appropriate templates (ch
OK, I see, thanks Adrian!
/L
Well, thanks for the input, couldn't get it to work though. I put a few
"print >> sys.stderr..." in there, shows up as per usual when running
the django server, but they don't show up anywhere in the apache logs.
Maybe there's some httpd.conf dependency, I'm running SuSE 9.3 with
minimal tweaks.
/
Wouldn't "ediatble=False" on a required field give this error?
Yup, that took care of it, thanks!
/LarS
My two-cents worth: I've used mod_php and mod_python together
(accessing mysql) successfully for a good while on a SuSE 9.3 platform
(right out of the box setup, no fiddling).
R
/LarS
Well, I'm interested too, and apparently "You can do that", so:
details?
R/LarS
On Thu, 05 May 2011 13:14:57 +0530, Kenneth Gonsalves wrote:
On Thu, 2011-05-05 at 00:28 -0700, Nge wrote:
I want to know. How can I create line charts in Django?
Then I have to take data from postgresql for x-axis and y-axis.
So how should I do? How can apply django, postgres, graph and ajax?
49 matches
Mail list logo