django.contrib.auth Password Reset Form

2008-10-24 Thread mccomas . chris
I posted this on the IRC channel and didn't get a definite answer, but I'm trying to use the django.contrib.auth Password Reset Form. Here's the code in the django/contrib/auth/forms.py http://dpaste.com/86595/ In the default templates the template attempts to display the new password by using

filter OR for results...

2008-10-19 Thread mccomas . chris
I have a model that is tracking all of the college football games, there's an entry for each game, with the two teams represented in the fields 'team1' and 'team2'. These are foreign keys to the model 'CollegeTeams'. I'm trying to run a query so that it'll get the results from the Game for each

Should I use a Model Manager, if so, how...

2008-10-01 Thread mccomas . chris
I have a bunch of fields that I need to check if they have content added to them. So essentially I want to be able to tell for each entry into the db that if every field that I need has been filled out, or not. I want to be able to use this in my queries so that I can get applications that are

Re: Should I use a Model Manager, if so, how...

2008-10-01 Thread mccomas . chris
I have this: http://dpaste.com/81698/ Which would show the status of the app, based on the field 'status' in the Model. What I couldn't/can't figure out is how to do it for multiple fields and also how to not do if it is = to something, just that if any text is entered into the field then it

HTTPS Question...

2008-09-30 Thread mccomas . chris
We have an online application for school, where we request the individuals SSN and PharmCAS information. The application will be at say www.oursite.com/application/. Since we're gathering sensitive data, I want to obviously make this secure using https:// I don't want the rest of the site to be

Percentages in templates

2008-09-24 Thread mccomas . chris
I have an app that tracks football stats, I'd like to use bar graphs similar to what's on Everyblock. This is their code: http://dpaste.com/80211/ I was curious, how, if possible at all, in the template I could get the percentage for the height. So, for my first graph, so far I'd have these

Re: Auto Discover on MediaTemple

2008-09-24 Thread mccomas . chris
Thanks for the tips. When you use the most recent release on MT, they're still using 0.96 for some reason. On Sep 23, 9:30 am, krylatij <[EMAIL PROTECTED]> wrote: > make sure that you use Django 1.0 > this mechanizm was changed since 0.96 --~--~-~--~~~---~--~~ You

Auto Discover on MediaTemple

2008-09-23 Thread mccomas . chris
Using the gs and Django container on MediaTemple, got my project installed, it works when I don't have the admin info in the URLS.py, when I add all of the info in the URLS.py and go to the site I get this error: AttributeError at / 'module' object has no attribute 'autodiscover' Here's my URLS

Re: Adding comments in loop

2008-09-18 Thread mccomas . chris
I apologize, yes {% load comments %} is in there, he's an updated version: http://dpaste.com/78978/ again, the issue is the Invalid block tag: 'render_comment_form' On Sep 18, 1:21 pm, Dmitry Dzhus <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > actually, that isn't the issue, the

Re: Adding comments in loop

2008-09-18 Thread mccomas . chris
actually, that isn't the issue, the issue is with the {% render_comment_form for event %} tag, i'm getting a template syntax error: Invalid block tag: 'render_comment_form' this is right after the comment_list endfor here: http://dpaste.com/78918/ On Sep 18, 10:43 am, [EMAIL PROTECTED]

Adding comments in loop

2008-09-18 Thread mccomas . chris
I'm trying to add comments to a page that has the recent blog entires, below is my code: http://dpaste.com/78918/ I get the error: TemplateSyntaxError at / 'get_comment_list' tag requires 5 or 6 arguments What did I do wrong? I've played with it for about two hours and can't figure it out...

Re: Apache and mod_python trouble

2008-09-12 Thread mccomas . chris
Looks like you're trying to call /polls/ but your urls.py has the directory as /poll/ On Sep 12, 12:36 pm, Tonu Mikk <[EMAIL PROTECTED]> wrote: > Karen Tracey wrote: > > On Fri, Sep 12, 2008 at 11:47 AM, Tonu Mikk <[EMAIL PROTECTED] > > > wrote: > > >     Hello, > > >  

Re: Apache httpd conf with mod_python

2008-09-09 Thread mccomas . chris
guys, fixed it. apparently the issue was having it in /home/chris/ i moved it to var/www/ and now it's working :) i knew it'd be something as simple as that. On Sep 9, 1:12 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Tue, Sep 9, 2008 at 11:53 AM, <[EMAIL PROTECTED]> wrote: > > > i'm

Re: Apache httpd conf with mod_python

2008-09-09 Thread mccomas . chris
I think I'm going to start over... I'm running RHEL 5, so I'll have our network admin remove Apache2, then reinstall it and try this all over again. On Sep 9, 1:00 pm, [EMAIL PROTECTED] wrote: > Steve, no dice. > > ImportError: Could not import settings 'settings' (Is it on sys.path? > Does

Re: Apache httpd conf with mod_python

2008-09-09 Thread mccomas . chris
Steve, no dice. ImportError: Could not import settings 'settings' (Is it on sys.path? Does it have syntax errors?): No module named settings i'm just so friggin confused now :) you think this would work... On Sep 9, 12:53 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: >

Re: Apache httpd conf with mod_python

2008-09-09 Thread mccomas . chris
At first I didn't keep all of the original stuff in the httpd.conf, but then I went back and put up the copy that I backed up and added the Django stuff to it. i have the django stuff in /home/chris/web/ should it be in /var/www ? On Sep 9, 12:19 pm, Steve Holden <[EMAIL PROTECTED]> wrote: >

Re: Apache httpd conf with mod_python

2008-09-09 Thread mccomas . chris
i'm really at a loss. mod_python and django are both installed under python2.4. SELinux is disabled. the standard permissions for the django_projects folder is 775. everything validates. i can run python at the command line and import the settings, etc. On Sep 9, 11:02 am, [EMAIL PROTECTED]

Re: Apache httpd conf with mod_python

2008-09-09 Thread mccomas . chris
thnx. i did test it with the development server and it is working, i've also tried putting up the generic settings.py that is created when you first start a project. On Sep 9, 10:02 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Tue, Sep 9, 2008 at 9:21 AM, <[EMAIL PROTECTED]> wrote: > > >

Re: Apache httpd conf with mod_python

2008-09-09 Thread mccomas . chris
Karen, There is a SELinux kernel, but it is set to disabled. On Sep 9, 8:50 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Tue, Sep 9, 2008 at 8:44 AM, <[EMAIL PROTECTED]> wrote: > > > Karen, > > > the permissions for the main directory web, and all of the > > subdirectories is 775. > > And

Re: Apache httpd conf with mod_python

2008-09-09 Thread mccomas . chris
Karen, the permissions for the main directory web, and all of the subdirectories is 775. On Sep 9, 8:29 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Tue, Sep 9, 2008 at 8:05 AM, <[EMAIL PROTECTED]> wrote: > > > thnx, i've figured it out. the issue i'm having now is with my django > >

Re: Apache httpd conf with mod_python

2008-09-09 Thread mccomas . chris
it wasn't plural, i changed it to plural and then changed it in the httpd.conf, restarted apache, and still no luck. yes, ucwv is at /home/chris/web/django_projects/ucwv On Sep 9, 8:35 am, [EMAIL PROTECTED] wrote: > Ok, it could be that your PythonPath is wrong? >

Re: Apache httpd conf with mod_python

2008-09-09 Thread mccomas . chris
thnx, i've figured it out. the issue i'm having now is with my django requirements in it: SetHandler python-program PythonPath "['/home/chris/web/django_project'] + sys.path" PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE ucwv.settings PythonDebug

Apache httpd conf with mod_python

2008-09-08 Thread mccomas . chris
Setting our Apache server at work, got everything installed. In the httpd.conf there's quite a bit of content, do I need that content, or should I just replace it with what I need for Django? --~--~-~--~~~---~--~~ You received this message because you are

Help with Date Based Generic Views and Permalink

2008-09-08 Thread mccomas . chris
Hey all, I have this code: http://dpaste.com/76671/ When I go to the URL it doesn't display the page, but it also doesn't display and errors with the URL. What is wrong with the permalink instance? Also, is there a workaround for using multiple date based generic views and having them with

Re: django web hosting

2008-09-03 Thread mccomas . chris
I had the beta container for Django and to me, compared to say WebFaction, it was a pain in the ass, it just didn't feel "natural" using the Django container. I am, later this month, moving away from WebFaction and getting a dedicated virtual at MediaTemple tho... On Sep 3, 5:06 am, "Mic

Re: URLs Syntax Error

2008-09-03 Thread mccomas . chris
i believe you need a comma after archive_info and before {'template_name': 'blog/archive.html'} On Sep 3, 7:40 am, djandrow <[EMAIL PROTECTED]> wrote: > Can no one help me with this, its just these two lines: > >  (r'^archive/$', date_based.archive_index,archive_info > {'template_name':

Re: handling unique entries

2008-09-03 Thread mccomas . chris
In the admin, or on the site in a view? On Sep 3, 12:12 pm, David <[EMAIL PROTECTED]> wrote: > Hi, > when setting (for example) > name = models.CharField('Name', max_length=50, unique = True) > How does one go about handling the exception if a name is entered > that > already exists in the

Re: URLs Syntax Error

2008-09-03 Thread mccomas . chris
right. could do dict(archive_dict, {'template_name': 'blog/archive.html'} ) On Sep 3, 8:40 am, Daniel Hepper <[EMAIL PROTECTED]> wrote: > Adding a comma will probably not help, because you then have 5 values in > the tuple, but the expected format is: > > (regular expression, Python callback

Re: URLs Syntax Error

2008-09-03 Thread mccomas . chris
try it without the {} (r'^$','archive_index', dict(archive_dict, template_name='blog/ archive.html')), On Sep 3, 9:07 am, Daniel Hepper <[EMAIL PROTECTED]> wrote: > > could do dict(archive_dict, {'template_name': 'blog/archive.html'} ) > > I don't think it's that easy. I get this: > > >>>

Storing some media files on web server and some on external a/v server

2008-08-28 Thread mccomas . chris
We have a web server here at work that is going to host all of our Django app stuff and the majority of our static media files (images, css, js, etc) and then we have a streaming media server where we store the audio of all of our courses. What would be ideal for me to do is to be able to store

Re: Complex, somewhat formula...

2008-08-27 Thread mccomas . chris
Here's how I had it setup with PHP, and the process of solving the ratings... TEAM name nickname win loss rating rank GAMES date away_team (fk) home_team (fk) away_score home_score With the PHP file, the first thing it does is loop through all the games with scores and computes the outcome of

Re: Complex, somewhat formula...

2008-08-27 Thread mccomas . chris
Thnx. I'm half tempted, just to leave it as is in PHP to compute the stuff, then dump it into a DB and use Django to display everything... On Aug 27, 8:42 am, "James Bennett" <[EMAIL PROTECTED]> wrote: > On Wed, Aug 27, 2008 at 7:41 AM,  <[EMAIL PROTECTED]> wrote: > > Could I do this with

Complex, somewhat formula...

2008-08-27 Thread mccomas . chris
I have a system that I created a few years back in PHP (it actually started in VB with Excel) that goes through all the college football games, compute a team's win/loss record, then a "power rating" which is based on their winning percentage and their opponents winning percentage. Could I do

Create/update/delete generic views and user

2008-08-25 Thread mccomas . chris
Is is possible with Create/update/delete generic views to get the user that's logged in's ID and use? I have a field with a FK for user, I'd really just like to use the generic views for this, since it's a simple thrown together internal site, instead of writing out other views/forms/etc. So,

Not displaying data...

2008-08-25 Thread mccomas . chris
I have the following code, http://dpaste.com/73388/ For some reason the data in the rows is not displaying, there are the correct number of rows in each table so the for tag is working correctly. Any ideas why the content is not displaying? --~--~-~--~~~---~--~~

Sum Values in DB

2008-08-23 Thread mccomas . chris
I have entries from the different users, they're entering the total number of steps they walked during a particular period of time, that they set. So the model is setup like user (fk) start_date = DateField() end_date = DateField() steps = IntergerField() What I want to do is on the user's

Re: Not displaying data...

2008-08-23 Thread mccomas . chris
Actually I was completely wrong, I figured it out though and it is working properly now. thnx! On Aug 23, 12:37 pm, DailyPuppyGuy <[EMAIL PROTECTED]> wrote: > Should you have: > > {{ object.start_date }} > > instead of just: > > {{ start_date }} > > ?? > > On Aug 23, 11:29 am, [EMAIL PROTECTED]

Re: Not displaying data...

2008-08-23 Thread mccomas . chris
Actually. I was wrong. It is not displaying the right number of rows... On Aug 23, 11:06 am, [EMAIL PROTECTED] wrote: > I have the following code,http://dpaste.com/73388/ > > For some reason the data in the rows is not displaying, there are the > correct number of rows in each table so the for

Re: Forms tutorial

2008-08-20 Thread mccomas . chris
Thnx. Something else, I've looked for, with little/no luck, is a form to edit information in the database. So that after a user initially inputs their goal, they can come back at the end of the time period and enter how many steps they actually took... Chris On Aug 20, 8:18 am, Jarek Zgoda

Forms tutorial

2008-08-20 Thread mccomas . chris
Anyone know of a good tutorial on using forms out there other than the documentation? I'm working on a project where individuals set goals for themselves, start date, end date, and steps goal. Then at the end of the goal period they can go back and add their actual number of steps during that

extension of generic views...

2008-07-10 Thread mccomas . chris
what's the best way with django to remember a page and redirect to that page. so if you're at www.mysite.com/entries/2008/jul/04/this-is-my-entry and you click a link that stores something in a different db field that once it goes through that view and enters the info it redirects you to the url

Re: Authenticate against Active Directory

2008-07-10 Thread mccomas . chris
Thanks, got it. Thought it was already on the box so that was confusing me :) Now got other errors to worry about, ugh. On Jul 10, 10:23 am, Tim Chase <[EMAIL PROTECTED]> wrote: > > Got it setup, but when I try to login to the admin with our dummy acct > > on AD, I get the error

Re: Authenticate against Active Directory

2008-07-10 Thread mccomas . chris
Thanks tim. Got it setup, but when I try to login to the admin with our dummy acct on AD, I get the error ImproperlyConfigured at /admin/ Error importing authentication backend project.app.auth: "No module named ldap" Running the latest development version of Django with Python2.5 On Jul 10,

Authenticate against Active Directory

2008-07-10 Thread mccomas . chris
Has anyone dealt with authentication against Active Directory? I found the Django snippet online (http://www.djangosnippets.org/snippets/ 501/). Right now we have the University network, a web manager, online forums, and online testing software, which the latter three aren't running against AD,

Re: Server config

2008-07-10 Thread mccomas . chris
Thanks for the input. I think we're going with Ubuntu. On Jul 9, 11:01 pm, elithrar <[EMAIL PROTECTED]> wrote: > On Jul 10, 2:08 am, [EMAIL PROTECTED] wrote: > > > What does everyone recommend? FreeBSD, RedHat, or Ubuntu? > > Go with what you're most comfortable with - most of my experience has

Re: Server config

2008-07-09 Thread mccomas . chris
Thanks Jeff. Something else, we're going to be running that as the web-server, but also have a media server, but it is a Windows server. Still possible to send the audio/video/powerpoint to the media server, even though it is Windows? On Jul 9, 2:48 pm, Jeff Anderson <[EMAIL PROTECTED]> wrote:

Re: Where to put stylesheets?

2008-07-09 Thread mccomas . chris
meant to put this in there: http://www.djangoproject.com/documentation/static_files/ On Jul 9, 2:59 pm, Benjamin Buch <[EMAIL PROTECTED]> wrote: > > Just to clarify what may be obvious...do you have the correct one > > of these: > > >  href=" {{ MEDIA_URL }}styles.css"  <- what you wrote > >  

Re: Where to put stylesheets?

2008-07-09 Thread mccomas . chris
did you set the path to your in your URLconf, since you're using the development server? On Jul 9, 2:59 pm, Benjamin Buch <[EMAIL PROTECTED]> wrote: > > Just to clarify what may be obvious...do you have the correct one > > of these: > > >  href=" {{ MEDIA_URL }}styles.css"  <- what you wrote > >

Server config

2008-07-09 Thread mccomas . chris
Hey, At work we're getting a new server and going to use it as our web- server and use Django to run our website and our special student/ faculty stuff. What does everyone recommend? FreeBSD, RedHat, or Ubuntu? Thanks, --~--~-~--~~~---~--~~ You received this

Re: running development server

2008-07-08 Thread mccomas . chris
thnx, i got that, but the IP is that my machine's IP on the network, or the network's IP? i tried it with mine, made sure the port 8000 was open and did python manage.py runserver IP:8000 and got the server to initially start, but immediately after it displays the "Quit the server with

running development server

2008-07-08 Thread mccomas . chris
hey all, i'm trying to open up my development server to a couple of our other staff members to help me start testing next week. to open up the development server to others on our network, do i set runserver to my IP or the network's IP? chris

getting a manytomany field in date based archive index

2008-07-07 Thread mccomas . chris
Hey, I have date based generic views, in the archive_index view I'm displaying the most recent blog entries, I'm trying to get the category for each, which is a ManyToMany field. {% for entry in latest %} {{ entry.title }} {{ entry.body }} Category: {% for categories in entry.get_category_list

Re: Extending the user system

2008-07-07 Thread mccomas . chris
thanks you guys. one more quick question. i have a field in User is_student, it's a Boolean field. in my course model i want to setup a field so that many students can be added to that course, using a manytomany (since courses have multiple students and students have multiple courses). how can

Re: Extending the user system

2008-07-07 Thread mccomas . chris
yes, but when i do that it doesn't show up anywhere in the admin. i'm not getting any errors and running it in development mode right now. class UserProfile(models.Model): url = models.URLField() home_address = models.TextField() phone_numer = models.PhoneNumberField()

Extending the user system

2008-07-07 Thread mccomas . chris
Would it be proper to use the django admin/user system and just extend it to have staff bios, etc? We're going to have it setup that our faculty will have admin access, with limited permissions to login and upload some class lectures (ppt files), edit their class info, etc. Since they'll already

Re: permalink with multiple generic views

2008-07-07 Thread mccomas . chris
thanks! On Jul 7, 9:32 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Mon, 2008-07-07 at 06:28 -0700, [EMAIL PROTECTED] wrote: > > i found a post from a while back that basically said if you're using > > the same generic view type with two different urls you couldn't use > > the

permalink with multiple generic views

2008-07-07 Thread mccomas . chris
i found a post from a while back that basically said if you're using the same generic view type with two different urls you couldn't use the permalink decorator, is that still the case with the SVN release? we have our normal news table for the school's news, but we also have students blogging

Re: MediaTemple Containers

2008-07-07 Thread mccomas . chris
I have one of the beta Django containers on MT, and I also have an account on WebFaction, I love MT, but they're severely lacking with the Django containers, IMO. WebFaction is amazing compared to MT if you plan to use shared hosting On Jul 7, 6:20 am, Niall McCormack <[EMAIL PROTECTED]>

Re: Help with templatetags

2008-07-04 Thread mccomas . chris
Yeah I did. I actually tested it on my development server, also on a production server (actually restarted apache several different times)... On Jul 4, 2:22 pm, Brian Luft <[EMAIL PROTECTED]> wrote: > Have you tried restarting the development server? I've noticed that > Django seems to cache

Help with templatetags

2008-07-04 Thread mccomas . chris
i setup a custom template tag for my index page called recent_news. i tried to setup a second template tag for the page called more_news.py. the first is working as recent_news.py. recent_news.py gets the more recent entry, i have more_news.py set to get 2-6. i have {% load more_news %} since

Re: custom template tags

2008-07-03 Thread mccomas . chris
here's the code: TEMPLATE {% load more_news %} {% get_morenews_list %} {% for news in more_news %} {{ news.title }} {% endfor %} MORE_NEWS.PY from myproject.site.models import Blog from django.template import Library,Node register = Library() def build_morenews_list(parser, token):

Re: custom template tags

2008-07-03 Thread mccomas . chris
one more thing. the first one is working. i tried to setup a second template tag for the page called more_news.py. the first is working as recent_news.py. recent_news.py gets the more recent entry, i have more_news.py set to get 2-6. i have {% load more_news %} since the file is more_news.py,

Re: custom template tags

2008-07-03 Thread mccomas . chris
thanks man, for some reason i couldn't get it and it was about to drive me nuts :) On Jul 3, 10:37 am, Berco Beute <[EMAIL PROTECTED]> wrote: > It should be in: > /project/application/templatetags/ > > 2B --~--~-~--~~~---~--~~ You received this message because

Re: custom template tags

2008-07-03 Thread mccomas . chris
Didn't mean to send it. In my template I'm using this to call the recent news: {% load recent_news %} {% get_news_list %} I'm getting a TemplateSyntaxError, 'recent_news' is not a valid tag library: Could not load template library from django.templatetags.recent_news, No module named

custom template tags

2008-07-03 Thread mccomas . chris
On my homepage I want to have a few different items, one is the recent news items. I created the recentnews.py file: from myproject.site.models import Blog from django.template import Library,Node register = Library() def build_news_list(parser, token): return NewsObject() class

Re: Make changes to model...

2008-07-02 Thread mccomas . chris
Thanks guys. I know how to do it via the admin, wasn't sure if I was "missing" something within Django to handle it :) Kind of off topic, but say myapp is named myapp, then in the heading the admin will be displayed Myapp with the model items below it. Other than customizing the admin template

Make changes to model...

2008-07-02 Thread mccomas . chris
Hello all, I'm using MySQL with Django, I setup my models and installed everything, got into the admin panel and realized I left a field out. I went back into my models file, added it, and it gives me an error because while I guess the code realized it's there, that field wasn't created in

Re: Development File Structure

2008-07-01 Thread mccomas . chris
brian, thnx. i got python2.5 installed and django9.6 installed. when i run my python command line and import django and test the version it works. however when i run the command prompt in windows and go to the django directory in python25\lib\site-packages\ and type in python django- admin.py

Development File Structure

2008-07-01 Thread mccomas . chris
Hey, I downloaded Python 2.5.2, the most recent release of PostgreSQL, and Django 0.96. I've installed PostgreSQL and Python, as well as psycopg for PostgreSQL. I ran my Python command line and it can't find Django. Where do I need to put Django so that the Python can find it?

Best way to structure flat pages

2008-06-30 Thread mccomas . chris
Hey all. Working on a new site for a University and was curious on the best way to use Django's FlatPages app, if I should use that or not. They have like 6 main sections: Current Students, Prospective Students, Faculty and Staff, About the School, Pharmacy Profession, and Community. Each of

microsoft sql server 2005

2008-05-19 Thread mccomas . chris
i just took a job with a group that just bought a microsoft sql server 2005, they want to drop ASP.net that they're currently using, i was interested in using django on the site going forward. is it possible to setup python/django and run it on a sql server?