Django Learning project - Higher / Lower game --> Looking for paid tutoring

2019-03-04 Thread Doug Arnold
which I could advertise for a tutor to assist me in the project and helping to develop the Django app? I'd be looking at 4-5 hour long sessions over Zoom during a month or so. Cheers Doug -- You received this message because you are subscribed to the Google Groups "Django users&q

Re: New project in virtual env referencing another project's default/redirected path

2018-01-21 Thread Doug Nintzel
Ok, makes sense. Thank you very much for the details Daniel. Doug On Sunday, January 21, 2018 at 1:02:33 PM UTC-7, Daniel Hepper wrote: > > Yes, kind of. There are two kinds of redirects, temporary and permanent > redirects. By default Django's redirect() method returns a temporary &

Re: New project in virtual env referencing another project's default/redirected path

2018-01-21 Thread Doug Nintzel
That got it Daniel...thanks for the quick help. Was it " permanent=True" in particular that was the problem? Thanks again, Doug On Sunday, January 21, 2018 at 10:29:33 AM UTC-7, Daniel Hepper wrote: > > I realized that the Mozilla tutorial is a wiki, so I took the libe

New project in virtual env referencing another project's default/redirected path

2018-01-21 Thread Doug Nintzel
ould Django need to be installed on each virtual environment (if you don't have it installed globally?). I am actually a little surprised that Django commands executed in the new project before I installed it in that VE. Thanks in advance, Doug -- You received this message because you are subsc

Re: Breaking internal app out into reusable app, migration question

2016-06-16 Thread Doug Donaldson
in the django_migrations table I made earlier in the sequence of migrations won't affect the decision to run the migrations as that decision has already been made earlier in plan creation. On Thursday, June 16, 2016 at 4:06:39 AM UTC-7, Doug Donaldson wrote: > > I have a website with a

Breaking out internal app into reusable app, migration question

2016-06-16 Thread Doug Donaldson
of the RunSQL migrations. Should I expect the migration for to see it doesn't need to run because django_migrations was updated one step earlier which should now say has already run 0001_initial? Doug -- You received this message because you are subscribed to the Google Groups "Django users

Breaking internal app out into reusable app, migration question

2016-06-16 Thread Doug Donaldson
rations. Should I expect the migration for to see it doesn't need to run because django_migrations was updated one step earlier which should now say has already run 0001_initial? Doug -- You received this message because you are subscribed to the Google Groups "Django users" gr

Re: Turn off migrations completely in Django 1.7

2015-11-20 Thread doug
[3] https://groups.google.com/d/optout Please forgive this simple question . How can I change the email address associated with this group ? I want to keep getting the emails but to a different address. Thanks doug -- You received this message because you are subscribed to the Google Groups "Djang

Re: Switching settings, in a non-webapp?

2015-05-11 Thread Doug Blank
;> database.dji.Person.all().count() 0 >>> checkpoint.reset() >>> from gramps.webapp.databases.database1 import database >>> database.dji.Person.all().count() 4 (showing the different counts in two different Django databases, defined in different settings.py). Code is below. -Doug # modules_che

Re: Switching settings, in a non-webapp?

2015-05-11 Thread Doug Blank
thon is involved. I need to reset the Django initialization in a Python session. -Doug > > David > > > Am 11.05.2015 um 18:17 schrieb Doug Blank: > > Django users, > > We are using Django for two purposes: its ORM for a single-user desktop > app, and for a regular D

Switching settings, in a non-webapp?

2015-05-11 Thread Doug Blank
everything, and load different default settings. Looking for something like unloading/reloading all of the relevant sys.modules. We're using python3 if that matters. Thanks for any suggestions/pointers! -Doug -- You received this message because you are subscribed to the Google Groups "Django

Re: Angular and Django

2014-06-22 Thread Doug Snyder
Angular directives and binding are actually more powerful than Django's templating! On Sun, Jun 22, 2014 at 11:29 AM, Doug Snyder <webcoach...@gmail.com> wrote: > compared to other js webapp solutions like Ember or Knockout, > Angular is more powerful but maybe a steaper le

Re: Angular and Django

2014-06-22 Thread Doug Snyder
folks aren't afraid of getting into the pudding. As people write more and more reuseable directives to share around, its going to become more and more powerful. On Sun, Jun 22, 2014 at 11:25 AM, Doug Snyder <webcoach...@gmail.com> wrote: > be sure to check out: django-angular > &l

Re: Angular and Django

2014-06-22 Thread Doug Snyder
coops of webdev icecream with sparkles. Hope you enjoy. Doug On Sun, Jun 22, 2014 at 8:43 AM, Glen Jungels <glenjung...@gmail.com> wrote: > When I am finally able to get django to work, I plan on doing this. I > think the client side processing of Angular will be a nice complement to > Djan

Re: DB Router not working on production machine, works on dev.

2014-06-03 Thread Doug Ballance
The problem turned out to be an bug with an custom manager class based on djorm_pgfulltext search mixin. I'd found an issue with it last week, and patched in the development environment but forgotten to patch the other machine. -- You received this message because you are subscribed to the

DB Router not working on production machine, works on dev.

2014-06-03 Thread Doug Ballance
I've got a weird one I just can't figure out. I'd love some help while I'm still sane. On my development machine all is well. On the other machine the database router seems to be getting the parent class (which is an abstract model in another app). I determined this with some print

Django 1.6 and Multiprocessing

2014-04-08 Thread Doug Gargin
I've been upgrading some Django apps from Django 1.5 to 1.6, and am using Python 2.7.5. One of the apps is a stand-alone app that uses the Django ORM to access a couple of MySQL databases. When it starts up this app spawns some worker tasks via Python's multiprocessing module. These workers

Re: Do I need an API?

2014-02-04 Thread Doug Ballance
I'm not clear on your question. I can't tell if you are wanting to allow them to edit the site layout (templates) or content that happens to contain html? Either way, you might look into using the Ace javascript based code editor http://ace.c9.io/ If you are talking about letting them modify

Re: Honest feedback

2014-01-30 Thread Doug Ballance
There have been small, well thought out changes over the last 4 years but fundamentally most still remains pretty much the same. I have several installs running an patched old .96 version, as well as newer stuff with later versions. It all feels about the same to work with. I recently

Re: Error related to googlebot?

2014-01-25 Thread Doug
Also, if I spoof the user agent (using a chrome plugin), I don't get the error. On Monday, July 12, 2010 2:10:49 PM UTC-4, Tor Nordam wrote: > > I'm currently writing a blog framework in django, and I have it up an > running (on www.presskanne.com). During the last 20 hours or so, I > have

Re: Error related to googlebot?

2014-01-25 Thread Doug
Here's an example stack trace: Traceback (most recent call last): File "/home/possiblecity/.virtualenvs/prod/lib/python2. 7/site-packages/django/core/handlers/base.py", line 103, in get_response resolver_match = resolver.resolve(request.path_info) File

Re: Error related to googlebot?

2014-01-25 Thread Doug
Thanks for the response. I'm not doing any user agent sniffing, and I don't have a robots.txt. On Monday, July 12, 2010 2:10:49 PM UTC-4, Tor Nordam wrote: > > I'm currently writing a blog framework in django, and I have it up an > running (on www.presskanne.com). During the last 20 hours or

Re: Error related to googlebot?

2014-01-24 Thread Doug
I am having this same exact problem. Did you ever find a resolution? Thanks. Doug On Monday, July 12, 2010 2:10:49 PM UTC-4, Tor Nordam wrote: > > I'm currently writing a blog framework in django, and I have it up an > running (on www.presskanne.com). During the last 20 hours or so,

Re: Need Direction for Web App

2013-12-25 Thread Doug Ballance
I was waiting on Christmas dinner, and had an hour to kill so I threw together a quick, incomplete skeleton app. Maybe it can be of use to get you started on the django side. It relies on the django-macaddress package, but is otherwise standalone. It's very basic - the less there is of

Re: Need some advise on how to use a RESTful API

2013-12-20 Thread Doug Blank
()) response = HttpResponse(content, mimetype="application/json") return response The 'if "format"' handles the different formats. Hope that helps (or someone can point us both in a better direction). -Doug > -- > You received this message becau

Re: Trying to run jobs in the background using multiprocessing

2013-11-27 Thread Doug Blank
ferenceSeparator, MutationSeparator)) I suspect that if you are setting the target to be self.Run, then the args should not include self: Thread = multiprocessing.Process(target = self.Run, args=(ReferenceSeparator, MutationSeparator)) -Doug >print 2 >Thread.daemon = True >

Re: Psycopg2 on Mac OS X (Snow Leopard)

2013-10-27 Thread Doug Snyder
and headaches is that Mavericks, the new OSX release may still be free for download. They announced it was free but the way they worded it made it sound like it may have only been free for the day it came out. Not sure if that's a road you want to go down or not. Good Luck, Doug On Sun, Oct 27

Re: django model(s) silently fails to sync to the DB ( for no apparent reason )

2013-10-21 Thread Doug S
me new models and forgot about that requirement. Django said the models weren't installed since it didn't know to add them to the right app. QED On Monday, October 7, 2013 9:40:33 PM UTC-4, Doug S wrote: > > I don't think I'm making a rookie mistake, I've looked over my code > several ti

django model(s) silently fails to sync to the DB ( for no apparent reason )

2013-10-07 Thread Doug S
p; MacOS Lion Best Doug -- 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 django-users+unsubscr...@googlegroups.com. To post to this group, sen

Re: Hosting multiple sites on a single application

2013-09-18 Thread Doug Ballance
I can't recommend either of those solutions specifically, but I have been using an approach similar to that of django-multisite running on a threaded fastcgi instance since django .96 days and it has worked well for us. My main concern would be with third-party apps that set static data

Re: Problem with translations

2013-09-06 Thread Doug
Follow-up: just for good measure could you tell me what you have in your settings for `LANGUAGE_CODE` and what languages you are trying to support? If by some small chance you are trying to support a language not apart of this set ,

Re: Problem with translations

2013-09-05 Thread Doug
I've found some other people with the same issue. Looking at the source, the issue is directly related to IOError, so your assumption sounds correct, django

Re: Is Celery the best option?

2013-07-19 Thread Doug Ballance
Celery is a good option, and probably the most used. There are a couple of other options that may be worth looking into: Huey https://github.com/coleifer/huey Rq http://python-rq.org/ Personally I've never gotten on well with celery. It's just not at all intuitive to me (it's heavy use of

Re: Big Picture?

2013-07-16 Thread Doug Ballance
A suggestion: Make the return arrow from views more clearly indicate that return path goes through the middleware (since it passes through once as a request, and back through the middleware in reverse with the response) and back through the webserver layers. I'm probably asking for a lot, but

Re: django search query

2013-07-01 Thread Doug Ballance
On Saturday, June 29, 2013 11:32:19 PM UTC-5, Harjot Mann wrote: > > Is there any search query in django which can ignore vowels like I want to > make a query which displays all the clients name who writes their name as > 'amanjit' or 'amanjeet'. > It should take take ee=i or anything like

Re: saving latitude and longitude values in django

2013-06-04 Thread Doug Snyder
I think you'd at least want to use either a DecimalField or FloatField for the lat & long numbers. There's a nice GIS package in django called GeoDjango, it has lots of built in functionality for all kinds of geographical things. This may be over kill for your application but I thought I'd let you

Re: Using multiple model files per app with the Improved Multiple Model Files Django Snippet

2013-06-01 Thread Doug S
y 30, 2013 8:43:46 AM UTC-4, Doug S wrote: > > I'm trying to use multiple files for my models in a single app. > I found a nice solution on Django Snippets <http://djangosnippets.org/>: > http://djangosnippets.org/snippets/1838/ > but I'm not able to get it to work. > The docs as

Re: Django & Ember

2013-06-01 Thread Doug S
or need them. That's the story of the company I'm working for right now. And wow, if they had just started out with django and ember as the backbone they would have saved a lot of time. ;-) Cheers, Doug On Saturday, June 1, 2013 1:34:01 AM UTC-4, JJ Zolper wrote: > > Hello, > > So

Re: Django & Ember

2013-06-01 Thread Doug S
Yea, I'm just getting into Django & Ember too. The django ember app posted above is really just some convenience tags for the most part. I'm not an expert at all on this and I'm probably in about the same place as you with this. My initial feeling is that Ember is just like Django on the front

Re: What to Django people have to say about Javascript frameworks to complement Django's philosophy on the front end

2013-06-01 Thread Doug S
o-apps to create more modern looking and working web pages > with as little work as possible. Something like what the > django.contrib.admin-package has done for the backend, but for the frontend > instead ;-). > > It's still pre-alpha, but I'll announce version 0.1 in a short while.

Re: django , python and ides

2013-06-01 Thread Doug Snyder
Hey I just ran into a new opensource Python IDE that looks interesting that wasn't around when I commited to Aptana Ninja-ide http://www.ninja-ide.org/ review at: http://yatharthrock.blogspot.com/2013/01/ninja.html Has anyone used this yet? On Sat, Jun 1, 2013 at 4:56 PM, Doug Snyder <webco

Re: django , python and ides

2013-06-01 Thread Doug Snyder
minimal Python functionality built in like code coloring and intelligent indentation On Sat, Jun 1, 2013 at 4:46 PM, Doug Snyder <webcoach...@gmail.com> wrote: > I use an IDE called Aptana Studio 3 and like it. > I can't say that I've tried a lot of IDEs and I tend to get more > op

Re: django , python and ides

2013-06-01 Thread Doug Snyder
I use an IDE called Aptana Studio 3 and like it. I can't say that I've tried a lot of IDEs and I tend to get more opinionated about programming languages and technologies than editors but when I got into Django I looked at some options and found Aptana to be the most full featured free and

Re: Bootstrap and Django together at last!

2013-06-01 Thread Doug S
Awesome Kevin, thanks for sharing. Its always fun to learn a new front technology through Django awesomeness. I'm just getting started on Bootstrap so having the beginner examples/templates is a nice plus ;-) On Tuesday, May 28, 2013 5:44:58 PM UTC-4, Kevin wrote: > > Hello everyone! > > I

Using multiple model files per app with the Improved Multiple Model Files Django Snippet

2013-05-30 Thread Doug S
I'm trying to use multiple files for my models in a single app. I found a nice solution on Django Snippets : http://djangosnippets.org/snippets/1838/ but I'm not able to get it to work. The docs assume that I know more than I do about how this solution works. Its

Re: What to Django people have to say about Javascript frameworks to complement Django's philosophy on the front end

2013-04-18 Thread Doug Snyder
Sorry, looks like I was wrong about batman. It can work with django, I just forget sometimes that more people watch movies than write web apps. On Thu, Apr 18, 2013 at 3:34 AM, Doug Snyder <webcoach...@gmail.com> wrote: > Another interesting library just launched is Webbot

Re: What to Django people have to say about Javascript frameworks to complement Django's philosophy on the front end

2013-04-18 Thread Doug Snyder
the abstract python UI representations to different javascript and front end libraries and technologies. The author, Timothy Crosley is on this Google Group and Webbot also has its own Google Group here: https://groups.google.com/forum/?fromgroups=#!forum/webbot On Thu, Apr 18, 2013 at 2:12 AM, Doug

Re: What to Django people have to say about Javascript frameworks to complement Django's philosophy on the front end

2013-04-18 Thread Doug Snyder
for. On Thu, Apr 18, 2013 at 1:53 AM, Doug S <webcoach...@gmail.com> wrote: > I hope this is OK to talk Javascript in this Django group, I'm hoping its > relevant to enough Django folks to not be distracting. > I'm relatively new to Django, but my impression is that a few years ag

What to Django people have to say about Javascript frameworks to complement Django's philosophy on the front end

2013-04-17 Thread Doug S
I hope this is OK to talk Javascript in this Django group, I'm hoping its relevant to enough Django folks to not be distracting. I'm relatively new to Django, but my impression is that a few years ago most django people prescribed to the wisdom of keeping javascript to a minimum and just using

Re: Are Generic Views limited to querysets that are fixed for any one view?

2013-03-22 Thread Doug S
) On Friday, March 22, 2013 8:06:06 AM UTC-4, Doug S wrote: > > I'm new to using generic views and the genericness is obviously powerful, > but I'm wondering how far it goes. If I have a model and want to display > it as a list, > I can use a generic view and even specif

Are Generic Views limited to querysets that are fixed for any one view?

2013-03-22 Thread Doug S
through a url parameter? Is that beyond the scope of generic views? Can the url parameters be passed to the class based view? Best Doug -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving e

Re: Is there any database ( or other ) magic going on with django properties?

2013-03-12 Thread Doug S
Thanks for the quick replies. Straight fields it is, that makes things simple. -- 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

Is there any database ( or other ) magic going on with django properties?

2013-03-12 Thread Doug S
in some special functionality for them? Doug -- 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 django-users+unsubscr...@googlegroups.com. To post to this g

Re: Best practices for 1.5 configurable user model and profiles

2013-02-27 Thread Doug
Thanks Shawn. So what is your take? Only authentication data in User? Separate Profile model and app? On Wednesday, February 27, 2013 12:07:55 PM UTC-5, Shawn Milochik wrote: > > Do a search on the history of the django-developers mailing list. > There are many reasons, and they were discussed

Re: Best practices for 1.5 configurable user model and profiles

2013-02-27 Thread Doug
quot;? On Saturday, February 23, 2013 11:15:20 PM UTC-5, Russell Keith-Magee wrote: > > Hi Doug, > > Obviously, it's still early days, so "best practice" hasn't really evolved > yet. However, based on what I've done with custom user models so far, my > advice would

Best practices for 1.5 configurable user model and profiles

2013-02-22 Thread Doug
I am curious how people are handling the new 1.5 user model with regard to User Profiles. Is it best to add all profile information to a custom user model? Or keep the user model for authentication information only and create a one-to-on or foreign key to a profile model (similar to the

Re: Is their an easy way to implement an ordered list of, say, urls in Django

2012-12-26 Thread Doug Snyder
OK, cool, thanks. I'll keep in mind the custom SQL solution for the future but for this project I think I do the editing on the front end ( see below) I have a strange background where I'm learning django but have never used SQL outside of django's ORM. I haven't played around with custom SQL

Is their an easy way to implement an ordered list of, say, urls in Django

2012-12-22 Thread Doug S
be a pretty common thing to do even though many lists can be ordered nicely by something like date . . . I'm just wondering if there is a common easy way to do this in django that I haven't stumbled upon yet. Is there an app that is to linked lists like django-mptt is to trees? Thanks Doug

Re: django doesnt accept the serializeArray POST data

2012-10-22 Thread Doug Ballance
I'm guessing it is a result of not having a csrf token set for the post: https://docs.djangoproject.com/en/dev/ref/contrib/csrf/#ajax -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Error in Brand New Django 1.4.1 released Yesterday

2012-08-01 Thread Doug Blank
angoproject.com/download/ On that same page (option number 2) are a couple of links for the "Latest Development Version". The zip file is named: django-django-1.4-616-g8d3e501.zip but indeed the version in the zip file is: VERSION = (1, 5, 0, 'alpha', 0) -Doug > and installed it and w

Re: Variable # of fields in a form

2012-07-25 Thread Doug Ballance
It seems to me that two fields might be the simple solution? class SomeForm(Form): internal = forms.ModelMultipleChoiceField( , widget=forms.CheckboxSelectMultiple) externa = forms.ModelMultipleChoiceField( , widget=forms.CheckboxSelectMultiple) Then

Re: Installing psycopg2 for PostGreSQL as django backend using virtualenv

2012-07-15 Thread Doug S
On Saturday, July 14, 2012 9:56:54 PM UTC-4, Doug S wrote: > > Hello django people, > I'm just installing my PostgreSQL backend for my django projects that I > install in isolated virtualenv's > I've followed what seem like easy installation instructions here: > http://initd.o

Re: Installing psycopg2 for PostGreSQL as django backend using virtualenv

2012-07-14 Thread Doug S
like it did. Lesson learned, virtaulenv working. thanks Doug On Saturday, July 14, 2012 9:56:54 PM UTC-4, Doug S wrote: > > Hello django people, > I'm just installing my PostgreSQL backend for my django projects that I > install in isolated virtualenv's > I've followed what

Re: Installing psycopg2 for PostGreSQL as django backend using virtualenv

2012-07-14 Thread Doug S
hmmm, OK I didn't know that. I'll try it . . . but I thought I already tried it and got a permission denied error On Saturday, July 14, 2012 10:17:18 PM UTC-4, Ramiro Morales wrote: > > On Sat, Jul 14, 2012 at 10:56 PM, Doug S <webcoach...@gmail.com> wrote: > > Hello djang

Re: Installing psycopg2 for PostGreSQL as django backend using virtualenv

2012-07-14 Thread Doug S
my psycopg2 to use it as a backend? Do I need to reinstall django in the virtualenv ( or start over on my virtaulenv ) so that it installs with psycopg2 installed? or should django just be able to import it? On Saturday, July 14, 2012 9:56:54 PM UTC-4, Doug S wrote: > > Hello django

Installing psycopg2 for PostGreSQL as django backend using virtualenv

2012-07-14 Thread Doug S
Hello django people, I'm just installing my PostgreSQL backend for my django projects that I install in isolated virtualenv's I've followed what seem like easy installation instructions here: http://initd.org/psycopg/install/ I have installed python-dev, libpq-dev and also

Re: Finding a developer

2012-06-26 Thread Doug Snyder
that does ( not me :-0 ) Doug On Tue, Jun 26, 2012 at 9:59 AM, Kurtis Mullins <kurtis.mull...@gmail.com>wrote: > If you are doing the work yourself, use whichever you prefer. If you are > paying someone else to do the work, give them the freedom to choose what to > use. Just find

Re: Understanding Django for PHP developer

2012-06-03 Thread Doug Ballance
I should have looked a little harder, I found the blog post. It is about a much older version of Django. Some of the references to django internals are surely a bit different now, but the fundamentals are the same. It really helped me when I first started. I'd love to see it updated for the

Re: Understanding Django for PHP developer

2012-06-03 Thread Doug Ballance
http://www.twistedcommons.com/2008/12/how-django-works.html There was a blog post several years ago that followed, in detail, the life of a response with all the gory details. Unfortunately I can't locate the link. The above page is brief, but has a nice picture that is easy to follow. A huge

Re: Scaling django installation

2012-05-31 Thread Doug Ballance
I don't think anyone will be able to give you a good evaluation without knowing more about the requests. Django itself could probably handle 10k requests per second returning a simple "hello world" response, or less than 10 if you are returning very large/difficult to generate responses. It is

Re: PythonScript(Zope) like in a django app, any tips?

2012-04-15 Thread Doug Ballance
You might also try a different scripting language, for example Lua. I've a python module "lupa" bookmarked for a project on my todo list that requires user scripting. It appears you can have a relatively sandboxed access to python objects. I'm hoping that with some careful compiling of the

Re: Much the same code, different businesses

2012-03-26 Thread Doug Ballance
There are a few choices that I'm familiar with. 1) Create a separate project/settings file for each of your stores, overriding templates as needed by placing assigning a template path for the project. I think this is pretty much the recommended way to do things, especially if the number of sites

Re: Dynamic settings variables (dynamic global variable)

2012-02-09 Thread Doug Ballance
> Doug, I don't see how the LazyFetch you wrote is much different than > what akaariai shared? Can you explain to me what the difference is? > And I'm not saying that in a condescending way, I'm saying I'm just > not sharp enough on my Python to recognize the difference. Slight

Re: Dynamic settings variables (dynamic global variable)

2012-02-08 Thread Doug Ballance
I made an error when I changed a variable name just before posting. Replace "self._age" with "self._last_updated". -- 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: Dynamic settings variables (dynamic global variable)

2012-02-08 Thread Doug Ballance
A method similar to what Anssi describes is what we use for local caching of data that is too large to comfortably fetch from cache/ parse from file every time we need it. A Doing a lazy fetch with a maximum age like that also helps with load times since it is only fetched when accessed. Of

Re: rendering CSV in response; need a little help

2011-12-09 Thread Doug Ballance
If you have a dataset that is too large to fit in memory comfortably, the ability to pass a generator to an httpresponse means you can break it up into multiple smaller queries (outside the template system anyway): def queryset_to_csv(queryset,delimiter=',',steps=500): """ generator for large

Re: custom attributes of model field

2011-12-07 Thread Doug Ballance
Just to clarify that last bit about a mapping on the model since it's closest to what you originally described. Just pseudo-code, but you can see the idea. class Model1(models.Model): FIELD_DISPLAY={ 'foo': ['a'], 'bar': ['b','c'] } a = models.CharField() b =

Re: custom attributes of model field

2011-12-07 Thread Doug Ballance
I may not be clear on what you are trying to accomplish, but maybe something like class Form1(forms.ModelForm): class Meta: model=Model def type_one_fields(self): return [self.fields['a']] # Or use whatever criteria you want for type_one fields. def

Re: How to make a query form depend on a field?

2011-09-26 Thread Doug Ballance
There are also a few third-party apps that can assist you with the form->query process such as this one: https://github.com/alex/django-filter -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: When is a good time to use db_index? Rule of thumb?

2011-09-16 Thread Doug Ballance
Another clarification: It tells django to create an index on that field when you run syncdb to create the tables for your apps. Adding it to an existing model won't change anything by itself. If you decide a field needs an index you can add it to the model definition, and then you can use the

Re: Streamlining DJango Deployment — Novel idea from the world of CMSs

2011-09-07 Thread Doug Ballance
I would agree with Donald, and expand on that to say that an installer would probably be best written in php for widest compatibility. A php based installer would run outof the box on most webservers, and be able to give a guided overview of the python/web environment setup. It would easily be

Re: Security implications of using the form.fields dictionary directly

2011-09-03 Thread Doug Ballance
The most elegant way I've seen specialized form rendering handled was the use of template tags and filters. The django uni-form project is a good example. By using the filter and template tags you gain full access to all the form elements, and can do easy manipulation in python, but leave the

Re: Argh: templates, admin, and app loading order

2011-08-30 Thread Doug Ballance
Can you use the filesystem loader as the first template loader, then set TEMPLATE_DIRS in settings.py to specify a template directory outside any app? Use this location for all of your overrides, just make sure the path is right... ie each app you override would have its own subdirectory. --

Re: find_template Django 1.3

2011-08-25 Thread Doug Ballance
I haven't moved to 1.3 yet, but we do a few things with the template source too so this is definitely of interest. It looks like most of the template loaders define a load_template_source method implementation that does return the source, except for the cached loader. As a work around you could

Re: Work in memory instead of BD, how to?

2011-08-18 Thread Doug Ballance
You probably don't want to cache changes. Or if you do, it would be better done elsewhere (like a caching raid controller/w battery on your database machine). The usual cache patterns I've seen are: 1) Fetch from database 2) Store in cache with a reasonable timeout to that changes are reflected

Re: How to store variable timedeltas in a Django model?

2011-08-14 Thread Doug Ballance
Depending on the resolution and maximum duration, you could just use an integerfield containing either the number of seconds or minutes, and then recreate it. That way you can also base queries off of the value, which you can't do with just a pickle field. Of you could subclass the integerfield

Re: How do I apply a filter in a custom template tag?

2011-08-13 Thread Doug Ballance
I'd like to see you model structure, but based on what I think it is: class Entry(model.Model): categories=models.ManyToManyField(Category) class Content(models.Model): entry=models.ForeignKey(Entry) You have a Content Instance You want to see other entries belonging to one or more of

Re: Django for a front end designer

2011-08-05 Thread Doug Ballance
I don't think it's necessarily a choice between learning php or learning python. Most programming languages are fairly similar in concept, and once you've mastered one it's reasonably easy to pick up a new one. Python is a great language, but I think it's especially great as a first language.

Re: Most stable Linux distribution for Django - Python development

2011-08-01 Thread Doug Ballance
I'll second the use of something like LXC (new to me) or OpenVZ (what we use), allowing you to run/test multiple distros at once. If you want to try debian (or pretty much any linux distro), download a container skeleton for it and install in a few seconds. I've used virtualbox/kvm, but I found

Re: Doesn't render templates any longer

2011-07-27 Thread Doug Ballance
def main(request): context=Context()     this_is_the_template_object = loader.get_template("main/ start.html") this_is_the_template_rendered=this_is_the_template_object.render(context)     return HttpResponse(this_is_the_template_rendered) What you are feeding HttpResponse is the

Re: Web development newbie

2011-07-23 Thread Doug the Webmaster
e at: http://showmedo.com/videotutorials/django I tried JAVA web development before Django I find Django much more intuitive easier to code in Both JAVA and Django are for perfectionists, only Django is for perfectionists with time deadlines :-) good luck with the transition Doug On 7/23/2011 9:19 A

trouble going from django on Windows to Ubuntu using Eclipse & Aptana Studio

2011-07-17 Thread Doug Snyder
_link/src/snyder_link/manage.py runserver" execution. Could someone explain where the problems might be? Even a beginning of a solution would be appreciated as I don't know where to begin Best Doug -- You received this message because you are subscribed to the Google Groups "Dja

Re: Implementing a User Search Feature

2011-07-02 Thread Doug Ballance
**filters is python for expand the dict 'filters' into keyword arguments. ie filters={'foo':1} model.objects.filter(**filters) is the same as model.objects.filter(foo=1) The filters variable is just temporary dictionary for building the keyword arguments from the form data, electing to omit any

Re: Implementing a User Search Feature

2011-06-30 Thread Doug Ballance
If you just want a simple user search (which seems to be what you are asking for), it really depends on your models - but a basic approach I usually use is to define a django form to use for the search, and instead of defining a save method, make a method that returns a queryset. As an off the top

Re: How to implement multi-tenant, single DB, single site?

2011-06-04 Thread Doug Ballance
For our setup we created a separate user,site framework since we do a form of vhosting that serves multiple sites from one instance. We have a Site model that serves as the root tying all of our other models together. No abstract models or anything fancy, just a FK in each model class pointing

Re: Our new startup site build on Django and GAE is now live!

2011-06-03 Thread Doug Ballance
I actually authorized, but got a little creeped out by being asked for three cities in which I'd lived before being able to continue. I entered one, but it still wouldn't let me pass without another two. I couldn't conceived of ANY legitimate reason to need anything more than my current location

Re: Is there an HTML editor that's Django-aware

2011-05-27 Thread Doug Ballance
Everyone has different requirements, but I'm one of those strange people who don't care about having a powerful editor. I don't want completion, or auto-anything. Just something that gets out of my way and lets me work. If something complex needs to be done on occasion, that's what the shell

Re: my models are remembering old fields that I have since deleted

2011-05-10 Thread Doug
Got it. I was assuming that snycdb was dropping the old tables for me. All of the crazy stuff that was happening seems to be explained. Thanks. On 5/7/2011 9:50 PM, George Silva wrote: Just drop the old tables and run syncdb again! Cheers On Sat, May 7, 2011 at 10:45 PM, Nick Arnett

Re: How to reduce DB queries?

2011-02-27 Thread Doug Ballance
Could you do a ManyToMany relationship through an intermediary model, and then query the intermediary using select related? -- 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: compiled regex as attribute

2011-02-11 Thread Doug Ballance
Have you done any performance testing? From what I understand pythons re.compile caches internally, so after the first call subsequent calls will use the pre-compiled expression. Serializing the compiled expression using pickle isn't 'free', so I'm wondering how much difference there is in

  1   2   3   4   >