Re: Linking to Django Admin from 1.3

2011-07-14 Thread eric.frederich
Nevermind... this was my bad. I removed (.*) from my urls.py This is now working... thanks a bunch. This is what I get for developing an app that works and then not touching it for over a year. I really need to keep up with these things. -- You received this message because you are subscribed

Re: Linking to Django Admin from 1.3

2011-07-14 Thread eric.frederich
Well... two people replied with the same answer so rather than picking favorites I'll just reply to myself. This seems to work but looks a bit quirky. When I use {% url admin:index %} the link that gets generated actually has "admin/(.*)" in it. This even shows up in the url when I click on it.

Linking to Django Admin from 1.3

2011-07-14 Thread eric.frederich
Hello, I am moving from 1.0.2 to 1.3 and am having problems linking to the admin site from within a template. I used to have this in my template... Django Admin And I used to have this in my urls.py url(r'^admin/(.*)' , admin.site.root, name='the-django- admin'), I'm sure this was

Re: permalinks from cron job

2010-01-18 Thread eric.frederich
t it is at /apps when currently Apache is the only thing that know. ~Eric On Jan 17, 11:54 pm, Ted Nyman wrote: > More generally, in a crontab, you'll need to set both the PYTHONPATH   > and give the location of the relevant Django settings. > > -Ted > > On Jan 17,

Re: permalinks from cron job

2010-01-17 Thread eric.frederich
:: bump :: On Jan 14, 1:59 pm, "eric.frederich" wrote: > My django urls work nicely when browsing around, clicking things, and > when my views generate emails.  They all have the appropriate prefix. > > In apache's conf file I have the following... > > WSGIScript

permalinks from cron job

2010-01-14 Thread eric.frederich
My django urls work nicely when browsing around, clicking things, and when my views generate emails. They all have the appropriate prefix. In apache's conf file I have the following... WSGIScriptAlias /apps /export/home/web/docs/django/my_site/apache/ django.wsgi My urls look like https://mydom

overridden delete method not being called on cascade

2009-12-03 Thread eric.frederich
I have a training application I wrote using Django. Users can express interest in a course and then enroll in an offering of that course. I have been overriding the save() and delete() methods of my Enrollment and Interest models so that that following happens. 1. When a user enrolls in an offerin

sqlite for semi-production

2009-07-20 Thread eric.frederich
I recently bought a plug computer (http://www.plugcomputer.org/) I plan on using it to replace my fileserver and webserver. I'm not too sure that I want to run MySQL on this thing. I want to know if it is okay to run sqlite in a non-devlopment environment (meaning more than one user might be on

Re: django-logging

2009-06-19 Thread eric.frederich
ule name it chooses > the  logger which contains name as prefix if none it chooses root > > #now use this mlogger.debug to print message at debug level and > mlogger.info to print messages at info level > mlogger.debug("completed the question paper at present reviewing it") &g

Re: Sports Model ( ManyToMany through Intermediary Table ) Help

2009-06-18 Thread eric.frederich
I can't help you if you're trying to be able to do this through the admin interface. I'd have no idea how to do this. I would think it would be very complicated or impossible. However, if you create your own form it wouldn't be too hard if you do it in two steps. First create your EventRoster o

django-logging

2009-06-18 Thread eric.frederich
I need some advice on using the python logging module with django- logging. I have djangologging installed and working. I read the documentation and am trying to figure out how I can best take advantage of the built in logging module. The djangologging docs mention adding handlers and other thi

Re: subdomain vs. prefix

2009-06-16 Thread eric.frederich
t I can look at to tell what context the code is running in. Thanks, ~Eric On Jun 15, 2:45 pm, "eric.frederich" wrote: > Hello, > > I have been running a django site on apache using the following > alias... > > WSGIScriptAlias /apps /path/to/django_application/apache/

subdomain vs. prefix

2009-06-15 Thread eric.frederich
Hello, I have been running a django site on apache using the following alias... WSGIScriptAlias /apps /path/to/django_application/apache/django.wsgi In doing this I was pleasantly surprised to see that most of the URLs worked fine. The only thing I needed to change was LOGIN_URL='/apps/ login'

Re: query help (distinct)

2009-06-05 Thread eric.frederich
this is a booking application. On Jun 5, 2:19 pm, Daniel Roseman wrote: > On Jun 5, 6:56 pm, "eric.frederich" wrote: > > > > > How can I get distinct content_types from a model like this?... > > > In sqlite I did the following and it worked... > > sqli

query help (distinct)

2009-06-05 Thread eric.frederich
How can I get distinct content_types from a model like this?... In sqlite I did the following and it worked... sqlite> select distinct content_type_id from booking_managedasset; class ManagedAsset(models.Model): content_type = models.ForeignKey(ContentType) object_id = models.Posi

Bug in login_required?

2009-06-03 Thread eric.frederich
So the person in IT that runs our webserver didn't want django hogging up the root '/' because he likes to be able to just dump files in the htdocs directory and have it servable by the webserver. So now my django site is enabled in apache with... WSGIScriptAlias /apps /some/path/django/engineer

Re: Automatically creating auth.models.group for an application

2009-06-03 Thread eric.frederich
No, the issue isn't adding a user to that group, what I'm talking about is how do I create the group in the first place? I feel that creating the group should be done when running syncdb. On Jun 2, 4:27 pm, Daniel Hilton wrote: > 2009/6/2 eric.frederich : > > Couldn't y

Automatically creating auth.models.group for an application

2009-06-02 Thread eric.frederich
In an application I'm writing I have a model that stores admins by location in a model called LocationAdmin. So in this model I have a foreign key to User and a foreign key to a Location object. I would like to override the save() method so that when an Admin is created they are assigned to a sp

forms / confirmation

2009-05-29 Thread eric.frederich
I have some very simple views that act as forms because there is no information to fill out. I get all the information from the url and the request object. For example, I may have a model like: class Subscription(models.Model): user = models.ForeignKey(User) magazine = models.Fo

Re: FileBrowser: Models for media

2009-05-21 Thread eric.frederich
rder_ your material > (which might - sooner or later - be necessary). > > about subclassing filefield or filepathfield: there´s no good reason > whatsoever. if you think it´s better to subclass any of the given > fields, you may want to submit a patch. > > thanks, > patrick

FileBrowser: Models for media

2009-05-20 Thread eric.frederich
My application models Training courses. Those courses may have training material in a variety of formats. I came across FileBrowser and it seems real nice. Are any of you using a FileBrowseField in your models? I get the feeling that what I'm doing below is wrong... creating a model that holds

Form Help

2009-05-19 Thread eric.frederich
I need a view to edit Enrollment objects for a particular Offering. An Offering has a foreign key to a Room and a Course. All three of these (Offering, Room, and Course) have a maximum capacity field which can be null (for unlimited). Offering has a method called get_max_capacity() which return

Query by date + offset

2009-05-13 Thread eric.frederich
I have a model called Offering which has a start date and a duration in days. I want to do a query and get instances where the end date (not modeled) is in the past. I know that I can add a non-editable field end-date that is computed in the save method, but this seems denormalized. I'm curious to

field defaults from related table

2009-05-13 Thread eric.frederich
Hello guys, I have an application where I have the same information modeled at different levels. For instance two models I have are Course and Offering. An Offering has a foreign key to a Course. I have a boolean field 'manager_approval_required' at the course level right now but I'd like the

Re: removing fields in modelformset

2009-05-11 Thread eric.frederich
7;t need to see the Offering (since this view is all enrollments for a particular offering). Is this too specialized, will I need to re-invent the wheel here? On May 11, 11:46 am, Sam Chuparkoff wrote: > On Mon, 2009-05-11 at 07:55 -0700, eric.frederich wrote: > > Hello, > >

removing fields in modelformset

2009-05-11 Thread eric.frederich
Hello, I need to set up a view for administrators of an application that I am writing where they can edit a subset of fields on a particular model. It was pretty simple... EnrollmentFormSet = modelformset_factory(Enrollment, extra=2) def offering_admin(request, offering_id): offering = get_

Re: Separation of apps

2009-05-05 Thread eric.frederich
e user? On May 4, 4:32 pm, Malcolm Tredinnick wrote: > On Mon, 2009-05-04 at 12:51 -0700, eric.frederich wrote: > > Thanks for the reply. > > > You're right that auth.User is not a replacement for a profile. > > Maybe I will make the training app require only that a pro

Re: Separation of apps

2009-05-04 Thread eric.frederich
ile? ~Eric On May 4, 3:35 pm, Malcolm Tredinnick wrote: > On Mon, 2009-05-04 at 11:35 -0700, eric.frederich wrote: > > I wrote an app that consist of an authentication backend and a single > > model "Profile" (extension of auth.User).  It also has a function > > w

Separation of apps

2009-05-04 Thread eric.frederich
I wrote an app that consist of an authentication backend and a single model "Profile" (extension of auth.User). It also has a function which queries ldap to get user information like their manager. We'll call this app my_custom_backend. The reason the Profile and authentication are in the same

Re: Configuration help. Multiple projects.

2009-04-30 Thread eric.frederich
or utilize the same database. Of course, the former would imply the latter. ~Eric On Apr 30, 2:04 pm, Malcolm Tredinnick wrote: > On Thu, 2009-04-30 at 10:53 -0700, eric.frederich wrote: > > Malcom, > > > Thanks for replying. > > > Let me try to explain a little more

Re: Configuration help. Multiple projects.

2009-04-30 Thread eric.frederich
s.py file, urls.py file and can easily talk to each other. > > Kevin > > On Apr 30, 7:47 am, "eric.frederich" wrote: > > > So, I have been tasked with creating a new website within my company > > for a new project.  Lets call the project XYZ (because just callin

Re: Configuration help. Multiple projects.

2009-04-30 Thread eric.frederich
ces / soap / RCP)? On Apr 30, 12:49 pm, Malcolm Tredinnick wrote: > On Thu, 2009-04-30 at 07:47 -0700, eric.frederich wrote: > > So, I have been tasked with creating a new website within my company > > for a new project.  Lets call the project XYZ (because just calling it > >

Configuration help. Multiple projects.

2009-04-30 Thread eric.frederich
So, I have been tasked with creating a new website within my company for a new project. Lets call the project XYZ (because just calling it 'the project' is confusing since Django already has a concept of projects). The website will be your run of the mill project page with announcements, newslet