ManytoMany using intermediary table and custom db_table

2008-10-31 Thread Mark
I'm having a little trouble tracking a down a small problem. My models (which are working) look like this (with some of the boilerplate cut out): class Image(models.Model): id = models.AutoField(primary_key=True) pub_date = models.DateTimeField(blank=True) caption = models

Using Content Types With Test Databases

2008-12-14 Thread Mark
Hello, Are there any comments on the issue I describe below? Aside from issue 7052 in the tracker: http://code.djangoproject.com/ticket/7052 I'm a new user of Django so I may be doing something wrong. I hope line wrapping doesn't ruin any code... Thanks Mark Using Content

Django project idea (postfix+proftpd integration)

2008-08-22 Thread mark
ew to Django. But because it sounds like fun I hoping to find people that are interested in teaming up or at least to hear me out on further details. Mark --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django u

Re: Showing staff users from another model

2008-08-24 Thread Mark
I played for a while and this is my result: StaffSeq = tuple((str(i),)*2 for i in \ auth.models.User.objects.filter(is_staff=True)) (..) models.CharField(max_length=30,choices=StaffSeq) Are there better ways to do this? Mark On Sunday 24 August 2008 13:18:42 Mark wrote: > This cl

Showing staff users from another model

2008-08-24 Thread Mark
This class is only for the admin page. In the following model I'd like to make owned_by a dropdown box showing staff users. from django.db import models from django.contrib import admin from django.contrib import auth class Car(models.Model): brand = models.CharField(max_length=20)

Re: Showing staff users from another model

2008-08-24 Thread Mark
> > Are there better ways to do this? > Yes. > owned_by = models.ForeignKey(User, limit_choices_to={ 'is_staff': True > }) > The model documentation covers the 'limit_choices_to' argument, as > well as the proper syntax for setting up foreign keys. I agree, there is plenty of documentation, I

Re: Django new comments framework error

2008-08-28 Thread Mark
rseMatch("Reverse for '%s' not found." % lookup_view) NoReverseMatch: Reverse for '' not found. ---- The code that is causing this... (in a view method for debug purposes...) from django.tem

basic http authentication in API

2008-09-15 Thread mark
Hi All, i'am writing API for a service and i want to use basic http authentication for my service users. is there is something built in django. Please advice --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Djan

Re: Django new comments framework error

2008-09-16 Thread Mark
url(r'^comments/deleted/$', 'moderation.delete_done', name='comments-delete-done'), url(r'^comments/moderate/$', 'moderation.moderation_queue', name='comments-moderation-queue'), url(r'^comments/approve/(\d+)/$', 'modera

Re: Django new comments framework error

2008-09-17 Thread Mark
On Sep 17, 7:01 am, Jarek Zgoda <[EMAIL PROTECTED]> wrote: > Wiadomość napisana w dniu 2008-09-16, o godz. 19:31, przez Mark: > > > I tried everything: > > - Deleted django/contrib/comments*.pyc files (a number of times) > > - updated to svn latest (a numbe

model filed with default type set in database

2009-03-24 Thread mark
im a newbie to django. i have an existing database with default values for field set in the database: for example: created timestamp without time zone DEFAULT now(), number_polls integer DEFAULT 0, i want to use django admin interface to manage tables. how do i set up these fields in models

Re: Simple Pagination Problem

2009-07-29 Thread Mark
Thanks, but I have been. Its still not clear - To date I have always been displaying "Page 1 of 23. Showing 10 results per page" I am just lost on how to do this. On Jul 29, 3:44 pm, krylatij wrote: > Read > documentationhttp://www.djangoproject.com/documentation/models/pagination/ --~--~

Re: Simple Pagination Problem

2009-07-29 Thread Mark
These seem to be what I am looking for - but they are not available in the template from what I see. page2.start_index() page2.end_index() On Jul 29, 3:51 pm, Mark wrote: > Thanks, but I have been. Its still not clear - To date I have always > beendisplaying > > "Page

Re: Simple Pagination Problem

2009-07-29 Thread Mark
; > Then in your template you can say: > > Displayingresults{{ first_item }} - {{ last_item }} of {{ p.count }} > found. > > On Jul 29, 3:51 pm, Mark wrote: > > > Thanks, but I have been. Its still not clear - To date I have always > > beendisplaying > > >

Re: model filed with default type set in database

2009-03-25 Thread mark
so its not possible to model this in django? > created timestamp without time zone DEFAULT now(), > number_polls integer DEFAULT 0, thanks! On Tue, Mar 24, 2009 at 8:22 AM, mark wrote: > im a newbie to django. i have an existing database with default values > for field set in

Timer in Django

2009-12-03 Thread Mark
hon Timer objects of the fly, but about 30% of the time, I get a "key error" when it's time to cancel the Timer. Please. Could someone give me an idea on the proper way to do this in Django? Thanks very much! Mark -- You received this message because you are subscribed to the Googl

Re: DKIM Email

2010-05-19 Thread Mark
On Apr 22, 4:16 am, Simon Meers wrote: > For anyone else who learned about DKIM recently [1], I've uploaded a > snippet for a DKIM-signing email backend [2]. Brilliant. I'm just developing a Django app, had read the CH article and was just about to figure out how to apply it to my project - but y

Custom Feeds

2010-02-09 Thread Mark
There are a couple threads about creating custom syndication feeds, but none ever seem to arrive at an answer. Has anyone figured out how to add custom item elements to a feed? The example in the django docs shows very clearly how to add hard-coded attributes to the root, but avoids offering an ex

import csv

2010-03-19 Thread Mark
how to get csv import working (as easy as possible) for a newbie, I'd really appreciate it. Thanks! Mark -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscri

Re: import csv

2010-03-20 Thread Mark
I got it to work by just using the (already) imported django.contrib.admin BatchModelAdmin now becomes admin.ModelAdmin http://code.google.com/p/django-batchimport/issues/detail?id=4 On Mar 19, 1:22 pm, Mark wrote: > Hello, > I'm having some trouble putting together a form for batc

soliciting interest in a medical open source project to save the world

2010-03-29 Thread Mark
OK, maybe it won't save the world. My name is Mark Morgan and I'm working on a project which might be of interest to some of you. I'm a family doctor in Minnesota and I'm associated with a really, really big clinic in Minnesota as well as the US Indian Health Service. Ne

little problem with the django template language

2008-06-19 Thread mark
ecute the if block. I experimented with 'item|slice[:]' but I could not find out how to determin the position (index) of the second '/'. Please note I am a beginner in Django and I should probably know how to solve this but obviously I do not :-(( Best Regards, Mark --~--~

Re: little problem with the django template language

2008-06-20 Thread mark
I guess it was a little confusing how I formulated my problem. I just try again. Sorry for that. In Python what I want to do would look like the following: item1 = '/test/something/' item2 = '/test/somethingelse/' if item2.startswith(item1): do_the_trick() Now since Django has thi

Mako templates with flatpages

2008-06-20 Thread mark
change the views. Most of the website is flatpages. Is there a way to use Mako templates with flatpages without changing the Django source (flatpage views). I want to have the Django framework untouched and all the configurations, code etc. within my project folder. Is this possible? Regards, Mark

flatpage for 404

2008-06-21 Thread mark
'/404/' flatpage which I created. Unfortunately I did not find out how to configure this behaviour. I would like the configuration within my project folder and not patch my Django installation. Best Regards, Mark --~--~-~--~~~---~--~~ You received this messa

Re: flatpage for 404

2008-06-21 Thread mark
404 = 'django.views.defaults.page_not_found' handler404 = 'django.contrib.flatpages.flatpage:404' Unfortunately django does not even notice this configuration. Regards, Mark --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: flatpage for 404

2008-06-21 Thread mark
g. http://localhost:8080/crap/ Django comes up with the /404/ page but the browser shows the 'http://localhost:8080/crap/' url. Cheets, Mark --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users&qu

partial table query

2007-12-21 Thread mark
from a specific table and a specific filed. Thanks -Mark --~--~-~--~~~---~--~~ 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

Debugging automatic related database fetches

2011-02-17 Thread Mark
unsolved. I've tried to find a suitable location in the django code to raise an exception in this scenario, making the tracking much easier, but tend to get lost in the code. Is anyone able to point me in the right direction for a suitable location for this? Thanks, Mark. -- You received this

Re: wsgi configuration

2011-04-05 Thread Mark
. Django puts some paths in it that Python doesn't yet have using WSGI. Your situation is a little complicated as I am just getting into Django, but I figured I'd share this document if it may help. Good luck, Mark On Apr 5, 12:46 pm, yongzhen zhang <4...@live.cn> wrote: > Hi,

Storing data before committing to data base, wait for approval of admin

2016-05-04 Thread Mark
I'm building a mobile app using Ionic framework, so the front end is essentially a single page AngularJS app. I'm using Django Rest framework as the backend. In the application, an employee should be able to suggest updates, deletes, or additions to database models. In my schema, there is a "

Modify image before it's handled by stdimage

2015-09-25 Thread Mark
I'm using django-stdimage for creating variations of the image. class Photo(models.Model): photo = StdImageField(upload_to='photos', verbose_name=_("photo"), variations={'large': (600, 600), 'thumbnail': (100, 100)} StdImageField does it's own operations on the image

Conditional annotation super slow

2016-01-06 Thread Mark
I'm using django's (1.8.5) conditional annotation in order to add filtered data to each object dynamically. But the issue is that it's very slow on all machines I've tested it. What it does is basically adds data to each user. How many messages they sent from provided date, how many messages

Re: Conditional annotation super slow

2016-01-06 Thread Mark
I've run query manually removing all fields from GROUP BY that are not related to aggregation and query runs fast. But how to do the same in Django? How to remove unrelated fields to the aggregation from GROUP BY clause? -- You received this message because you are subscribed to the Google Gro

inspect a model's field's option's values

2008-10-30 Thread Mark Wolgemuth
It seems like I'm missing something, but here's what I'm trying to do: In creating a Form object, I'm setting size limit validation (max_length). I'd like to recover the value for that from the corresponding Model's Field's max_length. So basically I want a symbol lookup that will inspect in the

Re: inspect a model's field's option's values

2008-10-31 Thread Mark Wolgemuth
name) possibly with the default thing also. On Oct 30, 12:18 pm, bruno desthuilliers <[EMAIL PROTECTED]> wrote: > On 30 oct, 14:26, Mark Wolgemuth <[EMAIL PROTECTED]> wrote: > > > > > It seems like I'm missing something, but here's what I'm trying to

HBase and Django

2008-12-28 Thread Mark Jarecki
Hi, I was wondering whether anyone has made any headway into getting HBase working with Django? I think the existence of such an option would be definite boon to the framework. Cheers Mark --~--~-~--~~~---~--~~ You received this message because you are

Could someone help me understand the finer points of import

2009-01-04 Thread Mark Jones
For the discussion below, ALL the code is in .../intomec/tenq I wrote some code in tests.py like so: from tenq.models import * self.expectedValue = Answers((1,2,3,4)) within the to_python() method of AnswersField in models.py: def to_python(self, _value): print "_value.__

Re: Redirect parent from within iframe without losing session

2009-01-04 Thread Mark Jones
are you redirecting to the same port? I think redirection to a different domain OR port would keep the cookie from getting back to the server, thus killing your session. On Jan 3, 10:33 am, Berco Beute wrote: > My page shows a (logged in) user an iFrame but when the iframe > redirects the brows

Re: Do sth on time ?

2009-01-04 Thread Mark Jones
You need a process running outside the bounds of the webserver that reads the database every so often, and then sleeps with a wakeup every so often, and a list of when things "expire". It updates the database, the webpage reflects the update. You could of course do this via a wget driven by cron

Re: File Download

2009-01-04 Thread Mark Jones
Are you trying to get your source code off a server, and instead find it being executed by the webserver? If you have shell access, tar the files up and download that, create a folder where the files aren't executable and download them that way. If it is your source, I would assume you have

Re: I would like to report a bug but I can't log in

2009-01-04 Thread Mark Jones
Well, I think we can all see where you get your nickname. On Jan 4, 12:03 am, Friendless wrote: > On Jan 4, 2:42 pm, "Karen Tracey" wrote: > > > I'll admit your tone here is starting to make me lose interest in your > > problem report. > > Admit it, you weren't very interested in the first pla

Re: to understand MEDIA_URL

2009-01-05 Thread Mark Jones
Are you closing the file after you write to it and before you try to send it? Why do you have to write it to a file to deliver it as a static file, why not just render it to a response directly? On Jan 5, 4:13 am, Alan wrote: > Hi List, > Because I couldn't find any idea better I am using "MEDI

NewBie Question about ForeignKey relationships

2009-01-07 Thread Mark Jones
Ok, here is some simple code: class Maker(models.Model): name = CharField(max_length=20) class Auto(models.Model): name = CharField(max_length) maker = ForeignKey(Maker) maker = Maker.objects.get(pk=1) How do I get all the Autos made by this maker I don't see a maker.autos (rails

Re: NewBie Question about ForeignKey relationships

2009-01-07 Thread Mark Jones
Thanks for the pointer, I had read all around that. The short version is: maker.auto_set.all() There was was Dry(er) more elegant method to be found. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Putting pieces back together again

2009-01-11 Thread Mark Jones
I have some fields on my page that have more than one attribute for simplification, lets say two attributes answer = {'txt':'something', 'allowblank':0} laid out on the page as: {% for answer in quiz_question.answers %} {% endfor %} the first is pulled from an input field, and if !allowbl

Re: Putting pieces back together again

2009-01-13 Thread Mark Jones
Thanks, formsets was the answers, and smartly enough, they didn't name all the fields the exact same name, but reassemble them afterwards. On Jan 12, 9:04 am, Jeff FW wrote: > Mark, > > You should really use Forms and FormSets--they'll make this problem > essenti

Forcing content_types.json to be loaded before any other fixtures

2009-01-13 Thread Giovannetti, Mark
sible? Thanks Mark --~--~-~--~~~---~--~~ 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

Re: Django on OS X Leopard - apache only forwards to mod_python on localhost

2008-07-22 Thread Mark Phillips
_install_Django_on_SME_Server > hth, Mark Phillips Mophilly, technology for creative business On the web at http://www.mophilly.com On the phone at 619 444-9210 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Group

Re: Recommendations for local web dev on Mac OS X 10.5 vs. developing against WebFaction Linux box

2008-09-15 Thread Mark Phillips
u can pick them up quickly. For postsgres, which is a new addition for me, I am looking at DB Visualizer and Oracle's SQL Developer. hth, - Mark Phillips --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups &

Strange Model behavior

2009-01-25 Thread Mark Jones
Sample.py includes the following: == from django.db import models class Good(models.Model): code = models.CharField(max_length=64) quizid = models.IntegerField(null=False, blank=False) published_on = models.DateTimeField(auto_now_add=True) class Fails(

Re: Strange Model behavior

2009-01-26 Thread Mark Jones
I guess I was just too tired when I wrote it, I just forgot the * and ** on the 2 arguments. I have some initialization that I'm doing in __init__ but had removed that to make the example shorter and was still seeing the problem. Thanks for the help, those 3 *'s fixed the whole problem On Jan

Re: changing form field rendering dependent on field type

2009-01-26 Thread Mark Jones
That almost sounds like you will have to write the renderer for that class. I don't think this will be easy to do in the template, but if you override django.forms.widgets.Select.render. you can probably make it work. On Jan 26, 11:51 am, mattsouth wrote: > I wish to customise a form template s

Re: Changing database fields

2009-01-28 Thread Mark Jones
This is where Rails rocks and DJango doesn't. I haven't been able to find any kind of DB Migrations in Django like those in Rails. Sad too, because other than that, Python is a lot nicer than Ruby (Syntax wise for an old C++ programmer) On Jan 28, 3:29 pm, Oleg Oltar wrote: > Hi! > I am creati

can't clear form data in runserver (works in shell)

2009-02-02 Thread Mark Jones
I have a form that is working well. However I want to allow them to reuse the form multiple times. Each time they submit the form, I will send up to 6 emails. Then, if an email is sent successfully, I want to remove that email address from the form that I present to them. If the email isn't su

Re: can't clear form data in runserver (works in shell)

2009-02-03 Thread Mark Jones
e line added to clearsent: self.data._mutable=True # this doesn't seem right, but what the heck its 1am On Feb 3, 1:21 am, Malcolm Tredinnick wrote: > On Mon, 2009-02-02 at 23:05 -0800, Mark Jones wrote: > > I have a form that is working well.  However I want to allow them t

creating links from inline within admin

2009-02-16 Thread Mark (Nosrednakram)
template by can't find a way to do it: {{ person.first_name}} Any help appreciated, I have searched the archives an am not finding anything with the terms I am using. I am no afraid to extend classes is someone can advise me on where I might start on this. Thank you,

Re: checkboxInput values

2009-02-18 Thread Mark Jones
and you do that like so: answer0 = forms.IntegerField(label='', widget=forms.CheckboxInput (attrs={'value':0})) for the next bloke that doesn't want to have to figure it out. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goo

CheckboxInput widget has a flaw when used with an IntegerField

2009-02-19 Thread Mark Jones
forms.IntegerField(widget=forms.CheckboxInput(attrs={'value':1}), required=False) won't work because def value_from_datadict(self, data, files, name): if name not in data: # A missing value means False because HTML form submission does not # send results for u

Re: CheckboxInput widget has a flaw when used with an IntegerField

2009-02-19 Thread Mark Jones
11:56 AM, Mark Jones wrote: > > > forms.IntegerField(widget=forms.CheckboxInput(attrs={'value':1}), > > required=False) > > > won't work because > > >    def value_from_datadict(self, data, files, name): > >        if name not in data: >

Re: Is safe unsafe?

2009-02-23 Thread Mark Jones
Kind of sucks that you are worried about your server, but not worried about the people that might use your site. I'd answer your question regarding JS except for the fact I think the server and the clients should be safe for the general public, and I don't want to make it that easy on you. Allow

Not understand help_text

2009-02-23 Thread Mark Jones
When a model field has help_text, that text will be show in the form. I'm a little bothered by this because effectively the model is doing something that really belongs in the view, but I understand the point is to make it easy to create forms based on a model and I can just live with it. What bo

Re: Not understand help_text

2009-02-23 Thread Mark Jones
That is exactly the kind of WET I was talking about. as_p() with appropriate CSS styling will render really nice forms as is, with the exception of the help_text. I even think that could be fixed without any major rework, just a change in the as_p() string from def as_p(self): "Ret

Re: Not understand help_text

2009-02-24 Thread Mark Jones
I occurred to me last night right before sleep that I can patch this in my code by deriving all my forms from my MyForm, fixing it in one place and remaining DRY. Nice to see I'm not the only one that found this to be a bit strange. --~--~-~--~~~---~--~~ You rece

Re: Django App build - the right process?

2009-02-24 Thread Mark Jones
The first 2 saves are overly complex: def save(self): if self.unit_price and not self.price_discount == '0': adjust = float(self.price_discount / 100.0) val_result = str(adjust) discount = Decimal(self.unit_price - (Decimal(val_result) * self.unit_price)) self.product_

Re: Securely storing passwords

2009-02-24 Thread Mark Jones
How about integrating with something like OpenID? Not sure if it would do the trick, but it might be a step in the right direction, assuming the sites you are interoperating with are 'friendly' On Feb 24, 5:49 am, LaundroMat wrote: > Hi - > > I'm working on a small django app that allows users

Re: How can one template extend multiple templates?

2009-02-24 Thread Mark Jones
It seems like maybe I don't understand the question but it will extend an infinite number of templates Just add {% extends "base.html" %} into every template you want to extend. You can even do {% extends "derived.html" %} which extends base.html On Feb 24, 8:41 am, lzhshen wrote: > Suppose I

Permission model's CharField fields, name and codename, too short

2009-03-19 Thread Giovannetti, Mark
es/django/db/models/query.py", line 1033, in insert_query return query.execute_sql(return_id) File "/usr/local/lib/python2.5/site-packages/django/db/models/sql/subqueries. py", line 317, in execute_sql cursor = super(InsertQuery, self).execute_sql(None) File "/usr/loc

RE: Permission model's CharField fields, name and codename, too short

2009-03-20 Thread Giovannetti, Mark
> codename, too short > > > On Thu, 2009-03-19 at 21:58 -0400, Giovannetti, Mark wrote: > > Hi Everyone, > > > > Has anyone else run across this? I tried to enter it as > > a ticket at: > > > > http://code.djangoproject.com/simpleticket > >

Trying to understand Django and Python from a C++ perspective

2009-06-29 Thread Mark Jones
I can't seem to reason out why/how this works. I have a class Named Stuff I can say Stuff.objects.filter(.) and that will return valid set of data. What I can't understand is what exactly is objects, and why is it I can call it with Stuff.objects, but I can't call it with stuff.objects (an

Re: Trying to understand Django and Python from a C++ perspective

2009-06-29 Thread Mark Jones
Yea, I'm not wanting to use stuff.objects, but I'm wanting to pull some of the same voodoo, probably not safe for a python novice like myself :-) On Jun 29, 5:24 pm, Alex Gaynor wrote: > On Mon, Jun 29, 2009 at 5:19 PM, Mark Jones wrote: > > > I can't seem to re

Django Filter parser slightly less than intuitive

2009-08-12 Thread Mark Jones
{{ datevar|date: dateformat}} won't parse. You get the error: Could not parse the remainder: ': dateformat' from 'datevar|date: dateformat' Turns out that unlike most other places, spaces ARE significant here. It could be fixed by changing the filter_raw_string on line 448 of django/template/__

Admin Panel: Restrict ForeignKey selections via permissions

2009-08-12 Thread Mark Stahler
Can someone point me in the direction to best solve this problem. It would easier to show you: class Profile(models.Model): status = models.ForeignKey(Status) ... class Status(models.Model): status_name = models.CharField(max_length=50) ... I need to be able to restrict the se

Single Django Project, Multiple Apache Subdomains

2009-08-24 Thread Mark Stahler
I am using Nginx as a front end web server redirecting Python requests to Apache + mod_wsgi. Everything with that is working fine. I have one Django project running and I want to setup subdomains for a few of my project apps. Proposed structure: /www/project/ - -->/admin/ - admin.domain.com --

Advice on Subclassing a TextField

2009-08-29 Thread Mark Anderson
and any points on would be great. I would like modelform to set the class to rte and adjust rows/cols without me having to specify a widget. Thank you, Mark class HtmlWidget(Textarea): def __init__(self, attrs=None): super(HtmlWidget, self).__init__(attrs) def render(self, name

Re: Advice on Subclassing a TextField

2009-08-30 Thread Mark (Nosrednakram)
input. Mark On Aug 30, 8:03 am, Alex Robbins wrote: > Also, maybe you aren't submitting all the code, but you could do the > same thing by just passing an attrs dictionary to the text area > widget.http://docs.djangoproject.com/en/dev/ref/forms/widgets/#django.forms > Not sure that

Using cmemcache - not a good idea?

2009-09-01 Thread Ryan Mark
not also been monitoring memcached while load testing. Anybody have anything to add to this? Ryan Mark -- Ryan Mark http://ryan-mark.com 847 691 8271 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: [Solved] Re: Make dev server respond on multiple IPs?

2009-09-01 Thread Ryan Mark
I've got some screwy DNS stuff going on on my local machine and need >> the development server to respond to requests on two IP addresses at >> once (127.0.0.1 and 192.168.1.7).  Is there any way to wrangle that? >> >> Thanks! > &

Re: Incompatibility with FreeTDS/ODBC and Unicode on a MSSQL server?

2009-03-31 Thread Mark Shewfelt
ot figure out how to specify their location when building pyodbc. Did you have this issue? Any help is welcome! Thanks, Mark On Feb 25, 5:19 pm, kgingeri wrote: > Ok, I figured this out myself... > > I had to un-install all pre-installed odbc stuff - unixODBC (possibly > iODBC a

Re: Incompatibility with FreeTDS/ODBC and Unicode on a MSSQL server?

2009-04-01 Thread Mark Shewfelt
Thanks Karl - Actually, this morning I gave up and upgraded Ubuntu to 8.10, which uses a newer version of FreeTDS and unixODBC. It seems to work OK, though there are some funky Unicode issues using Django's TextField, but I can get around those for now. Cheers, Mark On Mar 31, 8:41 pm,

Re: Overwrite send_mail

2009-05-10 Thread mark hellewell
ler app if it's available if 'mailer' in settings.INSTALLED_APPS: from mailer import send_mail else: from django.core.mail import send_mail django-mailer recently moved to GitHub: http://github.com/jtauber/django-mailer/tree/master Should be all there is to it! mark 2009/5/10 D

Multiple decorator and maybe caching, not sure

2009-05-21 Thread mark hellewell
ery (no matter which decorator it's obtained from)? All I'm usually doing it a .get(id=123) to get an object to work on and it feels wasteful. Is some form of middleware to cache db queries the "done thing" here? Not sure wh

Re: Multiple decorator and maybe caching, not sure

2009-05-21 Thread mark hellewell
he.set(obj_key, obj) > return obj > It's really that straight-forward, what a nice surprise! Thanks, Mark > -- > Artificial intelligence stands no chance against natural stupidity > > Jarek Zgoda, R&D, Redefine > jarek.zg...@redefine.pl > > > > >

Re: Couple of basic Django questions

2009-09-12 Thread Mark Freeman
Dan, this link helped me a lot for using my stylesheet and images on the test server. http://docs.djangoproject.com/en/dev/howto/static-files/ Mark --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: Editors of choice

2009-09-12 Thread Mark Freeman
Mostly Netbeans for me, however I do tend to use VIM quite a bit. --~--~-~--~~~---~--~~ 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 unsubscrib

Subclassing Field to Define Default Widgets

2009-09-14 Thread Mark (Nosrednakram)
bclasses TextField. I use a RTEditor for HTMLField and use them in a lot of places but in reality it's a TextField with a custom widget. Should I be doing this in the forms instead of the models? Is this a poor way to design things? Is creating default presentation behaviors for fi

Re: urls.py

2009-09-14 Thread Mark (Nosrednakram)
go.views.static.serve', {'document_root': '/home/ramanathan/media'}), This will require you to prepend media to your URL for media requests. This way django know the /media/path passed as to the static server where path can be anything. Hope this helps, Mark --~--~--

Re: Deploying with Apache: confused by odd PythonPath requirement

2009-09-14 Thread Mark (Nosrednakram)
bancgi-prod'] + sys.path" SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE settings SetEnv PYTHON_EGG_CACHE "/tmp" PythonOption django.root /bancgi-prod PythonDebug Off Options FollowSymLinks Hope

Re: How to organize django projects on a productive server?

2009-09-16 Thread Mark (Nosrednakram)
s all that it generally take to get an application up and running with a branded look and feel :). Sorry for the long answer, hope it's helpful. Mark On Sep 15, 1:28 pm, orschiro wrote: > Hello guys, > > first, I know it is not that important how to do this but as I'm > pret

Re: Reading text files into mysql database

2009-10-01 Thread Mark (Nosrednakram)
/snippets/1697/ is one such snippet. You can also use the manager to import/export data is several formats see http://docs.djangoproject.com/en/dev/ref/django-admin/#loaddata-fixture-fixture. Just a few links to get you started. Good Luck, Mark On Oct 1, 7:25 am, Carlos Gustavo wrote: > Hi All, &g

Re: ORM

2009-10-08 Thread Mark (Nosrednakram)
s very important you'll need to come up with a single unique identifier for each row which can be a concatenated string etc. If you are using oracle you can use rownum see notes at . Can you explain the your purpose that requires you to create views and triggers.

Re: Overriding the default field types

2009-10-08 Thread Mark (Nosrednakram)
class Meta: model = Per excluse = ('dri') Hope this Helps, Mark --~--~-~--~~~---~--~~ 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@go

lighttpd and admin

2009-10-14 Thread Mark (Nosrednakram)
media($|/)" { dir-listing.activate = "enable" } $HTTP["host"] == "[HOSTNAME]" { url.redirect = ( "^/(.*)" => "http://[SERVER]/$1"; ) } $HTTP["host"] == "[SERVER]" { fastcgi.server = ( "/mysite.fcgi" => (

Re: lighttpd and admin

2009-10-14 Thread Mark (Nosrednakram)
ve that a try and see if {% url %} et al are still working > > On Oct 14, 11:22 am, "Mark (Nosrednakram)" > wrote: > > > Hello All, > > > I setup lighttpd and fastcgi the other day and everything seemed good > > until I tried to log into admin.  It posts to

Advice on checking optionally installed applications/features

2009-10-23 Thread Mark (Nosrednakram)
en(settings.CACHE_BACKEND) > 0: _USE_CACHE=True except: _USE_CACHE=False Thank you, Mark --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send ema

Re: Advice on checking optionally installed applications/features

2009-10-24 Thread Mark (Nosrednakram)
except: pass def using_cache(): if len(getattr(settings,'CACHE_BACKEND',0)) > 0: return True else: return False This really helped clean up my code! Thank Again, Mark On Oct 23, 9:43 pm, Ethan Jucovy wrote: > On Fri, Oct 23, 2009 at 1:09 PM, Ma

Re: inspectdb Oracle

2009-10-26 Thread Mark (Nosrednakram)
: http://projects.django-development.info/trac/dd_dd/wiki/Creating_Django_Views_of_Tables Great call on overriding save/delete I'll add to my notes and start doing that as well since I wasn't. Mark --~--~-~--~~~---~--~~ You received this message because you

Re: If your on Dreamhost, vote for Django support

2009-10-28 Thread Mark Stahler
Good Luck. I have a Dreamhost account for my blog (Tried a dreamhost vps for a week and a half) and now I have a Linode slice for my Django/ Rails stuff. Quasi-democratic system as in you have the illusion of some kind of voice. On Oct 28, 1:17 am, Richard Jeong wrote: > Thanks to Daniels help,

Re: Form that updates a list of items?

2009-11-02 Thread Mark (Nosrednakram)
.POST). This is just a thought and I haven't done it but is what I'd try before making it complex with loops etc.. Mark --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

model-validation: Excessive (and weird) queries during validation

2009-11-02 Thread Mark L.
As the subject states, I am using the model-validation branch at the moment, which allows me to do, well, validation in the models. I've however, noticed a very strange behaviour of the validation logic, - any time the clean() method is fired on the "materialized" (saved or retrieved from the da

  1   2   3   4   5   6   >