cross-referencing design question

2009-07-23 Thread Mike Dewhirst
I'm new to Django and want to express a self-referencing design feature to link clients in the same table with each other. Django is currently objecting to this. Could you please point me to documentation which will let me figure it out? This is my models.py in a play project using Django from sv

Re: cross-referencing design question

2009-07-27 Thread Mike Dewhirst
ame contains non-ASCII-chars. Thanks again ... Daniel Roseman wrote: > On Jul 24, 5:46 am, Mike Dewhirst wrote: >> I'm new to Django and want to express a self-referencing design >> feature to link clients in the same table with each other. > You don't say what the error is

Re: cross-referencing design question

2009-07-27 Thread Mike Dewhirst
Please disregard my previous - I've got something happening/hatching Thanks Matthias and Daniel Mike Mike Dewhirst wrote: > Matthias Kestenholz wrote: > > > >> Is this your complete Membership model? Or do you have additional >> fields there? If you've o

Re: cross-referencing design question

2009-07-27 Thread Mike Dewhirst
Daniel and Matthias Thanks for your help. I finally figured out I don't need any automatic Django n:m at all! I just made my own n:m table and everything works the way I expect. I'll really try to keep things simple from now on ... Cheers Mike Mike Dewhirst wrote: > Matthi

Re: Django and related_name

2009-07-29 Thread Mike Dewhirst
Asinox wrote: > > > Hi guys, first im so sorry with my english, im new with Django, u > know ;) > > I have a problem with a related_name, the tables are fine, but the > problem is that in the Select (DropDown) the data display is "bad", in > this way: Tarifas_object: > > Html code: > > Tarifa

Re: Calculating a date

2009-08-05 Thread Mike Dewhirst
adelaide_mike wrote: > This should really be a Python enquiry, but I am sure someone will > know: > > I need to calculate the date 12 weeks before today. What is the best > way? TIA This might give you a clue ... from datetime import date def anniversary_this_week(self, tday=date.today()):

display module and template names in templates

2009-08-10 Thread Mike Dewhirst
If DEBUG is True I would like to include view.__name__ and the template filename somewhere in the rendered page. It would be nice to adjust the {% block title %} so the information appears in the top of the browser window-frame so it didn't upset an page layout stuff. Is there a reasonable wa

[highly recommended] Re: display module and template names in templates

2009-08-10 Thread Mike Dewhirst
Mike Ramirez wrote: > On Monday 10 August 2009 08:47:57 pm Mike Dewhirst wrote: >> If DEBUG is True I would like to include view.__name__ and the template >> filename somewhere in the rendered page. >> >> It would be nice to adjust the {% block title %} so the informati

Re: Model example for simple family tree

2009-08-11 Thread Mike Dewhirst
sniper wrote: > Hi, > I am new to django and wanted to try it out. > > I would like to create a table for family tree > where Relation is a many to many table which contains Profile ids > > profile_id, relative_id,type,priority. > > RELATIVE_CHOICES = ( > (u'F', u'Father'), > (u

misunderstanding

2009-08-16 Thread Mike Dewhirst
There's something here I'm not seeing. If anyone can point out the docco which refers I would be most grateful ... I'm using py2.6 and Django from svn head. The template below displays the title correctly but claims "No meta dictionary passed". Since the title is one of the meta_dict key:value

Re: misunderstanding

2009-08-16 Thread Mike Dewhirst
Karen and Eric - thank you. Yet another door opened for me :) Mike Karen Tracey wrote: > On Sun, Aug 16, 2009 at 9:33 PM, Mike Dewhirst > > Based on what your template does, you don't seem to really want to > combine a dictionary with the key 'title' and the MET

Re: Showng the primary key in admin view

2009-09-01 Thread Mike Dewhirst
Joakim Hove wrote: > Hello, > > I have a (simplified) model like this > > class Customer(models.Model): > name = models.CharField(max_length = 100) > date= models.DateTimeField() > email = models.EmailField() > > > When showing this in the (100 % default) admin view

Re: Showng the primary key in admin view

2009-09-02 Thread Mike Dewhirst
Joakim Hove wrote: > Thank you both for answering; however I am afraid we are > misunderstanding eachother here. > > I have created a admin.py file and registered my CustomerClass with > the admin interface. That works, and I can select the CustomerClass > when logged in to the admin interface. >

Re: Showng the primary key in admin view

2009-09-02 Thread Mike Dewhirst
Joakim Hove wrote: > Thank you both for answering; however I am afraid we are > misunderstanding eachother here. > > I have created a admin.py file and registered my CustomerClass with > the admin interface. That works, and I can select the CustomerClass > when logged in to the admin interface. >

Re: Showng the primary key in admin view

2009-09-02 Thread Mike Dewhirst
Joakim Hove wrote: > > > Hello, > > thanks for the tip: > >> It is usually not a good idea to give business meaning to a primary key >> in a relational database. The literature is full of reasons against it. > > I had a nagging feeling this might be the case. Do you have any links > to "Best

Re: Users Full Name in model form?

2009-09-07 Thread Mike Dewhirst
Streamweaver wrote: > This was through a custom form in a public view. I haven't done much > with admin forms but maybe someone else knows? > > > > On Sep 4, 4:50 pm, Anthony Simonelli wrote: >> Is this within the Admin interface? If so, I'm having a similar >> problem. I have a model calle

Re: Editors of choice

2009-09-08 Thread Mike Dewhirst
Dj Gilcrease wrote: > On Mon, Sep 7, 2009 at 9:55 AM, Samuel Hopkins > wrote: >> Hello Django peeps, >> >> I am a Django newbee. I have had my eye on Djanjo for a year or so now but >> held off because I had limited python experience. However, after a summer of >> python and watching Django's po

breadcrumb solution

2009-09-08 Thread Mike Dewhirst
I would like to get breadcrumbs working in a simple way. Could anyone please help? I think I need a singleton with a dict like this ... bread = singleton() bread.dct['last_title'] = Within each view and before doing anything else I want to ... def someview(request): title = 'whatever'

Re: breadcrumb solution

2009-09-09 Thread Mike Dewhirst
Daniel Roseman wrote: > On Sep 9, 7:32 am, Mike Dewhirst wrote: >> I would like to get breadcrumbs working in a simple way. Could anyone >> please help? >> >> I think I need a singleton with a dict like this ... >> >> bread = singleton() >> >> b

Re: breadcrumb solution

2009-09-09 Thread Mike Dewhirst
Thanks David - I do :) Cheers M David De La Harpe Golden wrote: > Mike Dewhirst wrote: >> I would like to get breadcrumbs working in a simple way. Could anyone >> please help? > >> Is there a better way? > > One thing you can do is a "pure template"

Re: Django Project Management App

2009-09-10 Thread Mike Dewhirst
Greg wrote: > Hi all, > > Since I started with django a year or so ago, I've been gradually > building a very simple project management app for myself - it started > as a project to learn the language but has evolved into a very useful > tool, handling all my timetracking, task management and inv

Re: What JavaScript framework do you use and why?

2009-09-29 Thread Mike Dewhirst
I have heard nice things about Mochikit. I had a look at it a long time ago and fully intended to get involved but haven't had the opportunity yet ... http://www.mochikit.com/about.html esatterwh...@wi.rr.com wrote: > I use mootools a lot. When I was deciding which on to use, I first > looke

Re: Versionable Models?

2009-10-27 Thread Mike Dewhirst
Todd Blanchard wrote: > Total django noob here. Rails/PHP/WebObjects refugee here. > > I'm starting a project where some models need to be fully versioned. > > IOW, record update is forbidden - every save to a changed model should > result in a new record with a new version number or timestam

setting up headache migrating to apache

2009-10-29 Thread Mike Dewhirst
I'm trying to replicate my (working ok) winxp testing environment on openSuSE 11.1 with Apache2 as a parallel testing environment. We're nowhere near production at the moment. The problem I'm having on openSuSE when i try /usr/bin/python /srv/www/vhosts/ccm/climate/ccm/tests.py is ... Traceba

media_url tute

2009-11-13 Thread Mike Dewhirst
I have looked at the django docs (http://docs.djangoproject.com/en/dev/topics/forms/media/) which painstakingly describe how to set up MEDIA_ROOT and MEDIA_URL. Does anyone know of a tutorial or other docco which covers the topic? Thanks Mike -- You received this message because you are subs

Re: Restrict admin to superusers only

2009-11-27 Thread Mike Dewhirst
chefsmart wrote: > Is there a way to allow only superusers to login to and use the admin > section? Users with is_staff = True do exist and that can't be changed > because this app is in use and makes use of is_staff in some other > way. I believe so. Create a group (say no_admin?) with no permiss

Re: Custom Authentication Backend

2009-12-02 Thread Mike Dewhirst
bfrederi wrote: > I am writing my own custom authentication for AD/ldap and I am trying > to authenticate the user without saving the user in the Django User > table. I also don't want the user to have to log in every time they > want to view something. Is there any way to not save the user in the

design starting question

2009-12-09 Thread Mike Dewhirst
I want to design a site to replace an existing one running on my client's Windows 2008 server. Currently, external users are given manually generated basic auth login credentials to view their own directory on the server. It is running Apache 2.2 and there is zero html and no database. The doc

Re: LDAP-groups problem

2009-12-17 Thread Mike Dewhirst
Wayne wrote: > Hi, > > I tried to use djando-ldap-groups but got some errors from database > configuration. Could somebody shed some light on the possible problems > of my set up? > Maybe the Oracle API is translating the PK into a LOB? If LOB is a large object then that is probably the issue

why wordpress

2010-04-15 Thread Mike Dewhirst
I have just been asked by a client to install Wordpress for them. Someone in the marketing department apparently wants a blog for the organisation. I'd prefer to avoid php so I'm wondering if anyone knows of a Python or even better a Django equivalent? Thanks Mike -- You received this mess

Re: why wordpress

2010-04-15 Thread Mike Dewhirst
On 16/04/2010 11:15am, CLIFFORD ILKAY wrote: On 04/15/2010 08:37 PM, Mike Dewhirst wrote: I have just been asked by a client to install Wordpress for them. Someone in the marketing department apparently wants a blog for the organisation. I'd prefer to avoid php so I'm wondering if an

Re: why wordpress

2010-04-15 Thread Mike Dewhirst
On 16/04/2010 4:47pm, Xavier Ordoquy wrote: Le 16 avr. 2010 à 03:18, CLIFFORD ILKAY a écrit : On 04/15/2010 09:13 PM, Shawn Milochik wrote: There are probably a thousand blogging apps done in Django, because it seems that a lot of people make one when they discover Django. However, I think y

Re: GUI builder for django

2010-04-21 Thread Mike Dewhirst
On 22/04/2010 8:10am, andres osinski wrote: No, and it's not a good idea to do WYSIWYG development for HTML. HTML is not a format that produces static content; it varies depending on screen fonts, browser, and platform, and getting that right means sticking to relative layout, making content flow

Re: New User Stuck on Tutorial Part 2

2010-05-10 Thread Mike Dewhirst
On 11/05/2010 3:42pm, Old Davy wrote: On 05/10/2010 08:18 PM, Shawn Milochik wrote: Exactly what directory is your copied template in? It's most likely not in the right place. Ensure that you have a template dir that your settings knows about, and that template dir has a subdirectory called 'ad

Re: New User Stuck on Tutorial Part 2

2010-05-10 Thread Mike Dewhirst
he mud" feeling. Thank you very much!!! On 05/10/2010 11:04 PM, Mike Dewhirst wrote: On 11/05/2010 3:42pm, Old Davy wrote: On 05/10/2010 08:18 PM, Shawn Milochik wrote: Exactly what directory is your copied template in? It's most likely not in the right place. Ensure that you have

Re: New User Stuck on Tutorial Part 2

2010-05-10 Thread Mike Dewhirst
On 11/05/2010 4:04pm, Mike Dewhirst wrote: On 11/05/2010 3:42pm, Old Davy wrote: On 05/10/2010 08:18 PM, Shawn Milochik wrote: Exactly what directory is your copied template in? It's most likely not in the right place. Ensure that you have a template dir that your settings knows about

template url tag fetches wrong URL with generic view

2010-05-12 Thread Mike Dewhirst
I'm working through the Coltrane weblog tutorial and trying to implement semi-hard-coded breadcrumbs. It seems reverse doesn't like what I've done. This is the template inheritance chain ... 1. Salient parts of underlying template ... {% block breadcrumbs %}{{ block.super }} › Mike's Blog {%

[Solved] template url tag fetches wrong URL with generic view

2010-05-12 Thread Mike Dewhirst
On 13/05/2010 12:43pm, Mike Dewhirst wrote: I'm working through the Coltrane weblog tutorial and trying to implement semi-hard-coded breadcrumbs. It seems reverse doesn't like what I've done. Totally fair. I don't like what I did either. In 3. below I left out the = betw

Re: Uploaded File Security

2010-05-19 Thread Mike Dewhirst
On 20/05/2010 11:00am, Lee Hinde wrote: I'm working on an intranet app for a client that will have file uploads. I'm early in the process, but have the uploading working just fine via admin. Once we get to deployment, I'm unclear on how to coordinate the security that django will know about (gro

Re: Built in password reset views resulting in Caught NoReverseMatch while rendering: Reverse for 'django.contrib.auth.views.password_reset_confirm'

2010-05-30 Thread Mike Dewhirst
Simon Have considered the sequence in which templates are loaded? See http://docs.djangoproject.com/en/dev/ref/settings/ If you put the filesystem template loader ahead of the app_directories django will find your own versions named identically with django versions and use them instead. TEM

Re: Built in password reset views resulting in Caught NoReverseMatch while rendering: Reverse for 'django.contrib.auth.views.password_reset_confirm'

2010-05-31 Thread Mike Dewhirst
talled site-packages app. Cheers Mike I guess the app_directories loader works on the order of apps listed in the INSTALLED_APPS tuple? I don't know. You'd need to lok at the gjango source to get that. On May 31, 2:05 am, Mike Dewhirst wrote: Simon Have considered th

Re: Directory structuring

2010-06-03 Thread Mike Dewhirst
EJ - one comment below ... On 4/06/2010 11:41am, EJ wrote: Hi guys, first of all: Thanks! Django-users has been a great resource for me so far; I've come across many solutions for my own problems here. I'm not even really sure if this question is totally appropriate for this page, but here goes

Re: setting DEBUG=False disables flatpages

2010-06-08 Thread Mike Dewhirst
On 8/06/2010 4:58pm, adrian wrote: Hello Guys, on all my projects I have the problem that setting DEBUG=False in settings.py disables flatpages (404 Pages are displayed). This also applies to newly created projects. This happens with Django version 1.2.1. Can someone confirm this with his deploy

Re: how to develop cms on django

2010-07-19 Thread Mike Dewhirst
On 19/07/2010 7:02pm, Dmitry Dulepov wrote: Hi! Julio Cesar Rodriguez Cruz wrote: sir i am a beginner in python and django.. i want develop a content management system using django.. It is a bit late to respond to this but I have to say it: you are going to fail this project. Why? Can you im

data import and auto-incrementing id columns

2010-07-20 Thread Mike Dewhirst
The data I want to import is in Paradox tables and that can be easily exported in any format. However, I believe the id columns in Paradox are gunna have to be used to re-establish relationships (1:n and n:m) in PostgreSQL. How is this going to work when django models specify auto-incrementin

Re: No fixtures found

2010-07-25 Thread Mike Dewhirst
John It looks like you mis-spelled slightly ... > ... 'django.contrib.sessi[o]ns.middleware.Session(s)Middleware', It should be django.contrib.sessions.middleware.SessionMiddleware but you have probably discovered that already. Cheers Mike On 26/07/2010 6:59am, john wrote: I still don

Re: No fixtures found

2010-07-25 Thread Mike Dewhirst
On 26/07/2010 5:11am, john wrote: I got the message 'No fixtures found' when I ran the python manage.py syncdb command. I am working in sqlite3 which seems to be working as evidenced by the fact that if I type sqlite in a terminal I get the sqlite>. The first time I got the following output, fo

Re: How long do objects live?

2010-08-11 Thread Mike Dewhirst
On 12/08/2010 11:24am, Andy wrote: When I create an object in Django, how long does it live? When Django finishes responding to a HTTP request, the Python process lives on to serve the next request. Does that mean all those objects that were created would continue to hang around? No. As soon a

Re: Create files and directories from Django 1.2.1

2010-08-14 Thread Mike Dewhirst
On 15/08/2010 12:10am, Mark Mooij wrote: Hi all, I recently migrated from Django 1.1.1 to 1.2.1. In 1.1.1 I had an application which imports an external python script in which a directory and some files are created. Since the migrate this doesn't work anymore, I get a number of IOErrors because

Re: Create files and directories from Django 1.2.1

2010-08-15 Thread Mike Dewhirst
eKML.py the problem arises in: ... import os ... def createKML(id): ... os.mkdir("D:/path/to/mysite/templates/maps/"+str(id)) writefile = "D:/path/to/mysite/templates/maps/"+str(id)+"/"+str(id) + ".kml" f = open(writefile, 'wb') ... I hope this

Re: Create files and directories from Django 1.2.1

2010-08-15 Thread Mike Dewhirst
On 16/08/2010 12:57pm, Mike Dewhirst wrote: On 16/08/2010 1:06am, Mark Mooij wrote: Hi Mike, Thanks for your reply. I haven't changed anything else, I am processing the MS updates, but I don't think this is the problem, as this all worked fine before the migration to 1.2.1, also if

Re: Create files and directories from Django 1.2.1

2010-08-16 Thread Mike Dewhirst
int out the mkdirs string to see what you are creating. HTH, -Doug Mark On 16 aug, 08:32, Mike Dewhirst wrote: On 16/08/2010 12:57pm, Mike Dewhirst wrote: On 16/08/2010 1:06am, Mark Mooij wrote: Hi Mike, Thanks for your reply. I haven't changed anything else, I am processing t

Re: help with understanding tag cloud code

2010-08-22 Thread Mike Dewhirst
On 23/08/2010 11:17am, John Yeukhon Wong wrote: Hi, I am confused with this piece of code. This is a code responsible for building a tag cloud. It lives in the views.py The part I don't understand is # Calculate tag, min and max counts. min_count = max_count = tags[0].bookmarks.count(

deployment problem gotcha

2010-08-30 Thread Mike Dewhirst
I had an admin media problem finding base.css in deploying an app from the Django (svn head) dev server on Windows to Apache 2.2 on Linux Because I had prepared this email ready to ask for help, I'm posting it anyway with the hope that it helps someone. Everything else was working. Firebug wa

Re: deployment problem gotcha

2010-08-30 Thread Mike Dewhirst
python2.6 in the path. Thanks again Mike On 30/08/2010 5:36pm, Mike Dewhirst wrote: I had an admin media problem finding base.css in deploying an app from the Django (svn head) dev server on Windows to Apache 2.2 on Linux Because I had prepared this email ready to ask for help, I'm posting it a

Re: mod_wsgi, apache, windows XP

2010-09-02 Thread Mike Dewhirst
On 3/09/2010 7:46am, Jesse wrote: Hello Graham, I have the c:/public/apache/apache_django_wsgi.conf working now, at least apache restarts. Do you know if mod_wsgi has a problem with these versions: python 2.7 and apache 2.2, and postgres 8.4, psycopg 2.2.2 My server error is: TemplateSyntaxEr

Re: mod_wsgi, apache, windows XP

2010-09-02 Thread Mike Dewhirst
find it but it isn't available for some reason. I would be investigating the database side of things. Without googling I would know whether there might be any subtle psycopg2 version problems but I'd eliminate everything else as a possibility first. Mike Jesse On Sep 2, 5:41

Re: Generate a daily serial/batch/lot number

2010-09-06 Thread Mike Dewhirst
On 6/09/2010 4:19pm, kmpm wrote: I have a project running in a manufacturing industry that is actually built upon django. In this I need to generate a unique serial, batch or lot number (depending on what you would like to call it) that is a running number from 0 to whathever for each and every d

Re: Generate a daily serial/batch/lot number

2010-09-06 Thread Mike Dewhirst
On 6/09/2010 5:38 PM, kmpm wrote: On Sep 6, 9:02 am, Mike Dewhirst wrote: On 6/09/2010 4:19pm, kmpm wrote: I have a project running in a manufacturing industry that is actually built upon django. In this I need to generate a unique serial, batch or lot number (depending on what you would

Re: Generate a daily serial/batch/lot number

2010-09-06 Thread Mike Dewhirst
I'm reminded that almost all my own disasters were caused by premature optimisation. I would go with the simplest solution and keep an eye on performance as it scales. Gives you plenty of time to research plan B. That'll be 2c please M On 7/09/2010 4:49am, kmpm wrote: On Sep 6, 6:52 pm,

webmin

2010-09-08 Thread Mike Dewhirst
A perl, C and C++ colleague is leaning towards python/django and needs an app roughly equivalent to Webmin. Does anyone know of some django-ish thing for him to look at? Thanks Mike -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: windows xp, python 2.6, mod_wsgi, apache 8.4, MySQL 5.1 - CSS not loading.

2010-09-12 Thread Mike Dewhirst
On 12/09/2010 7:33am, Jesse wrote: Hello, I've successfully implemented mod_wsgi with Apache on Windows XP using MySQL 5.1. Everything but the CSS/html for the index page is working. Even the admin pages are working with style sheets. The following is my code. I cannot seem to find the error

Re: windows xp, python 2.6, mod_wsgi, apache 8.4, MySQL 5.1 - CSS not loading.

2010-09-12 Thread Mike Dewhirst
On 13/09/2010 3:11pm, Mike Dewhirst wrote: On 12/09/2010 7:33am, Jesse wrote: Hello, I've successfully implemented mod_wsgi with Apache on Windows XP using MySQL 5.1. Everything but the CSS/html for the index page is working. Even the admin pages are working with style sheets. The followi

Re: Django and third party python apps, best practices for path locations?

2010-09-15 Thread Mike Dewhirst
On 16/09/2010 12:06pm, Nick wrote: Yes and no. I'm familiar with the term but haven't read up on it enough to wrap my head around installing it and getting it setup. Is it absolutely essential to get used to working with virtualenv if you plan to develop on a Windows machine but your production s

Re: Auto Increment Primary_Key

2010-09-19 Thread Mike Dewhirst
This might not work for you but I would consider South. You might be able to rework the schema and migrate the data. On 19/09/2010, at 4:40 PM, "hellowrakesh...@gmail.com" wrote: > Hi, > I am in a trouble and need help. We have an application developed in > Django and has a custom defined

how should models be semi-related

2010-09-20 Thread Mike Dewhirst
I have an address model with a 'country' field and a phone model with a 'country_code' field. I would guess the right approach is to use choices for both fields so the user can always select or change country in an address AND country_code in a phone number. However, I would like the selecti

Re: Why Django Apps Suck

2010-09-21 Thread Mike Dewhirst
Also at pycon-au http://glamkit.org/ where the talk focused on reusability of apps. On 22/09/2010 6:26am, klaasvanschel...@gmail.com wrote: Ok here it goes: I don't have a proper platform for my observations / rants so I figured I'd try my luck here. Django has been my favorite framework for d

Re: Where do you put your business logic in django? Organizing big projects in django.

2010-09-27 Thread Mike Dewhirst
On 27/09/2010 5:08pm, MrMuffin wrote: Where do you put your business logic in django? In my project I`ve put it into the models.py, but that file soon become huge and hard to maintain. Of course I can just stuff it into whatever file I like, but I`d like to have some standard way of doing this. T

Re: Accessing schemas in django

2010-09-27 Thread Mike Dewhirst
On 27/09/2010 4:53pm, Jean-Pierre De Villiers wrote: Hi, Is there a way to access an existing database schema in Django? Any help would be appreciated! google for 'existing schema django' J -- You received this message because you are subscribed to the Google Groups "Django users" group.

Re: What's the best way to implement project permissions in a project management app?

2010-10-04 Thread Mike Dewhirst
On 5/10/2010 11:32am, Stodge wrote: What's the best way to implement project permissions in a project management app? Should I just create the concept of membership and have a function is_member on the project model? Have a look at django-todo. A quick read the other day indicated to me tha

Re: /admin list help ASAP

2010-10-20 Thread Mike Dewhirst
On 21/10/2010 1:24pm, Bobby Roberts wrote: hi all. I have two models setup let's call them Gallery Photos photos has a field as such: GalleryId = models.ForeignKey('Gallery', verbose_name=_('Gallery Id'), related_name='Gallery_Id',blank=False, null=False, help_text=_("Please choose the galler

Re: Converting Django to Desktop App? (Multiple Instances)

2010-10-29 Thread Mike Dewhirst
On 29/10/2010 6:33pm, Victor Hooi wrote: Hi, This is a bit of a strange scenario. We have a simple Django application used to maintain a database of newspaper/journal articles. We're extensively using the django-admin as part of this app. Currently, we're having issues getting a production env

Re: Django - Alternative to using NULLs? (for integer and FK fields).

2010-11-29 Thread Mike Dewhirst
On 30/11/2010 4:26pm, Victor Hooi wrote: heya, Phone Number - Yup, you're both right, I'll be using CharField now, and model validation to make sure they're digits. Spouse/Children: Victor I'm coming in late on this and don't have the context for your design but I think there might be a bet

Re: Django - Alternative to using NULLs? (for integer and FK fields).

2010-11-29 Thread Mike Dewhirst
w_add=True) saved = models.DateTimeField(auto_now=True) saved_by = models.ForeignKey(User, blank=True, null=True, related_name='relationship_saved_by') def __unicode__(self): return u'%s: %s ' % (self.relationship, self.xref) Mike Cheers, Victor On Nov

Re: Loading CSS

2010-12-01 Thread Mike Dewhirst
On 2/12/2010 1:48am, octopusgrabbus wrote: Thank you. I've done made changes according to your suggestions, but the css appears not to load. I am using apache, not the built-in web server. Here is my working vhost.conf for my Apache. See the aliases below which cause Apache to find the css fil

Re: __init__.py file executed twice ?

2010-12-08 Thread Mike Dewhirst
On 9/12/2010 5:10am, martvefun wrote: On 08-12-10 18:39, Tom Evans wrote: On Wed, Dec 8, 2010 at 4:52 PM, martvefun wrote: Hello, I'd like to start some threads when the server launch to listen to events (I'm doing message passing). To do so, I guess I should be using the __init__.py file

Re: __init__.py file executed twice ?

2010-12-10 Thread Mike Dewhirst
On 10/12/2010 7:43pm, martvefun wrote: On 09-12-10 01:37, Mike Dewhirst wrote: It seems like a good place to put it. Maybe you can test to see if the threads have been started already? Here is a singleton which could live in your __init__.py and might help to record the state of your threading

Re: Apache & mod_wsgi are configured correctly. Need Django to recognize my django.wsgi file.

2010-12-11 Thread Mike Dewhirst
On 12/12/2010 7:14am, jc wrote: Apache& mod_wsgi are configured correctly (I've created a hello world .html apache file and a hello world mod_wsgi application with no problems). I know need my Django app to recognize my django.wsgi file. What makes me think that it's not recognizing my wsgi file

Re: Apache & mod_wsgi are configured correctly. Need Django to recognize my django.wsgi file.

2010-12-11 Thread Mike Dewhirst
he directory in which that script lives - in other words you create a hole in the entire filesystem lockdown. To gain more info on wsgi scripts try ... http://code.google.com/p/modwsgi/wiki/DebuggingTechniques Good luck Mike thanks for the reply back, I do appreciate it... j. On De

Re: Apache & mod_wsgi are configured correctly. Need Django to recognize my django.wsgi file.

2010-12-11 Thread Mike Dewhirst
On 12/12/2010 10:56am, jc wrote: I've tried to fix my config files and it gives me a 500 error, here is what i see n the logs. I've been told by someone else that they think it's still my mod_wsgi/Apache configuration and not the error that I'm getting in the log about missing modules. Any sugges

apache serving static files

2010-01-07 Thread Mike Dewhirst
I want to serve development code from SuSE 11.1 using Apache 2.2 with mod_wsgi in parallel with the Django server on WinXP. It works - except I have obviously outsmarted myself configuring Apache to serve javascript. In particular tiny_mce.js. As an example, here is part of my ../templates/

Re: apache serving static files

2010-01-07 Thread Mike Dewhirst
On 8/01/2010 2:13am, Stephen Emslie wrote: Looks like the regular expression of the AliasMatch excludes any '/' characters in the pattern, so is only going to match the last part of the path. Or roughly equivalent to doing path.split('/')[-1]. does the following work? AliasMatch /(.*\.js) /

Re: Announce: django-ldap-groups

2010-01-19 Thread Mike Dewhirst
On 6/08/2009 10:15am, Peter Herndon wrote: I'm pleased to announce the release of django-ldap-groups. Of special interest for building intranet sites, django-ldap-groups allows Django users to authenticate against LDAP, and allows site administrators to map LDAP organizational units (OUs) to Dj

Re: leading zeros

2010-01-22 Thread Mike Dewhirst
On 23/01/2010 11:12am, Patrick wrote: Hello All, I'm sorry for being a newbe and posting this site, but I'm desperate. I inherited a django site and when posts are added through the admin page they render like this: http://website/posts/category/2010/1/11/post_information/ but the link will o

Re: django and ldap

2010-02-04 Thread Mike Dewhirst
On 4/02/2010 11:14pm, David De La Harpe Golden wrote: On 04/02/10 08:33, andreas schmid wrote: @brad: can you show me some sample code for this? David I am using Peter Herndon's django-ldap-groups successfully. He has two backends; one for Novell's eDirectory which I'm using and another for

Re: django-debug-toolbar and 404's

2010-02-10 Thread Mike Dewhirst
Rishab Maybe you haven't included any toolbar panels? Here is an example ... if TOOLBAR: DEBUG_TOOLBAR_CONFIG = { 'INTERCEPT_REDIRECTS': TOOLBAR_REDIRECTS, 'SHOW_TOOLBAR_CALLBACK': None, } DEBUG_TOOLBAR_PANELS = ( #'debug_toolbar.panels.version.VersionDebugP

Re: Django IDE

2010-02-17 Thread Mike Dewhirst
On 18/02/2010 9:38am, Jacek Furmankiewicz wrote: We've had fairly good experience with Eclipse and the PyDev plugins for it. Gives you even refactoring, which came in handy a few times. I tried it and liked that but couldn't stick with it. My problem was integrating subversion in a seamless w

Re: LDAP Authentication and Single Sign on

2010-02-18 Thread Mike Dewhirst
On 19/02/2010 1:53am, Wayne wrote: Hi, I am about to develop an admin interface using Django framework for several web applications . By design, those applications will be decentralized, which means that they may use different databases and reside on different servers and they will talk to each

Re: custom auth backend and ./manage.py test

2010-02-21 Thread Mike Dewhirst
On 22/02/2010 10:53am, Stephen Crosby wrote: I'm working on a project that requires a custom auth backend which I've just written by subclassing contrib.auths.backends.ModelBackend and overriding the authenticate method so it takes a third parameter. It works nicely, but of course there are now l

Re: How to share settings file in multiprogrammer project

2010-03-28 Thread Mike Dewhirst
On 29/03/2010 7:50am, Guillermo wrote: Hi, I'm working on a project with multiple programmers for the first time, and I'm not sure how I should go about commiting the Django project's setting file to the public repo. Since it can contain sensitive data, how's this done usually so everybody works

django version detection

2010-03-28 Thread Mike Dewhirst
Can someone kindly tell me how I can detect which subversion revision of Django is actually installed on my machine? I need to re-install the exact same revision on another platform. It is probably staring me in the face but I must be looking elsewhere. Thanks Mike -- You received this messa

Re: django version detection

2010-03-28 Thread Mike Dewhirst
Much appreciated :) M On 29/03/2010 11:10am, Russell Keith-Magee wrote: On Mon, Mar 29, 2010 at 8:07 AM, Mike Dewhirst wrote: Can someone kindly tell me how I can detect which subversion revision of Django is actually installed on my machine? I need to re-install the exact same revision on

RE: django admin

2021-10-10 Thread Mike Dewhirst
Try manage.py collectstatic--(Unsigned mail from my phone) Original message From: Baraka Nzavi Date: 11/10/21 07:32 (GMT+10:00) To: Django users Subject: django admin hello guys...what leads to the admin interface misbehaving in that the styling does not show -- You rece

RE: Permissions Model Inefficiency Killing DB

2021-11-24 Thread Mike Dewhirst
Do you think this is a consequence of permission complexity?I have instinctively avoided individual permissions for purely management reasons and stuck to user membership of auth groups (roles) and given permissions exclusively to groups.That postpones lookups to when they are needed.I can't im

RE: Models

2022-01-21 Thread Mike Dewhirst
Not safely. You would need to script everything behind the scenes - including migration.A safer approach might be to use a generic table which contains the necessary meta information (char, int etc) as data alongside the actual data in each row. I would also consider booking sessions with a psyc

Django docs failing with search docs - certificate has expired

2022-02-02 Thread Mike Dewhirst
Error 503 certificate has expired certificate has expired Guru Mediation: Details: cache-syd10147-SYD 1643862123 79021947 Varnish cache server -- Signed email is an absolute defence against phishing. This email

Django docs failing

2022-02-02 Thread Mike Dewhirst
The following error occurs when searching the docs for a term. It looks like the content delivery network node in Sydney Australia has had a certificate renewal glitch. Error 503 certificate has expired certificate has expired Guru Mediation: Details: cache-syd10147-SYD 1643862123 79021947

FIXED [Was: Django docs failing]

2022-02-02 Thread Mike Dewhirst
The internet seems to be self healing! On 3/02/2022 3:47 pm, Mike Dewhirst wrote: The following error occurs when searching the docs for a term. It looks like the content delivery network node in Sydney Australia has had a certificate renewal glitch. Error 503 certificate has expired

Off topic slightly - Apache https redirect

2022-02-06 Thread Mike Dewhirst
There seems to be a multitude of ways to redirect from http to https.Letsencrypt rewrote my conf for port 80 traffic to https but when a customer used http://mysite.com it brought up the Apache "this is working" page.Any pointers to the absolutely correct way?ThanksMike--(Unsigned mail from my

Re: Off topic slightly - Apache https redirect

2022-02-07 Thread Mike Dewhirst
: Re: Off topic slightly - Apache https redirect On Sunday, February 6, 2022 at 9:12:38 PM UTC-5 Mike Dewhirst wrote:There seems to be a multitude of ways to redirect from http to https.Any pointers to the absolutely correct way?How about something like this?   ServerName example.com  ServerAlias

  1   2   3   4   5   6   7   8   9   10   >