Re: Uptime all the time

2023-01-22 Thread Mike Dewhirst
On 23/01/2023 5:12 am, j harvey wrote: I am looking for ideas on how to keep my app running all the time, even when uploading data that will replace the current data. Some of these tables will have a million rows or more. Ideas? Almost a question for the PostgreSQL users list - assuming that i

Re: deleting a user model that extends abstractuser

2023-02-03 Thread Mike Dewhirst
On 4/02/2023 7:58 am, d07 wrote: I am trying to delete a user object that belongs to a User class that extends AbstractUser. The extending class looks something like this: class User(AbstractUser):     name = CharField("Name", blank=True, max_length=255)     def __str__(self):         return

RE: Need help

2023-02-21 Thread Mike Dewhirst
https://explore.transifex.com/django/django-docs/Might helpM--(Unsigned mail from my phone) Original message From: Emmanuel Wilfried Ilboudo Date: 22/2/23 13:08 (GMT+10:00) To: Django users Subject: Need help Hi all !!! I would like to have the Django documentation in French

Re: how i use django in blockchain.

2023-03-23 Thread Mike Dewhirst
On 23/03/2023 6:02 pm, Shubham Lahane wrote: im currently working on my BE project. my project topic is 'secure EFIR using Blockchain'. actually im working on wesbite that is decentralized in nature. once user fill the FIR form, in backend smart contracts will run and i want to show transaction

University chemical management system

2023-03-31 Thread Mike Dewhirst
Does anyone know of an existing Django based chemical inventory management system for a large university? Thanks Mike -- Signed email is an absolute defence against phishing. This email has been signed with my private key. If you import my public key you can automatically decrypt my signature

Re: Is programming in Django intellectually satisfactory

2023-04-26 Thread Mike Dewhirst
On 26/04/2023 10:18 am, Julius Chesoni wrote:  Hi guys, I find programming in the abstract very interesting and full of intellectual benefits similar to those acquired from Mathematics. However, when it comes to programming languages I find the practice of programming very tiresome since there

Re: Run Python Code on Front-End

2023-05-22 Thread Mike Dewhirst
On 23/05/2023 10:22 am, Muhammad Juwaini Abdul Rahman wrote: How can one run Python code from the backend that triggers on the front-end upon clicking a button on a certain page? Have a close look at htmx. It doesn't run Python but will replace any targeted HTML element with output from Pyt

Re: how to convert to Django 3 or 4

2023-06-02 Thread Mike Dewhirst
On 3/06/2023 7:20 am, john fabiani wrote: Hi everyone, I am tasked with updating/upgrading a very old Django web site - I believe it is 1.7.  I need convert and need what is required. Thanks in advance. I need to convert the following: Because all your urls are regular expressions, you ca

Re: how to convert to Django 3 or 4

2023-06-02 Thread Mike Dewhirst
On 3/06/2023 11:57 am, john fabiani wrote: aware there is no longer the "patterns" urlpatterns = [     ... ] It is just a list nowadays. -- Signed email is an absolute defence against phishing. This email has been signed with my private key. If you import my public key you can automatically d

Re: Need to trigger action on 4th Saturday of the month

2023-07-25 Thread Mike Dewhirst
l you "sat_4" once per month. There are options to nullify month-end and year-end which you would need to employ to prevent them from spoiling "sat_4" if it fell on a month-end or year-end. pip install baklabel https://github.com/mdewhirst/baklabel Cheers Mike Thank you

Case-insensitive non-deterministic collation

2023-08-05 Thread Mike Dewhirst
E = pg_default     CONNECTION LIMIT = -1     IS_TEMPLATE = False; Many thanks for any help Cheers Mike -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to djang

Re: Case-insensitive non-deterministic collation

2023-08-06 Thread Mike Dewhirst
On 5/08/2023 7:58 pm, Chetan Ganji wrote: Hi Mike RE: The primary use case is to establish case-insensitivity when checking names - including usernames, company names and abbreviations/acronyms. I dont know anything about db_collation. Me neither Below 4 lookups should solve most common

Re: Case-insensitive non-deterministic collation

2023-08-06 Thread Mike Dewhirst
7;C' and locale='C' because that is how most of my databases are already established. If that passes my tests I might move on to other things. From what I can see, PostgreSQL are likely to deprecate citext as inelegant. That would be why Django has deprecated it. Thanks agai

Re: Case-insensitive non-deterministic collation

2023-08-08 Thread Mike Dewhirst
My tests stopped working so I have decided to abandon case-insensitive fields and do it all manually. Thanks everyone. Cheers Mike On Monday, August 7, 2023 at 12:29:28 PM UTC+10 Mike Dewhirst wrote: > On 6/08/2023 9:17 pm, Chetan Ganji wrote: > > Thanks Chetan > > I have

Re: Newbie django/python with C++ background wants enums

2012-02-01 Thread Mike Dewhirst
rily required without having to resort to __internal__() methods. They are really for people who want to tweak the language in "special" ways or give their own classes python-like class properties. What is the best way to do it in python for my problem, given that I do not want to write

Re: create users from /etc/passwd?

2012-02-02 Thread Mike Dewhirst
a new user including any ldap groups you set up for Django based entirely on successful ldap authentication. It will bring whatever ldap info across to Django that you require. Mike thanks again! --Tim -- You received this message because you are subscribed to the Google Groups "Djang

Re: problem installing PIL

2012-02-02 Thread Mike Dewhirst
This might help ... http://stackoverflow.com/questions/2088304/installing-pil-python-imaging-library-in-win7-64-bits-python-2-6-4 On 3/02/2012 10:40am, NENAD CIKIC wrote: I came across this problem (the problem is that i can not install PIL on my windows 7 64 bit machine) when I have tried to

auth groups puzzle

2012-02-02 Thread Mike Dewhirst
data? A side question is how do I remove the displayed Groups in the Django Admin auth/user display? Thanks Mike -- 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.

Re: auth groups puzzle

2012-02-02 Thread Mike Dewhirst
I'm going to simplify the use case and live with users being in the same group for all companies. This is only a prototype. If a demand arises in production I'll worry about it then. Sorry to bother you Mike On 3/02/2012 4:58pm, Mike Dewhirst wrote: I want to use the built-in a

Re: auth groups puzzle

2012-02-04 Thread Mike Dewhirst
moved on from this to other conundrums for now. Thank you both for your responses. They confirm my original thought that the simpler approach will suffice for the time being. Cheers Mike On 5/02/2012 12:13am, Dan Gentry wrote: I've solved this problem in an app, but not with the bui

Re: same code runs on two machines and barfs on the third

2012-02-07 Thread Mike Dewhirst
trick is to confirm your assumptions one by one. Ask me how I know. Good luck Mike -- 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 from this group, sen

Re: What Can I use?

2012-02-11 Thread Mike Dewhirst
It is built into the Django distribution. Sort of "batteries included". https://docs.djangoproject.com/en/1.3/ref/contrib/comments/example/ Mike -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, s

Re: Database image from models

2012-02-14 Thread Mike Dewhirst
On 15/02/2012 7:18am, galgal wrote: Is there any free app to generate database image schema from all models from all apps? I need image with tables and relations shown. This may help ... http://live.gnome.org/Dia/Python Thanks for help. -- You received this message because you are subscri

Re: Admin error

2012-02-14 Thread Mike Dewhirst
On 15/02/2012 4:39pm, Stanwin Siow wrote: Hi there, i'm getting this error when trying to get the default admin page up. invalid syntax (admin.py, line 1) Could you post the contents of the offending file (admin.py) here? Any ideas where to rectify this? Thanks in advance Best Regards

Re: Admin error

2012-02-14 Thread Mike Dewhirst
, Stanwin Siow On Feb 15, 2012, at 1:46 PM, Mike Dewhirst wrote: On 15/02/2012 4:39pm, Stanwin Siow wrote: Hi there, i'm getting this error when trying to get the default admin page up. invalid syntax (admin.py, line 1) Could you post the contents of the offending file (admin.py)

Re: Admin error

2012-02-14 Thread Mike Dewhirst
o.contrib.admin',* *# Uncomment the next line to enable admin documentation:* *'django.contrib.admindocs',* 'registration', 'r2.topic', 'r2.opinion', 'r2', 'r2.statistics', 'paypal.standard.ipn', ) besides the tutorial basical

Re: Admin error

2012-02-14 Thread Mike Dewhirst
On 15/02/2012 5:41pm, Mike Dewhirst wrote: invalid syntax (admin.py, line 1) Your original error indicated there is an admin.py but with an error on line 1 or a missing admin.py which you have confirmed. That is the problem. To get your models to appear in the admin app you need an

Re: Admin error

2012-02-15 Thread Mike Dewhirst
;ion=1#hl=en&rlz=1C1GPEA_en___AU313&output=search&sclient=psy-ab&q=admin.autodiscover()&pbx=1&oq=&aq=&aqi=&aql=&gs_sm=&gs_upl=&fp=eb2d694fa5cee7bd&ix=sea&ion=1&ix=sea&ion=1&bav=on.2,or.r_gc.r_pw.r_qf.,cf.osb&fp=eb2d694fa5cee7bd&am

Re: New app crashes the project on server

2012-02-25 Thread Mike Dewhirst
On 26/02/2012 10:10am, shartha wrote: ImportError at / No module named moh Do you have a file called __init__.py in the directory? -- 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@googlegr

Re: New app crashes the project on server

2012-02-25 Thread Mike Dewhirst
for me in the past so I include them in all my projects as a matter of routine. One is my manage.py and the other is my wsgi file which works in all my projects ... Good luck Mike - - - - - - - - - - - - - - - - - - - - # this is my Django 1.4.x manage.py import os, sys if __name__

Re: Importing data using loaddata from exported data using dumpdata

2012-03-03 Thread Mike Dewhirst
have a look at file and see if it looks ok. I find I have to dump a model at a time and load them back in a sensible sequence. Connected by MOTOBLUR™ -Original message- From: Vincent Bastos To: django-users@googlegroups.com Sent: Sun, 04 Mar 2012, 08:40:07 AEDT Subject: Importing data

admin css

2012-03-04 Thread Mike Dewhirst
s? Thanks Mike -- 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 from this group, send email to django-users+unsubscr...@googlegroups.com. For more optio

Re: admin css

2012-03-05 Thread Mike Dewhirst
e relevant section from contrib.admin's base.css like so ... .help, p.help { font-size: 10px !important; color: #44; } ... and bingo I can read the help text much more easily. Cheers Mike On 6/03/2012 3:37am, Lee Hinde wrote: On Sun, Mar 4, 2012 at 8:32 PM, Mike Dewhirst wrote: I wo

Re: NullBooleanField default to unknown

2012-03-16 Thread Mike Dewhirst
On 17/03/2012 11:02am, Ben wrote: I have a NullBooleanField that I would like to show up in my admin interface as radio buttons with unknown selected by default. # I have the following simplified files ## models.py ## class Value(models.Model): presence = models.NullBooleanField(default=Fa

Re: NullBooleanField default to unknown

2012-03-18 Thread Mike Dewhirst
probably your best bet. Mike On 18/03/2012 8:10am, Ben Racine wrote: yes. On Mar 16, 2012 8:07 PM, "Mike Dewhirst" <mailto:mi...@dewhirst.com.au>> wrote: On 17/03/2012 11:02am, Ben wrote: I have a NullBooleanField that I would like to show up in my admin

Re: Adding link to admin page

2012-03-26 Thread Mike Dewhirst
ite-packages first, it stops looking. Try reversing the sequence of loaders in your settings.py Mike -- 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

Re: Adding link to admin page

2012-03-26 Thread Mike Dewhirst
On 27/03/2012 10:16am, Larry Martell wrote: On Mon, Mar 26, 2012 at 4:37 PM, Mike Dewhirst wrote: On 27/03/2012 9:16am, larry.mart...@gmail.com wrote: On Mar 25, 3:29 pm, Larry Martellwrote: I have a client that has an app built with django. On every page of their app is a link to their

Re: Adding link to admin page

2012-03-26 Thread Mike Dewhirst
- - - - - - - - - - - - - - - - - - - - - - - - - ... and you can see where I tested a link inside {% block branding %} and I can confirm it works. Hth Mike On 27/03/2012 12:46pm, Larry Martell wrote: On Mon, Mar 26, 2012 at 7:25 PM, Mike Dewhirst wrote: On 27/03/2012 10:16am, Larry Mart

Re: Adding link to admin page

2012-03-26 Thread Mike Dewhirst
I should have mentioned that {% extends "admin/base.html" %} is actually extending the django admin/base.html in site-packages because there is no such file in my SRC_ROOT/templates/admin directory. Mike On 27/03/2012 2:19pm, Mike Dewhirst wrote: Larry Here is a working setup

Re: Where are the site variables set?

2012-03-29 Thread Mike Dewhirst
On 30/03/2012 10:02am, Robert Steckroth wrote: Hello Gang, I have two other servers on Debian which have the correct site variables set. E.g. site.name , site.domain. But on this particulaly crazy Centos setup the site variable is set to the default (www.example.com

custom manager to control access

2012-04-03 Thread Mike Dewhirst
trying to do but maybe there is a better way than a custom manager. Thanks for any pointers Mike -- 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 fro

Re: custom manager to control access

2012-04-03 Thread Mike Dewhirst
On 3/04/2012 7:00pm, Tom Evans wrote: On Tue, Apr 3, 2012 at 9:43 AM, Mike Dewhirst wrote: I'm trying to make a custom manager for a few models. The objective is to limit user access to information in the database belonging to the company of which they are a member. I think I want t

Re: custom manager to control access

2012-04-04 Thread Mike Dewhirst
Anssi Thanks for that - I'll do some testing. I'm also thinking of middleware to look at the request and discover the company on the way in so I can make it available to everything which processes the request and produces a response. Cheers Mike On 4/04/2012 5:55pm, akaariai

Django 1.5 static files strangeness

2012-04-04 Thread Mike Dewhirst
### The workaround is obviously to use DEBUG = True on the dev machine Might be a bug Mike -- 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

Re: Where to load global static data?

2012-04-05 Thread Mike Dewhirst
y the webserver without getting Django involved at all. See https://docs.djangoproject.com/en/dev/howto/static-files/ Good luck Mike I.e. i'd like to have that data in memory and accessible from any view during the lifetime of the server, so that it needs NOT to be loaded for any access t

Re: Django 1.5 static files strangeness

2012-04-07 Thread Mike Dewhirst
m django.contrib.staticfiles.urls import staticfiles_urlpatterns urlpatterns += staticfiles_urlpatterns() ... which is needed to find the static files and not wanted with Apache. Sorry Mike On 5/04/2012 2:52pm, Mike Dewhirst wrote: I'm getting odd static files 404 behaviour switching to DEBUG = Fa

Re: Where do ya'll put your glue models?

2012-04-14 Thread Mike Dewhirst
n app myself forever. My 2c Mike On 15/04/2012 1:04am, Hanne Moa wrote: Say that there's an excellent 3rd party app "articles" with a model Article and another most excellent 3rd party app "polls" with a model Poll. How do you glue them together? If an Article may have se

Re: Server push ajax

2012-04-24 Thread Mike Ryan
The vague, open-ended nature of your questions gives me the impression that you are trying to get the group to do most of the hard work for you. Tom's suggestion is right - Pubsub definitely sounds like the way to go for your project. The TCP protocol doesn't make any specific reference to AJAX ei

Re: deploying django - including third party apps

2012-04-26 Thread Mike Ryan
If he can't install virtualenv (permission denied), he will have problems copying his modules to the dist/site-packages dir. Also, this method of manually copying is (no offence meant :-) ) rather hacky, and probably not good advice in most situations. Thomas Rega's suggestion of installing virtual

Re: Django's DecimalField represenation in admin as 0,00 values

2012-05-02 Thread Mike Dewhirst
I would like to hear how it is done. Cheers Mike -- 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 from this group, send email to django-users+uns

Re: Django - Worldwide Developer Rates - Hourly Income - location and project duration specific

2012-05-03 Thread Mike Dewhirst
I don't know what the entry level contracting rate is in Australia but I would guess AUD$4,000 per month pre-tax. Competent developers can usually get $6k to $8k per month or more if they do short term contracting. That is expensive and hurts startups unless sweat-equity is involved. Mik

Re: Easy Blog

2012-05-12 Thread Mike Dewhirst
ost Django apps you will encounter on the web. Good luck Mike On 12/05/2012 4:51am, Kevin Anthony wrote: Hello, I am a student and i have an existing django website that i'd like to add a blog to, what is the simplest way to do this? Also, it would be nice if i could use a standared

sweat-equity

2012-05-14 Thread Mike Dewhirst
if you have a dev team locked in and the project is already kicking goals. Thanks for any feedback. Mike -- 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 unsubs

Re: sweat-equity

2012-05-15 Thread Mike Dewhirst
jurisdiction and choice-of-law clause as well. Right again. I need that for my own agreement so I'll add one. Thanks Marcin Mike On Tue, May 15, 2012 at 1:40 AM, Mike Dewhirst <mailto:mi...@dewhirst.com.au>> wrote: This is off-topic except for people starting un(der

Re: sweat-equity

2012-05-15 Thread Mike Dewhirst
Marcin Some changes to increase coherence and a new Project Bootstrap page to prompt incorporation of the project. https://github.com/mdewhirst/sweat-equity/wiki/_pages I will take it to my lawyer before starting and I'll post the changes then. Thanks Marcin Mike On 15/05/2012 10

Re: Model design question

2012-05-17 Thread Mike Dewhirst
On 18/05/2012 7:02am, oneroler wrote: I'm trying to setup my first app and I'm trying to figure out the best way to have constraints on a particular field (strategy for class Division noted below). Below is the basic model structure. What I would like is for the strategy under a Division to b

Re: Model design question

2012-05-17 Thread Mike Dewhirst
On 18/05/2012 12:25pm, oneroler wrote: Thanks Mike, that is what I was originally planning to do but realized there would be situations where that wouldn't do exactly what I wanted. For example, if there is a business that only has the strategy 'wholesale' assigned, using F

bash error when trying to django_admin.py; not found -- FAQ not helping

2012-05-19 Thread Mike Manfrin
I just installed django 1.4 on my OSX.7 macbook running Python 2.7.1. I installed first via git, and when that didn't work, I downloaded the tar and unzipped/installed 1.4. I am specifically getting the error: -bash: django_admin.py: command not found However, in /usr/local/bin, django_admin.py

Re: bash error when trying to django_admin.py; not found -- FAQ not helping

2012-05-20 Thread Mike Manfrin
Holy moly. Turns out I was typing django_admin.py when I needed to type django- admin.py. I am feeling a terribly strange mix of relief and stupidity right now. On May 20, 3:36 am, Mario Gudelj wrote: > Hey Mike, > > If you go to Python shell and do "import django",

Re: Nested Foreign Key relationships in Admin?

2012-05-20 Thread Mike Dewhirst
https://docs.djangoproject.com/en/dev/ref/contrib/admin/#inlinemodeladmin-objects Mike -- 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 from this group, send email t

Re: Nested Foreign Key relationships in Admin?

2012-05-20 Thread Mike Dewhirst
On 21/05/2012 2:45pm, Mike Dewhirst wrote: On 21/05/2012 1:57pm, Aditya Sriram M wrote: I'd like to represent foreign key relationships inside the Admin interface when there are multiple nested one-to-many relationships. Provided you have the admin app enabled, in your admin.py in the

Re: Nested Foreign Key relationships in Admin?

2012-05-21 Thread Mike Dewhirst
On 21/05/2012 2:55pm, Mike Dewhirst wrote: On 21/05/2012 2:45pm, Mike Dewhirst wrote: On 21/05/2012 1:57pm, Aditya Sriram M wrote: I'd like to represent foreign key relationships inside the Admin interface when there are multiple nested one-to-many relationships. Provided you have the

Re: Django site updater

2012-05-23 Thread Mike Dewhirst
I use buildbot to export the code from svn whenever I commit to trunk. It also performs other related tasks such as deleting the entire site first then running tests, compiling to .pyc, deleting source, chowning and chmoding etc. I really like buildbot because you can add programmed (in Python

Re: Inverting URL security diligence - suggestions?

2012-05-29 Thread Mike Dewhirst
On 30/05/2012 4:25am, phill wrote: I'm interested in inverting the diligence required to lock down URLs for my Django app. That is to say, today we put decorators that are some form of @login_required on view methods that require auth, and no decorators on views that are wide open. I'd like to

Re: Is Django Right for Me?

2012-05-29 Thread Mike Dewhirst
l you have more experience or at least can specify it exactly. It looks like a nice app. Good luck. Mike Just one question - why would django avoid an offline mode - is that a completely unreasonable/undo-able extension? It seems to me that smartphones may eventually take over normal computers

strange ManyToMany field error, only in `manage.py shell`.

2012-06-01 Thread Mike S
Hi guys. This model error is driving me up the wall. All of my debug attempts thus far have been fruitless. I've got a model error that appears whenever I use `manage.py shell`, but not when my code is running in production-- which is making debugging very difficult. Here is the traceback and mode

Re: editable option for model field?

2012-06-04 Thread Mike Dewhirst
On 5/06/2012 10:06am, Roy Smith wrote: The description of editable says: If False, the field will not be editable in the admin or via forms automatically generated from the model class. To me, this sounds like it will be shown in the admin, just not as an editable field (i.e. readonly). How

Re: PyPm / Django 1.4?

2012-06-04 Thread Mike Dewhirst
On 5/06/2012 10:32am, Dennis Lee Bieber wrote: On Mon, 4 Jun 2012 12:41:10 -0700, "Aaron C. de Bruyn" declaimed the following in gmane.comp.python.django.user: What do Windows Django developers use for small local databases? MySQL seems overkill if you're just doing local development on a Win

trailing slash defeats get_absolute_url

2012-06-14 Thread Mike Dewhirst
url in the xitem model is ... def get_absolute_url(self): return 'xitem/%s' % self.id Any guidance will be appreciated. I have studied https://docs.djangoproject.com/en/dev/topics/http/urls/ and experimented with @models.permalink without success. Thanks Mike -- You

Re: trailing slash defeats get_absolute_url

2012-06-15 Thread Mike Dewhirst
patterns('item.views', url(r'^search/$', 'search'), url(r'^search/xitem/(?P\d+)/$', 'display'), url(r'^xitem/(?P\d+)/$', 'display'), ) ... and used $ to enforce the trailing slash everywhere - and it is all wor

Re: trailing slash defeats get_absolute_url

2012-06-15 Thread Mike Dewhirst
Thanks Bruno. I haven't looked closely at that yet. I'll see if i can do some reading this weekend. Cheers Mike Connected by MOTOBLUR™ -Original message- From: bruno desthuilliers To: django-users@googlegroups.com Sent: Fri, 15 Jun 2012, 18:48:24 AEST Subject: Re: trai

Re: upload image

2012-06-16 Thread Mike Dewhirst
On 17/06/2012 5:16am, Satvir Toor wrote: I want to upload a image through django forms.I created a class and that file-upload element is visible into the browser.It makes me enable to choose the file. How to handle that image??? Can anybody explain what would be whole procedure to upload a image

Re: How do I get django working without having to manually run the server?

2012-06-16 Thread Mike Dewhirst
On 17/06/2012 7:30am, Laurence MacNeill wrote: Ok... I'm still learning this stuff here, and I'm confused about one thing... Well, many things, actually, but only one thing that I'll ask about here. During the tutorial I have to type "python manage.py runserver" in order to see my django pa

Re: Django and PHP webhosting in Germany

2012-06-17 Thread Mike Ryan
stions in future? This is nothing personal Steve, I just feel the list is getting cluttered up with questions that are barely relevant to the group, and are easily answerable with some googling. Regards, Mike On Saturday, June 16, 2012 10:24:27 PM UTC+2, sjtirtha wrote: > > Hi, > > can so

Re: change default date format to dd-mm-YYYY

2012-06-25 Thread Mike Dewhirst
15:58' or in a template ... https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date hth Mike thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/d

Re: advantages and disadvantages of Raw sql queries in django

2012-06-29 Thread Mike Dewhirst
I firmly believe in using the ORM for everything until i am forced to use handwritten SQL. The main reason is transparency of intentions when the source is examined by a non-DBA. I want my code to be maintainable by other people and provably correct. I suppose you can unit-test code with

Re: Error in Brand New Django 1.4.1 released Yesterday

2012-07-31 Thread Mike Dewhirst
Yesterday I did ... pip install --upgrade django ... and it happily upgraded mine to 1.4.1 Mike On 1/08/2012 9:46am, Dennis Lee Bieber wrote: On Tue, 31 Jul 2012 16:06:20 -0700 (PDT), JJ Zolper declaimed the following in gmane.comp.python.django.user: Nope. Not Python 1.4. Django 1.4

Re: TinyMCE config

2012-08-01 Thread Mike Dewhirst
x27;^tiny_mce/(?P.*)$', 'django.views.static.serve', {'document_root': tinymcedir}), ) I'm not sure if this is the "right way" to do it but it works for me. Mike PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__)

Re: TinyMCE config

2012-08-01 Thread Mike Dewhirst
On 2/08/2012 1:37pm, Jonathan Baker wrote: Thanks Mike. 'tinymce' is included in INSTALLED_APPS because I'm using the app located here: https://github.com/aljosa/django-tinymce/ . I saw a few comments around the web that suggested that this was the route to go to easily in

Re: Do I understand the support schedule correctly?

2012-08-06 Thread Mike Dewhirst
Russell This might be slightly off-thread. Since 1.5 will be Python 3, would you consider making 1.4 a long-term-support version? I know a couple of large organisations who simply won't consider non-LTS open source kit. Mike On 7/08/2012 10:05am, Russell Keith-Magee wrote: On Sun,

Re: Do I understand the support schedule correctly?

2012-08-06 Thread Mike Dewhirst
On 7/08/2012 11:15am, Russell Keith-Magee wrote: On Tue, Aug 7, 2012 at 8:40 AM, Mike Dewhirst wrote: Russell This might be slightly off-thread. Since 1.5 will be Python 3, would you consider making 1.4 a long-term-support version? Django 1.5 will be the first Django release to officially

splitting models.py

2012-08-08 Thread Mike Dewhirst
love to improve that script so it will work for the other apps. I'll contribute it back if I get it working. Thanks for any help Cheers Mike -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email t

Re: splitting models.py

2012-08-08 Thread Mike Dewhirst
On 8/08/2012 6:10pm, Russell Keith-Magee wrote: On Wed, Aug 8, 2012 at 3:27 PM, Mike Dewhirst wrote: I would like to understand the "formula" for splitting a monolithic models.py into ./models/.py files. Can someone point to somewhere in the docs or source which sets out the logi

Re: Created & updated date/time in models

2012-08-08 Thread Mike Dewhirst
-time formatting in Django templates. Mike cheers L. -- 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 from this group, send email to django-user

script for splitting models.py

2012-08-16 Thread Mike Dewhirst
els.bak to models.py, tweaking the script (or your models.py) then trying again. It is non-destructive. While it works for me, I do not for a moment think it is either bug-free nor efficient nor capable of dealing with models.py files I am unaware of. Hope it helps someone. Cheers Mike -- Yo

Re: script for splitting models.py

2012-08-16 Thread Mike Dewhirst
On 17/08/2012 4:06am, Melvyn Sopacua wrote: On 16-8-2012 11:33, Mike Dewhirst wrote: https://github.com/mdewhirst/split-models Python 2.7 and Django 1.4 One of mine was getting too big and too labour-intensive to debug after a manual split. This was due to accretion of cruft during my

Re: script for splitting models.py

2012-08-16 Thread Mike Dewhirst
On 17/08/2012 9:31am, Mike Dewhirst wrote: On second thoughts, from __future__ import absolute_import is needed for 1.4 but should be removed when upgrading to 1.5. On third thoughts, that should be "when upgrading to Python 3.x" ! Mike -- You received this message becau

Re: script for splitting models.py

2012-08-16 Thread Mike Dewhirst
On 17/08/2012 9:43am, Melvyn Sopacua wrote: On 17-8-2012 1:31, Mike Dewhirst wrote: On 17/08/2012 4:06am, Melvyn Sopacua wrote: On 16-8-2012 11:33, Mike Dewhirst wrote: - Perhaps do the same with editor modelines, like the one you have for emacs. Vi(m)'s start with either vim: vi:

Re: script for splitting models.py

2012-08-16 Thread Mike Dewhirst
On 17/08/2012 9:43am, Melvyn Sopacua wrote: On 17-8-2012 1:31, Mike Dewhirst wrote: On 17/08/2012 4:06am, Melvyn Sopacua wrote: The -*- coding: utf-8 -*- line. Done. It now respects any existing coding in models.py and any existing from __future__ imports. - Same with db_table in the

Re: Layout and global.css files

2012-08-22 Thread Mike Dewhirst
On 23/08/2012 11:41am, Gregory Strydom wrote: Could anyone perhaps tell me where i could find the layout.css and global.css for the base admin site? Ive tried looking through C:/Python26/site-packages/django but cant seem to find anything. What i am trying to do is just change colour where it sa

database error and connection._rollback

2012-08-22 Thread Mike Dewhirst
? Thanks Mike [1] http://stackoverflow.com/questions/7753016/djangopostgres-current-transaction-is-aborted-commands-ignored-until-end-of -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dj

Re: database error and connection._rollback

2012-08-23 Thread Mike Dewhirst
On 23/08/2012 4:27pm, akaariai wrote: On 23 elo, 08:30, Mike Dewhirst wrote: This ... [1] from django.db import connection connection._rollback() ... solved a problem for me in unit testing when I catch a deliberate DatabaseError. Django 1.4 Python 2.7 PostgreSQL 9.1 My question: Is it

Re: Column widths in TabularInline

2012-08-24 Thread Mike Dewhirst
'fields': ( 'field_abc', 'field_xyz', ... and specify myowncssclassname in myextrastyle.css then finally in the template include myextrastyle.css in the extrastyle block hth Mike V. -- You received this message because you are subscr

Re: Column widths in TabularInline

2012-08-26 Thread Mike Dewhirst
On 26/08/2012 6:22pm, Vikas Rawal wrote: > In admin.py you can for example ... > > fieldsets = ( > (None, { > 'classes': ['myowncssclassname',], > 'fields': ( > 'field_abc', > 'field_xyz

Re: Column widths in TabularInline

2012-08-27 Thread Mike Dewhirst
way of using regex or something like that to cover all the above formulations of "id". Ok - I thought you wanted to address each one individually. If you search django snippets for your precise requirements I'm sure something will pop up. I haven't needed to do what you

Re: No ROLLBACK within TestCase on second database

2012-09-04 Thread Mike Dewhirst
ed about this a couple of weeks ago and the correct solution is to use a TransactionTestCase https://groups.google.com/forum/?fromgroups=#!topic/django-users/RxzVIqQINq8 Mike test_member_programme.py -- from datetime import date, timedelta from django.test import

Re: No ROLLBACK within TestCase on second database

2012-09-04 Thread Mike Dewhirst
On 5/09/2012 3:09pm, Kit Randel wrote: On 05/09/12 16:28, Mike Dewhirst wrote: I asked about this a couple of weeks ago and the correct solution is to use a TransactionTestCase Hi Mike, I don't want to be explicitly test transactional behaviour, which I think is the intention b

Re: with/include template pattern? seeking best practices

2012-09-05 Thread Mike S
The code `e.generalov` gave has been valid since Django 2.3: For more complicated context, you can also write an inclusion tag < https://docs.djangoproject.com/en/dev/howto/custom-template-tags/#inclusion-tags> and use that

Re: Test driven development in Django framework

2012-09-05 Thread Mike Dewhirst
On 6/09/2012 3:04am, Javier Guerra Giraldez wrote: On Wed, Sep 5, 2012 at 7:46 AM, jyria wrote: What is your experience? Is it worth it, and is it possible? I tried it and found it quite difficult to follow guideline of unit testing -- testing a unit of code, a class for example. Maybe Im just

Re: how to attach comments to a User instance

2012-09-06 Thread Mike Dewhirst
On 6/09/2012 4:07pm, heni yemun wrote: Hi, I'm having difficulty attaching comments to a User object i created. So walk me through the process of *attaching comments* to *displaying them*. THANK YOU! Difficult to know exactly what you are trying to do from your specification but typically, you

<    3   4   5   6   7   8   9   10   11   12   >