Re: LoginRequiredMixin ignored

2016-06-15 Thread Brian Schott
Try swapping class order. Sent from my iPhone > On Jun 15, 2016, at 6:55 PM, Lee Hinde wrote: > > Using Django 1.9.7. > I have the following class: > class AddView(LoginRequiredMixin, CreateView): > template_name = "entry.html" > model = Property > form_class =

Re: Python on the web

2016-03-07 Thread Brian Schott
Dude. Try django gigs.com or freelance.com Sent from my iPhone > On Mar 7, 2016, at 11:11 AM, Bob Gailer wrote: > > > On Mar 7, 2016 10:51 AM, "Gregg Turner" wrote: > > > > Hey, > > > > Need a simple python script put into a website. It uses the

Re: How to share apps between projects?

2015-03-21 Thread Brian Schott
You can add an ssh git path http://stackoverflow.com/questions/4830856/is-it-possible-to-use-pip-to-install-a-package-from-a-private-github-repository Sent from my iPhone > On Mar 21, 2015, at 8:50 AM, ThomasTheDjangoFan > wrote: > > Hi guys, > > I

Re: Django and SSL

2014-12-10 Thread Brian Schott
orn-docs.readthedocs.org/en/latest/settings.html#ssl> Brian Schott bfsch...@gmail.com > On Dec 10, 2014, at 11:55 AM, pythonista <software.by.pyt...@gmail.com> wrote: > > I am getting a request from the security infrastructure and I could use some > advice/recommendatio

Re: Alternative to fabric

2014-11-17 Thread Brian Schott
Ansible is a good choice. Sent from my iPhone > On Nov 17, 2014, at 11:07 AM, Cal Leeming [iops.io] wrote: > > There isn't really such a thing as a "deployment plugin", there are many > aspects to deployment workflow that should be considered. > > It really depends on how you

Re: Django authentication by email

2014-05-15 Thread Brian Schott
Django-allauthhttps://github.com/pennersr/django-allauth — Sent from Mailbox On Thu, May 15, 2014 at 7:58 AM, Frankline wrote: > Hi all, > I am thinking of developing a web application where users will have to > login by their email address instead of using their usernames.

Re: Polymorphic Inheritance

2014-05-13 Thread Brian Schott
. There is a good book called "Two Scoops of Django", which recommends avoiding premature database optimization. Unless you've identified this is the long pole in your tent, you are probably better off focusing on other optimizations such as installing memcached. Brian Schott bfsch...

Re: django collectstatic

2013-12-12 Thread Brian Schott
The best way to get help is to paste the errors into a gist (https://gist.github.com) or similar service and post the link. Redact anything that looks like a key or password :-). Brian Schott bfsch...@gmail.com On Dec 12, 2013, at 6:24 AM, kodali srinath chowdary <ksrinathcho

Re: Streaming images with HttpResponse?

2013-11-18 Thread Brian Schott
What are you trying to do?  Typical approach would be to use Javascript to pull the images.  Take a look at dajaxice.   — Sent from Mailbox for iPhone On Mon, Nov 18, 2013 at 1:57 PM, Alex Karargyris wrote: > So thanks to Simon I was able to make this work. Here is the

Re: Django 1.5 tutorial, part 1

2013-10-12 Thread Brian Schott
Polls not pools? — Sent from Mailbox for iPhone On Sat, Oct 12, 2013 at 12:58 PM, Enrico Battiston wrote: > Hi, i'm a first time user and i'm experiencing an error in the first part > of the django 1.5 tutorial. > At the "Activating models" paragraph when i execute

Re: Django Periodic tasks

2013-08-16 Thread Brian Schott
Also, load the page with a busy animated gif and use something like dajaxice to fetch and replace the computed value.  Several examples and libraries out ther. — Sent from Mailbox for iPad On Fri, Aug 16, 2013 at 11:22 PM, Some Developer wrote: > On 17/08/13

Re: is it possible to use REST API with HTML within Django?

2013-08-15 Thread Brian Schott
calling AJAX from inside the browser, I recommend you check out: http://www.dajaxproject.com There are other tools, but it makes life easier. Brian Schott bfsch...@gmail.com On Aug 15, 2013, at 12:27 PM, evh <naw...@nc.rr.com> wrote: > Hi, > > I am having trouble getting REST

Re: dear someone,

2013-07-22 Thread Brian Schott
NAME (path to a database file) should include the filename, not just a directory. Try './mysite/mysite.db' for NAME. Brian On Jul 22, 2013, at 1:44 PM, Stian Sjøli wrote: > I am trying to start up with django using the tutorial on the website. I get > the following

Re: a bit confused about projects/apps

2013-07-17 Thread Brian Schott
Unless you really want to build it all from scratch, you might want to look at a CMS framework such as Mezzanine (http://mezzanine.jupo.org), DjangoCMS (https://www.django-cms.org), FeinCMS. Think of a project as a Django web server configuration. In the end, manage.py and settings.py are

Re: How to use a list in a django model

2013-04-10 Thread Brian Schott
constraint on choice + module. There are tradeoffs in all of these approaches. Brian Brian Schott bfsch...@gmail.com On Apr 10, 2013, at 4:30 PM, Cody Scott <cody.j.b.sc...@gmail.com> wrote: > I also want to have the same question in multiple quizzes. But the count for > each o

Re: How to use a list in a django model

2013-04-10 Thread Brian Schott
on Question to duplicate the question and its choices. https://docs.djangoproject.com/en/dev/ref/contrib/admin/actions/ That way, your workflow is duplicate a question, edit on a single page, hit save. Brian Schott bfsch...@gmail.com On Apr 10, 2013, at 3:02 PM, Cody Scott <cody.j.b.sc...@gmail.

Re: How to use a list in a django model

2013-04-10 Thread Brian Schott
and store in a JSONField https://github.com/derek-schaefer/django-json-field 3. There are several flavors of ListField out there: http://djangosnippets.org/snippets/1491/ Brian Schott bfsch...@gmail.com On Apr 10, 2013, at 1:38 PM, Cody Scott <cody.j.b.sc...@gmail.com> wrote: > I am trying

Re: Deploying: Desktop to server

2013-04-09 Thread Brian Schott
strategy is to do content updates on the production site and test/develop against database snapshots locally. Also, when you change the models, it is worth learning how to use South to do schema migration. http://south.readthedocs.org/en/latest/tutorial/part1.html Brian Schott bfsch...@gmail.com

Re: Confusion about Static Files

2013-03-29 Thread Brian Schott
over the place. Brian Schott bfsch...@gmail.com On Mar 29, 2013, at 3:36 PM, David Pitchford <david.t.pitchf...@seagate.com> wrote: > I am experienced with Python but new to Django and web development in > general. I am struggling to understand its static files

Re: Automating deployments

2013-02-01 Thread Brian Schott
We are using ansible. http://ansible.cc/ Other popular choices are puppet and chef. The real benefit. Is that these tools let you version control your configurations. Sent from my iPhone On Feb 1, 2013, at 7:46 PM, Carlos Aguilar wrote: Bash scripts really??? If you

Re: Execution time of a long process results in an Internal Server Error 500

2013-01-10 Thread Brian Schott
://www.dajaxproject.com Brian Schott bfsch...@gmail.com On Jan 10, 2013, at 9:12 AM, Tom Evans <tevans...@googlemail.com> wrote: > On Thu, Jan 10, 2013 at 1:21 PM, Mauro Sánchez <maur...@gmail.com> wrote: >> Hello, I have a process that takes about 2 or 3 minutes to ex

Re: complicated permissions

2012-09-10 Thread Brian Schott
, and recently mixin wrappers for class-based views. https://github.com/lukaszb/django-guardian Brian Brian Schott bfsch...@gmail.com On Sep 9, 2012, at 10:55 PM, jondykeman <jondyke...@gmail.com> wrote: > Hi Everyone, > > I was hoping to get some input on how ot

Re: Looking for common practice suggestion.

2012-07-03 Thread Brian Schott
An intermediate approach would be to generate an initial_data.json/yaml file and place it in your project's fixtures directory. This at least should be database independent. https://docs.djangoproject.com/en/dev/howto/initial-data/ Brian Schott bfsch...@gmail.com On Jul 3, 2012, at 1:33 PM

Re: Is there are some id obfuscate libs in django?

2012-05-27 Thread Brian Schott
uuid=self.kwargs['uuid'], token=self.kwargs['token']) return object --- Brian Schott bfsch...@gmail.com On May 27, 2012, at 11:14 AM, Marcin Tustin wrote: > Why would you want this? Arbitrary integers are already completely opaque. > > On Sun, May

Re: Django + boto support

2012-04-26 Thread Brian Schott
It works very well. You'll want to do the boto calls from something like celery tasks in the background. Brian Schott bfsch...@gmail.com On Apr 26, 2012, at 1:27 PM, Nikolas Stevenson-Molnar wrote: > The S3 part at least integrates well. It's used by the django-storages > project

Re: guardian: I get ImproperlyConfigured error, but I have set ANONYMOUS_USER_ID in projectName/projectName/settings.py

2012-04-22 Thread Brian Schott
This should work: # django-guardian requires an anonymous user ANONYMOUS_USER_ID = -1 Also, I think you need to "python manage.py syncdb" the first time you use it. Brian Schott bfsch...@gmail.com On Apr 22, 2012, at 11:41 PM, su wrote: > I set ANONYMOUS_USER_ID in my pr

Re: Hardware requirements for Djando development (Linux vs Mac)

2012-04-20 Thread Brian Schott
Any Intel mac mini should be fine. I do all of my development on a MacBook Pro laptop. Most of the potential Linux dependencies that aren't available from PyPi (RabbitMQ, MYSQL, ...) can be installed using Homebrew: http://mxcl.github.com/homebrew/ Brian Schott bfsch...@gmail.com On Apr 20

Re: Unable to open database file

2012-03-02 Thread Brian Schott
Is the WSGI server running as www-data user, perhaps? Check the permissions on the file with "ls -l". Simple check would be "chmod a+rw " to guarantee that it is writable by www-data. Brian Schott bfsch...@gmail.com On Feb 18, 2012, at 4:24 PM, j...@jsdey.com w

Re: Apps vs Project

2012-01-28 Thread Brian Schott
and essentially share a namespace for metadata like django-guardian permissions. class Meta: app_label = 'crm' Brian Schott bfsch...@gmail.com On Jan 12, 2012, at 10:31 AM, Grant Copley wrote: > Hey guys, > > I'm a 12 year ColdFusion guy learning Django and Python and had

Re: problems running subprocess inside django view

2012-01-28 Thread Brian Schott
As the same user? Are you running with manage.py runserver? Generally it is a bad idea to call subprocess from a web process context. A blocking call you don't expect might time out the client and/or hang your server. Check out Django-celery. Create a tasks.py and have your view call a task.

Re: file manager options for user home directory

2012-01-19 Thread Brian Schott
012, at 12:56 AM, Mike Dewhirst wrote: > On 19/01/2012 2:10pm, Brian Schott wrote: >> Looking for some expert advice. I need to provide an upload and file >> browse capability for a user's home directory. It doesn't have to be >> a full blown file explorer necessarily, j

file manager options for user home directory

2012-01-18 Thread Brian Schott
thought about different options, but they all have tradeoffs: 1. dav enabled nginx process for each user with a javascript dav file explorer? 2. django-storages with sftp? 3. something else? Brian Brian Schott bfsch...@gmail.com smime.p7s Description: S/MIME cryptographic signature

Re: Directory layout for a large Django application (not project)

2012-01-10 Thread Brian Schott
and virtual hosting on Apache. Brian Schott bfsch...@gmail.com On Jan 10, 2012, at 6:01 AM, Cal Leeming [Simplicity Media Ltd] wrote: > I've hit this same problem myself many times. > > Ultimately there is never any one answer - you can split out functionality > into individual modules, b

Re: Directory layout for a large Django application (not project)

2012-01-10 Thread Brian Schott
ps. In reality, all of the tables are in the same database. I also use: class Meta: app_label = 'major_app' in the model class of each sub_app, so that all of the admin pages are grouped together. Brian Brian Schott bfsch...@gmail.com On Jan 10, 2012, at 1:46 AM, D

Re: Directory layout for a large Django application (not project)

2012-01-09 Thread Brian Schott
= PROJDIR.split('/')[-2] BASEDIR = os.path.abspath(os.path.join(PROJDIR, '..', '..')) + '/' APPSDIR = os.path.abspath(os.path.join(BASEDIR, 'apps')) + '/' # add apps and projects directory to path sys.path.insert(0, PROJDIR) sys.path.insert(0, APPSDIR) Brian Brian Schott bfsch...@gmail.com On Jan 7

Re: Split File Storage

2011-12-27 Thread Brian Schott
on CloudFiles or S3? Replication is good because the MTBF plummets as you add bits. Brian Schott bfsch...@gmail.com On Dec 27, 2011, at 9:02 PM, Cameron wrote: > Greetings all- > > I have a django site which is referencing about 1TB of static files at the > moment and growing fast.

Re: Django E-Commerce Framework

2011-12-08 Thread Brian Schott
I've been playing with django-shop. It looks lightweight, class extensible, and lightweight, but haven't worked with it enough to recommend yet. That's still in my scrum backlog... Brian Schott bfsch...@gmail.com On Dec 8, 2011, at 11:58 AM, Nan wrote: >> I'm guessing that the OP

Re: Novice question...generation of model instances within a "for" loop...

2011-12-08 Thread Brian Schott
I think if you set: new_cmd_str.id = None That will force a new PK. Not sure why the CmdString constructor isn't clearing this.. Brian Schott bfsch...@gmail.com On Dec 8, 2011, at 11:47 AM, Marc Edwards wrote: > I'm looping through some JSON code and generating new model instances >

Re: slow function

2011-12-05 Thread Brian Schott
what should be a separate app. If you have a relathionships like Publishers -> Books, and Authors -> Books should you try to break out Books, Authors, and Publishers as separate apps? Brian Schott bfsch...@gmail.com On Dec 5, 2011, at 5:18 AM, Håkon Erichsen wrote: > - Holy moth

Re: Newbie question on re-defining an XML schema in my Django data model...

2011-11-29 Thread Brian Schott
) class Meta: ordering = ['index',] Brian Schott bfsch...@gmail.com On Nov 29, 2011, at 10:44 AM, Marc Edwards wrote: > I need some help in resetting my thinking on creating my Django data > model. > > I have previously created an XML schema definition for m

Re: Simple task dispatching (How heavy is celery + RabbitMQ)

2011-11-28 Thread Brian Schott
don't seem to get reliable message delivery, but maybe I misread the site. Brian Schott bfsch...@gmail.com On Nov 28, 2011, at 8:34 PM, Gelonida N wrote: > On 11/28/2011 12:14 PM, Gelonida N wrote: >> Hi, >> >> I'd like to use a light weight dispatching sy

Re: Need to process uploaded files into database entries(takes hours), how do I return a progress bar?

2011-11-27 Thread Brian Schott
;>fil.write('coming from background') >>fil.close() >> >>print Gene.objects.get(id=y+1) >>return True >> >> @task >> @transaction.commit_manually >> def processXLS1(datasetObjectID): >>print "processing XLS as task&q

Re: Need to process uploaded files into database entries(takes hours), how do I return a progress bar?

2011-11-27 Thread Brian Schott
with rabbitMQ so you get instant scalability. Then your AJAX job status view can poll a job status table that is updated by the task and you don't have to worry about threads. https://github.com/ask/django-celery Brian Schott bfsch...@gmail.com On Nov 27, 2011, at 8:54 PM, Nathan McCorkle wrote

Re: Which Linux distro to use on EC2?

2011-11-14 Thread Brian Schott
Ubuntu has great cloud-init support for dealing with cloud startup scripts. Works on most clouds: openstack, ec2, eucalyptus... Sent from my iPhone On Nov 13, 2011, at 8:52 PM, ydjango wrote: > I was concerned that Ubuntu being a desktop OS might have some >

Re: Ajax replacement in django

2011-10-12 Thread Brian Schott
. http://www.w3schools.com/tags/tag_iframe.asp Create a iframe_base.html template file that has the meta refresh tag included in section and just the iframe parts should refresh. Not sure if this is what you want, and not sure this is a good idea, but it doesn't require javascript. Brian Schott

sekizai and django-registration tests failing

2011-09-27 Thread Brian Schott
'nimbis_cloud', ) Brian Schott bfsch...@gmail.com smime.p7s Description: S/MIME cryptographic signature