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 wrote: > > Hello django people, >

Re: Installing psycopg2 for PostGreSQL as django backend using virtualenv

2012-07-14 Thread Doug S
on it was using 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'

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: >

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 y

Re: Error in Brand New Django 1.4.1 released Yesterday

2012-08-01 Thread Doug Blank
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 an

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 django-users@googlegroups

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: 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 a

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. -- You

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 ren

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 abl

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

2011-09-15 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 "m

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 django-users@goo

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 type_two_fields(sel

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 = models.Foreig

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

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

2012-12-22 Thread Doug S
#x27;m thinking this must 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 d

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 since

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

2013-03-11 Thread Doug S
django build 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

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 django-users+unsubscr...@googlegro

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

2013-03-22 Thread Doug S
query set 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 rece

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

2013-03-22 Thread Doug S
parameter being accessed ) 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 us

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 s

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

2013-04-17 Thread Doug Snyder
signed for. On Thu, Apr 18, 2013 at 1:53 AM, Doug S 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 ago > most

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
adapts 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:1

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 wrote: > Another interesting library just launched is Webbot ( > http://www.webbot.ws/Home ). T

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 involve

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 th

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 platform

Re: django , python and ides

2013-06-01 Thread Doug Snyder
e, its got some minimal Python functionality built in like code coloring and intelligent indentation On Sat, Jun 1, 2013 at 4:46 PM, Doug Snyder 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 > opini

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

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
t easy for django-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

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 en

Re: Django & Ember

2013-06-01 Thread Doug S
oduce the more scalable technologies when you learn them 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,

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

2013-06-01 Thread Doug S
p_label = 'myapp' On Thursday, May 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/ > bu

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: 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 thi

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 i

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 d

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 initial

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

2013-10-07 Thread Doug S
e anything obvious or know what type of problems can cause syncdb to ignore models? I'm running out of ideas about what is wrong I'm on Django 1.5 using PostGreSQL & MacOS Lion Best Doug -- You received this message because you are subscribed to the Google Groups "

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

2013-10-21 Thread Doug S
t then added some 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'

Re: Psycopg2 on Mac OS X (Snow Leopard)

2013-10-27 Thread Doug Snyder
;t require 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

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 and

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: 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 bac

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: 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

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

2011-07-17 Thread Doug Snyder
orkspace/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 Gr

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 object

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 c

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. You

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 th

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 a

Confused about thread locals... again.

2010-12-15 Thread Doug Ballance
First, I'd like to find out if there is a better way than thread locals to do what I want to do. From what I can tell, it isn't possible any other way. Finally, I don't understand why my thread locals implementation/hack works - which scares me, so I would like to ask the wiser gurus out there f

Re: Confused about thread locals... again.

2010-12-16 Thread Doug Ballance
@ringemip Thanks for the reply. I've been considering something like that, but given the number of views and tags involved, it would be a very long process. Especially since I used a new context instance in most of my custom tags that render another template, rather the pushing, rendering, poping

Re: Django's documention is horrible

2011-01-11 Thread Doug Ballance
The reason I chose django in the first place was the documentation. Compared to everything out there, it was incredible. Back then it also had a helpful comments section on each page where people chimed in to clarify various parts of the document. It reads like a text book, which is a big help wh

Re: django-ttag -- an easier way to write template tags

2011-01-13 Thread Doug Ballance
Thank you! I've been wishing something like this was a part of Django since trying to write my first tag. I've been using something in house that provides similar functionality for a couple of years and couldn't live without it. Your implementation is much more complete (validation) and I'm look

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 practi

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 un

Switching settings, in a non-webapp?

2015-05-11 Thread Doug Blank
nload 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 &qu

Re: Switching settings, in a non-webapp?

2015-05-11 Thread Doug Blank
eed 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 Django webapp. > > For

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: Trying to run jobs in the background using multiprocessing

2013-11-27 Thread Doug Blank
)) 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 >print 3 >

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 messa

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 it,

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 upgr

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

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 als

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

2014-06-02 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 statem

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

Re: Angular and Django

2014-06-22 Thread Doug Snyder
. Hope this helps. Django and AngularJS are two scoops of webdev icecream with sparkles. Hope you enjoy. Doug On Sun, Jun 22, 2014 at 8:43 AM, Glen Jungels 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

Re: Angular and Django

2014-06-22 Thread Doug Snyder
oogle 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 wrote: > be sure to check out: django-angular > <http://django-angu

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 wrote: > compared to other js webapp solutions like Ember or Knockout, > Angular is more powerful but maybe a steaper learning curve. > It lets you ge

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

2018-01-21 Thread Doug Nintzel
terested in BKMs for use of virtual environments in this case? Specifically, should 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 t

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 liberty

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 tempora

Breaking internal app out into reusable app, migration question

2016-06-16 Thread Doug Donaldson
L 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

Breaking out internal app into reusable app, migration question

2016-06-16 Thread Doug Donaldson
ion level 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 &qu

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

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

2019-03-04 Thread Doug Arnold
y websites 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 "Dja

Re: django monitoring page

2008-11-14 Thread Doug Van Horn
If it's Apache Auth, use a URL like this: http://username:[EMAIL PROTECTED]/some/url/ Hope that gets you moving in the right direction... doug. On Nov 14, 6:44 am, Harish <[EMAIL PROTECTED]> wrote: > hi.. friends, > > I have one django site which is running on the intern

Figuring out prefork v. worker

2008-10-16 Thread Doug Van Horn
I run several applications on a Slicehost VPS and I recently switched them to run the worker MPM and mod_wsgi. After switching, I ran into an issue with the worker MPM leaking timezone information across django applications (actually the timezone leaks under both mod_python and mod_wsgi/embedded

Re: Query to display ManyToOne Bi-Directional associations?

2008-10-16 Thread Doug Van Horn
, A has set of Bs, each B has an A. You need to make sure you have a base case when writing the B objects, like a global dict of objects currently written). for what that's worth... doug. The better way to approach this would be to write the On Oct 16, 7:38 am, JohnnyLeitrim <[EMAIL

Re: Figuring out prefork v. worker

2008-10-17 Thread Doug Van Horn
On Oct 16, 5:31 pm, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > On Oct 17, 7:14 am, Doug Van Horn <[EMAIL PROTECTED]> wrote: > What is the mod_wsgi configuration you are using and how many > processes/threads are you using for Apache child processes and > mod_wsgi dae

Localizing database textarea fields using gettext chokes on \r\n.

2010-01-22 Thread Doug Van Horn
I'm trying to avoid changing my database around to accommodate localized strings. I'm putting all strings from the database into a holding file (db_messages.py) which get dumped into my django.po file. The problem is that textarea fields contain "\r\n" as line endings, and running something like:

Re: Localizing database textarea fields using gettext chokes on \r\n.

2010-01-22 Thread Doug Van Horn
Would it make sense to open a ticket for this? Maybe bring this up in Django Developers? doug. On Jan 22, 10:50 am, Doug Van Horn wrote: > I'm trying to avoid changing my database around to accommodate > localized strings.  I'm putting all strings from the database into a

Re: Including [django-users] in subject line?

2007-06-10 Thread Doug Van Horn
You should install this plugin for Firefox. It'll help you with your myriad GMail accounts: https://addons.mozilla.org/en-US/firefox/addon/1320 Of course it may be that you only use IE, so you may need to join that project's mailing list and request them to rewrite it to support your browser o

Using a closure as a callback.

2007-06-29 Thread Doug Van Horn
sting. But hey, I thought I'd throw it out there... If you have any thoughts on the subject or are willing to share how you approached this (common?) problem I'd be happy to read them! doug. --~--~-~--~~~---~--~~ You received this message because yo

Re: Django Template

2007-06-29 Thread Doug Van Horn
mewhere higher up in the template hierarchy: {% block shopping_cart %} {% endblock %} or you might include it as a template: {% include "shopping_cart.snippet..html" %} Whatever you do, I would recommend taking the approach of loading the s

Re: prettier html

2007-06-29 Thread Doug Van Horn
On Jun 29, 12:20 pm, Carl Karsten <[EMAIL PROTECTED]> wrote: > for instance, how can I make this: > > {% ifequal day.day day.today %} class="today"{% endifequal %}> > > Not put the CR inside the ? Is that line broken by a line break inserted by you? I would think this would achieve your desire

Re: Stopping second form post if refresh is hit?

2007-07-05 Thread Doug Van Horn
: import uuid uuid.uuid4() That should give you less false positives in identifying duplicate form submissions. Doug Van Horn --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To po

Re: Authentication for application with subdomains

2007-07-19 Thread Doug Van Horn
Once your user is created and associated to a subdomain, you can pull the subdomain from the request (as daev said, request.META['SERVER_NAME'] in middleware and make it available on the session (e.g., use it to look up a Customer object and make it available on the request or session).

Re: understanding request.user

2007-08-01 Thread Doug Van Horn
) If you take a look at the LazyUser object you will see that the User is only loaded when request.user is accessed. Hope that helps (and is accurate :-). Doug Van Horn www.maydigital.com --~--~-~--~~~---~--~~ You received this message because you are subscribed t

Re: age in years calculation

2007-08-03 Thread Doug Van Horn
On Aug 3, 6:37 am, Bram - Smartelectronix <[EMAIL PROTECTED]> wrote: > Hey Everyone, > > does anyone have a good age in years calculation function for usage with > datetime.date that returns the age in nr of years of a person? > > We were using: > > def get_age(self): > now = datetime.today()

Re: age in years calculation

2007-08-03 Thread Doug Van Horn
On Aug 3, 11:50 am, Doug Van Horn <[EMAIL PROTECTED]> wrote: > On Aug 3, 6:37 am, Bram - Smartelectronix <[EMAIL PROTECTED]> > wrote: [snip] You see, you learn something new every day. Based on Nis Jørgensen's post above, here's a refined age function using the fan

Re: How do you serialize a newform.errors dictionary?

2008-01-11 Thread Doug Van Horn
're not going to get it, you'll get the proxy. Back to Andrew and my original problem getting the errors serialized to json, here's what I did: errors = {} for field in form: errors[field.auto_id] = {'errors': [unicode(e) for e in field.errors]} simplejson.dumps(errors)

*Occasional* PostgreSQL Error

2008-01-24 Thread Doug Van Horn
copg2 against 8.2.5. Is it really just a matter of tweaking the postgresql.conf (max_connections et al)? Thanks! doug. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: business logic and good practices

2008-04-03 Thread Doug Van Horn
you're doing more cross-model-cross-record stuff, it's probably it's own module. As a former J2EE guy, it took me a while to get past the need to package everything in it's own space (1 class per file and all). I'm much more comfortable with the module approach now. doug.

Re: business logic and good practices

2008-04-04 Thread Doug Van Horn
that it's more common in Python to do this, and it's a lot easier to remember where stuff is. for what that's worth... On Apr 3, 11:52 am, bcurtu <[EMAIL PROTECTED]> wrote: > Thanks Doug, > > Well, yes, I think it's pretty easy to switch to this philosophy, even &

<    1   2   3   4   >