Re: Newforms and composite widgets

2006-12-17 Thread Brian Victor
Adrian Holovaty wrote: > On 12/9/06, Brian Victor <[EMAIL PROTECTED]> wrote: >> One of the things I was hoping for in newforms but haven't found is a >> way to do a composite form field that uses multiple elements >> that reduce to a single python object. E

Re: Is there an easy to "humanize" a list?

2006-12-20 Thread Brian Beck
from django.utils.text import get_text_list --~--~-~--~~~---~--~~ 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, s

Unpacking in template loops

2007-01-03 Thread Brian Beck
Sorry if this has been brought up before, I tried searching... Would it be too complex/controller-y/confusing to allow sequence unpacking in Django's for loops? As far as I can tell it isn't supported. So for example, if I have a list... fruits = [('apple', 10), ('orange', 5), ('banana', 7)]

Re: Looking to move to Django, is it right for me?

2007-01-04 Thread Brian Beck
A lot of time has been spent on making Django not-too-magical while keeping the rapid development time. I've found that it rarely does too much automatic stuff behind my back. Just a couple examples of high-level stuff that isn't too-high-for-your-own-good: * Database access. You can still use

Re: In Model or Manager? (Sorting, calculations, and non-savable fields)

2007-01-04 Thread Brian Beck
ringemup wrote: Does that apply to the actual sorting of the data as well? It seems to me that it's something most efficiently accomplished at the database level. If sorting will always be done by field in the model (and not some complex combination, for example), and SQL orders it how you're

Re: In Model or Manager? (Sorting, calculations, and non-savable fields)

2007-01-04 Thread Brian Beck
Brian Beck wrote: class Payment(models.Model): ... class Custom: def sortable_fields = ['amount', 'received_date'] That last line should of course just be: sortable_fields = ['amount', 'received_date'] --~--~-~--~~--

Re: AttributeError: 'WSGIRequest' object has no attribute 'user'

2007-01-04 Thread Brian Beck
It would seem that something is happening between the authentication middleware setting request.__class__.user and the context processor reading it. Couple things to try if you're in a debugging mood: After line 11 in django/contrib/admin/middleware.py: request.__class__.user = LazyUser() +

Re: Good Web development practice

2007-01-07 Thread Brian Beck
[EMAIL PROTECTED] wrote: Any usage of Redirect breaks Back button (or at least makes it usage more difficult since you need to go back a one step more). It doesn't introduce an extra Back step; this isn't like a META EQUIV redirect or whatever. Pressing back still works to get them to the pag

Re: floatfield( blank=True ) wierdness

2007-01-07 Thread Brian Beck
borough peter wrote: Yet the admin interface doesn't allow me to leave it empty: IntegrityError at /xxx/xx/xxx/add/ xxx_x.myfloat may not be NULL Hi, blank=True allows admin interface input to be an empty string, while null=True allows it to be NULL in the database. You want both. C

Re: Admin: How to ensure that at least on field is chosen from multiple fields.

2007-01-07 Thread Brian Beck
borntonetwork wrote: I have a model object called Customer. It contains the typical attributes/fields you might expect (name, street, apt, city, state, etc). Among these fields are 3 called home_phone, work_phone, and cell_phone. In the admin web interface, I need to ensure that the user must e

Re: Admin: How to ensure that at least on field is chosen from multiple fields.

2007-01-07 Thread Brian Beck
Whoops, don't forget to add this wherever you put that RequiredIfNoneGiven code: from django.core.validators import gettext_lazy, ValidationError --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" grou

Re: Admin: How to ensure that at least on field is chosen from multiple fields.

2007-01-07 Thread Brian Beck
Couple more things I discovered... This page documents a RequiredIfOtherFieldsNotGiven validator that doesn't actually exist! http://www.djangoproject.com/documentation/forms/#validators (it's close to what you want but not exactly -- you want it to be required if *neither* of the other fields a

Re: Admin: How to ensure that at least on field is chosen from multiple fields.

2007-01-08 Thread Brian Beck
Ramdas S wrote: One question, validators are supposed to get deprecated once the new forms becomes the default. How do we use the newforms validation to do this? Hmm. I actually rather liked django.core.validators. My guess is that it's not currently possible to predict how this will be done

Re: sorting the results of a queryset

2007-01-09 Thread Brian Beck
ll(), key=Category.get_absolute_url) Then Python will call the method for you (and maybe cache the result for further comparisons). -- Brian Beck Adventurer of the First Order --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Googl

Re: sorting the results of a queryset

2007-01-09 Thread Brian Beck
Robert Slotboom wrote: > > sorted(Category.objects.all(), key=Category.get_absolute_url) > > This is a very nice approach! > Although, shouldn't these "get_absolute_url" calls be followed by () ? Nope! Python will call it for you. The good thing is it will only call it once per item instead of on

Re: sorting the results of a queryset

2007-01-10 Thread Brian Beck
ry order as far as I know (I'm not sure how that could work). But if get_absolute_url() just returns 'http://whatever/categories/' + self.name for example, it may make sense to just do Category.objects.order_by('name').filter(...). -- Brian Beck Adventurer of the First Order

Re: Empty related sets = Page not found?

2007-01-10 Thread Brian Beck
Hi, object_list takes an allow_empty argument, try settings it to True. >From the docs: allow_empty: A boolean specifying whether to display the page if no objects are available. If this is False and no objects are available, the view will raise a 404 instead of displaying an empty page. By defa

Re: Empty related sets = Page not found?

2007-01-11 Thread Brian Beck
John Matthew wrote: > Thank you for the reply. No problem. :) --~--~-~--~~~---~--~~ 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

Re: a candidate for a custom decorator?

2007-01-11 Thread Brian Beck
I think your problem is the return values. args is a tuple and request should be there instead. In both of your decorators, return fn(request, *args, **kwargs) instead of fn(args, kwargs). --~--~-~--~~~---~--~~ You received this message because you are subscribed

newforms and dynamic choices

2007-01-13 Thread Brian Victor
matic way of doing it? (And by the way, Adrian, thanks for the select date widget. It's exactly what I was looking for and has served as a great model for similar widgets.) -- Brian --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: Please help me use "views.django.views.static"

2007-01-13 Thread Brian Beck
Hi, I make using static.serve a little cleaner like so: In settings.py: STATIC_OPTIONS = {'document_root': MEDIA_ROOT, 'show_indexes': True} In urls.py: from django.conf import settings ... (r'^static/(?P.*)$', 'django.views.static.serve', settings.STATIC_OPTIONS), (change 'static/' above to

Re: Passing values from Django to client-side JavaScript

2007-01-19 Thread Brian Beck
The JSON method mentioned above should work fine. Two methods that might be less fragile than code generation: - Hidden form inputs. Less fragile because the 'escape' filter should allow you to safely dump data into attribute values in your template, I think. Then use form.elements or MochiKit'

Re: newbie strange behavior

2007-01-26 Thread Brian Rosner
Ah, that does make sense. Yeah I am running with a production server, but using a virtual host to contain out the production site from development. I suppose I can just build another Apache and strip it down for my development needs. Thanks for the tip. On Jan 26, 11:11 am, "Waylan Limberg" <[

Re: Django as Single Sign-On?

2007-02-02 Thread Brian Beck
u're welcome to check out the code to see what needs to be done for such a task; it's mostly middleware stuff. Details are here: http:// blog.case.edu/bmb12/2006/12/cas_for_django_part_2 Good luck, -- Brian Beck Adventurer of the First Order --~--~-~--~~~---~

knowing not much about character encodings

2007-02-06 Thread Brian Rosner
hanks! Brian --~--~-~--~~~---~--~~ 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 [EMAIL PROT

Re: Using NEWFORMS to select data from the MODEL

2007-02-13 Thread Brian Rosner
use. You can have multiple forms for each instance. My ModelInstanceForm uses a prefix since I wrote this code to allow a form with data in one model and a foriegn key form like listing the products that belong to a product page. So this may not work for you out of the box, but y

order by m2m field?

2006-05-06 Thread Brian Elliott
Hello, Is it possible to order a query by a ManyToManyField? For example, in the models below, I'd like to select all Entries and order by the Author's name. Something to the effect of Entry.objects.all ().order_by('authors__name')? Thanks, Brian class Author(mode

shared apps accross multiple sites/projects

2006-07-20 Thread Brian Hamman
Hey there, I'm working on a project that will run several related news sites from a single Django installation. I'll be treating each site as a separate project, complete with its own settings.py file and corresponding use of the sites framework. Where I run into trouble is with apps that are co

Re: shared apps accross multiple sites/projects

2006-07-21 Thread Brian Hamman
Sweet. Thanks guys for the quick answer. This is very reassuring. Of course, this also means that I'm now looking at several hours of reorganization. Part of me was hoping you'd say "No! Don't touch." >From Jacob's example it looks like you guys take it a step further and more or less invert the

Re: django/core/meta

2006-09-01 Thread brian corrigan
Thanks Jacob, However with the project I'm working on, I can't change the Django version I'm working on. I have tried doing an SVN update on the core directory but meta was not included in it. Is there anyway I can download the relevant files/folders? Thanks

Re: django/core/meta

2006-09-01 Thread brian corrigan
_list = meta.ForeignKey(DistributionList) subscriber = meta.CharField(maxlength=30) class META: unique_together=(("distribution_list", "subscriber"),) ? It is the unique_together that I need to implement. Thanks in advance Brian --~--~-~--~~

Re: django/core/meta

2006-09-01 Thread brian corrigan
Jacob Kaplan-Moss wrote: > On Sep 1, 2006, at 9:17 AM, brian corrigan wrote: > > However with the project I'm working on, I can't change the Django > > version I'm working on. I have tried doing an SVN update on the core > > directory but meta was not i

Re: django/core/meta

2006-09-01 Thread brian corrigan
stribution_list", "subscriber"),) Is there something I need to do or am leaving out? Thanks again Brian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this g

Running two django projects on the same server

2006-09-05 Thread brian corrigan
error: SuspiciousOperation: User tampered with session cookie Is there a way around this? Has anyone had this problem before in the pass? I'd really appreciate any help. Thanks Brian Ps: Cheers for everyones help on last topic I had. I hope my questions weren't painfully idiotic to

Re: Mac vs. PC for Django work.

2006-09-14 Thread brian corrigan
though, there is a perfect tutorial on http://toolmantim.com/article/2006/5/31/installing_django_on_osx Helped alot! Cheers Brian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To po

Apache Authentication

2006-01-06 Thread Brian Ray
I am having trouble writing my section of my httpd.conf to handle both. Can this be done? If so, does anybody have a working example. Regards, Brian Ray http://brianray.chipy.org

Re: Apache Authentication

2006-01-07 Thread Brian Ray
? -- Brian More details RHEL3 Django recently updated from SVN Head Apache/2.0.54 (Unix) DAV/2 SVN/1.1.4 mod_python/3.1.4 Python/2.4.2 Server httpd.conf: SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE myproject.settings

Re: Apache Authentication

2006-01-07 Thread Brian Ray
Adrian, I took a look at modpython.py. I changed line 16 to: _str_to_bool = lambda s: s.lower() in ('1', 'true', 'on', 'yes') Note the parethesis. Seems to work now. Cool, Thanks!

Re: Apache Authentication

2006-01-07 Thread Brian Ray
ousUser>' So, request.user.is_anonymous() returns True. I do know know what made me think django.contrib.auth.handlers.modpython would start a session automatically. Instead, it just gives Apache the ok to let the request through to Django. Would it be appropriate to take the HOST_USER from the request object and just log the user in after the Apache Authentication by setting request.session and request.user? More important, is this safe? If so, this is fine by me. Regards, Brian Ray

Re: Apache Authentication

2006-01-07 Thread Brian Ray
Thanks Ian. But, this is not really what I am doing here. I do not want to create users from Apache. Kind Regards, Brian

Re: Apache Authentication

2006-01-07 Thread Brian Ray
This is in my view *after* the Authenticaion: def login(request): user = users.get_object(username__exact=request.META['REMOTE_USER'] request.session[users.SESSION_KEY] = user.id request.user = user # do something else ... Seems to make both Django and Apache happy. Rega

Model Inheritence

2006-01-22 Thread Brian Ray
ill not work because 'accountsaccessrequest' is not yet defined. I got around the validation error by making a accountsaccessrequest the prototype, "class accountsaccessrequest(meta.Model): pass". Although this tried to make two tables and would not work either. Any ideas how I should proceed. Workarounds? Kind Regards, Brian Ray

Database API Boolean Queries

2006-01-24 Thread Brian Ray
="t"); Alhtough, I am unsure if this will work if I switch Database platforms. Is there a better way? Thanks, Brian Ray bray sent com http://brianray.chipy.org

Re: django interface

2006-01-24 Thread Brian Ray
Reread the section "Serving the admin files" from <http://www.djangoproject.com/documentation/modpython/>. So, you have to move or point to the location of the media files and they need to be accessable from Apache. hth, Brian Ray bray sent com http://brianray.chipy.org

Manipulator Change calls INSERT

2006-01-27 Thread Brian Ray
equest), 'crumbsbar':crumbsbar(request), }) The manipulator is a AccountManipulatorChange. I double checked by calling HttpResponse on manipulator.__class__.__name__. I do use a "_pre_save" in my model and I was wondering if this somehow was causing this unexpected behaviour. tia, Brian Ray <http://brianray.chipy.org> aim: brianray34

[no subject]

2006-03-29 Thread Brian Elliott
Hey folks, Is there a recommended way to do logging in a production environment? Should I just use Python's logging module or is there a built-in way to do this? (I am using the M-R branch.) Thanks, Brian PS: I'm a new user, so forgive me if I'm ask

querying for an empty set in m-r?

2006-04-11 Thread Brian Elliott
obtain all Tags with no associated articles? (m-r) I basically want to delete unused tags. Thanks, Brian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, sen

Re: querying for an empty set in m-r?

2006-04-12 Thread Brian Elliott
Max, Just wanted to thank you for responding to my question. You are correct that the list comprehension is pythonic, though I was ideally looking for a efficient method from a database perspective. Thanks, Brian On Apr 12, 2006, at 2:16 AM, Max Battcher wrote: > > Russell Cloran

Re: querying for an empty set in m-r?

2006-04-12 Thread Brian Elliott
Russell, Just wanted to thank you for responding to my post. You did interpret my question correctly, though I was obviously hoping to avoid using raw SQL. Anyway, thanks again. Brian On Apr 12, 2006, at 1:10 AM, Russell Cloran wrote: > > Hi, > > On Tue, 2006-04-11 at 21:2

Re: Job -Fullstack python expert ( Django framework)

2022-08-19 Thread Brian Odhiambo
I'm interested. On Thu, Aug 18, 2022, 22:03 Each1Teach1 wrote: > This project is very straight to the point. We are building a micro > service on top of Django framework. We currently have a virtual private > cloud on DO and will like to migrate to AWS in the nearest future. This > hosts our enc

Re: Mpesa integration.

2022-09-06 Thread Brian Odhiambo
Hello, @onjombafel...@gmail.com, seems the repo you share isn't public. Can you please make it, or add me to it if you don't mind. Thank you. On Tue, Sep 6, 2022 at 4:16 PM Onjomba Felix wrote: > Yeah > > On Tue, 6 Sept 2022 at 13:15, Lutalo Bbosa joseph > wrote: > >> Flutterwave gives everythi

psycopg 3 - getting attributeError

2022-11-04 Thread Brian Nabusiu
[image: attribute_error.png]Hello, I wanted to migrate my app to using psycopg 3. However, I got an error that insists using psycopg2, even when it was not installed in venv. So I decided to ammend some django code as illustrated by the inventor of psycopg3. However, 1. django complained

Re: Stuck with Django Tutorial Part 4

2023-03-14 Thread Brian Carey
I think you need to check your urls.py. ⁣Get BlueMail for Android ​ On Mar 14, 2023, 1:33 PM, at 1:33 PM, Nithin Kumar wrote: >question.id or question_id both gave the same result. >These are the views. > >from django.shortcuts import get_object_or_404, render >from django.http import HttpResp

Re: sub-list not showing

2023-03-16 Thread Brian Carey
A quick glance: In your temple for loop you have 'student_set' in the conditional and  'students_set' in the loop. That doesn't seem right. ⁣Get BlueMail for Android ​ On Mar 16, 2023, 9:01 PM, at 9:01 PM, nef wrote: >Hi Daniel, >Thanks for your feedback. >Please, is there anyone who can help

Re: Migration of tables from external database to new database

2023-03-21 Thread Brian Carey
mysqldump can be used to extract the table(s) from the old database. This creates a file with the SQL statements to recreate the table which can be read into into the new database with mysql command. As long as you are going from a MySQL DB to another this will work fine. If you are moving from

Re: Spies in California and America

2023-03-28 Thread Brian Carey
What the hell!? Don't spam the Django channel with your propaganda. ⁣Get BlueMail for Android ​ On Mar 28, 2023, 5:14 PM, at 5:14 PM, Michael Starr wrote: >So does anyone have an update on the police state and spying of >Democrat >Ukrainians in America yet? > >Michael > >-- >You received thi

Serving static files in production

2023-04-26 Thread Brian Odhiambo
Hello everyone, I am deploying a django project to a dedicated server. I have set nginx to find static files in this file "staticfiles". This is the setting in settings.py file: STATIC_ROOT = BASE_DIR / 'staticfiles' STATIC_URL = 'static/' After running collectstatic command, my project can't st

Re: Is programming in Django intellectually satisfactory

2023-04-26 Thread Brian Carey
If you want intellectual stimulation start with vanilla python or js. If you want to learn a framework. This is purely subjective. Either way I don't know how you'd do it without reading or a full-time tutor. If you find it too tiresome then maybe a little introspection is in order. ⁣Get BlueMa

Re: Serving static files in production

2023-04-26 Thread Brian Odhiambo
flexible >> besides. I would solve the above - which should work - before investigating >> that further. >> >> Regards, >> David >> >> On Thu, Apr 27, 2023 at 1:01 AM Brian Odhiambo < >> brianodhiambo...@gmail.com> wrote: >> >>>

Re: Serving static files in production

2023-04-26 Thread Brian Odhiambo
t; that further. >> >> Regards, >> David >> >> On Thu, Apr 27, 2023 at 1:01 AM Brian Odhiambo < >> brianodhiambo...@gmail.com> wrote: >> >>> Hello everyone, >>> I am deploying a django project to a dedicated server. >>>

Re: i need to learn more on django

2023-05-11 Thread Brian Gitau
also youtube will go a long way if you can't understand the documentation that well i suggest you watch and code along with dennis ivy https://www.youtube.com/@DennisIvy On Fri, May 5, 2023 at 7:48 PM Naomi Gentle-idyee wrote: > i just got started on django and though it looks complicated, i am

Re: Navbar

2023-05-18 Thread Brian Gitau
atleast give us your code sample On Thu, May 18, 2023 at 9:13 AM Michael Edet wrote: > Please help > > On Sun, 14 May 2023, 18:17 Michael Edet, wrote: > >> I have been having issues with my navbar and I'm using bootstrap >> >> The first one is what I want >> The second one is my outcome >> The

Re: Difficulty Rendering a Form

2023-05-18 Thread Brian Gitau
create a forms.py file add into the file import from django.forms import ModelForm from .models import * #the asterisk means you are importing everything from the models class name_of_form(models.ModelForm): class Meta: model = your_model fields='__all__'

Re: i am getting this error when i try to search in admin panel

2023-05-18 Thread Brian Gitau
The issue lies in specifying ForeignKey fields (state, district, and taluka) within the search_fields. ForeignKey fields cannot be searched using 'icontains' because it requires a direct string comparison. Instead, you can search based on the related field's attributes. To resolve the error, you n

Re: django windows authentication

2023-05-19 Thread Brian Gitau
Hello! Windows authentication is a method of authenticating users based on their Windows credentials. It allows users to log in to a system using their Windows username and password, eliminating the need for separate authentication mechanisms. In Django, you can integrate Windows authentication us

Re: dynamic django tables

2023-05-19 Thread Brian Gitau
which code do you have or you want the code example explaining everything? On Fri, May 19, 2023 at 3:59 PM Helly Modi wrote: > How to create dynamic models in django rest framework? > > Is there any chance to create dynamic models with APIs > > > > Any examples please send me thanks in advance.

Re: dynamic django tables

2023-05-21 Thread Brian Gitau
ield_class=models.BooleanField() >> else: >> field_class=models.EmailField() >> dynamic_model_attrs[field_name]=field_class >> >> >> dynamic_model = type(table_name, (models.Model,), >> dynamic_model_attrs) >> >>

Re: Looking for a Learning Buddy

2023-06-16 Thread Brian Carey
Hi John. For ML and python you'd probably get more responses from the Pytorch community. https://discuss.pytorch.org/ Good luck. ⁣Get BlueMail for Android ​ On Jun 16, 2023, 16:00, at 16:00, John Ayodele wrote: >Hi! It's John. > >I am currently looking for a learning buddy💡, for Machine Learn

Re: final project in django - help

2023-07-16 Thread Brian Carey
A little more information please. What can't you do and what errors do you get? ⁣Get BlueMail for Android ​ On Jul 16, 2023, 03:47, at 03:47, Alexandru - Gabriel Ionicescu wrote: >Hello, > >who can help me with the final project in django? in a week I have to >hand >it over and I got into troub

Setting Celery Config on Server

2023-08-05 Thread Brian Odhiambo
Hello, I'm using celery to automate some tasks in my django application. Following some tutorial online, I've done a .config setup for both celery worker and celery beat in this directory on my server: /etc/supervisor/conf.d/. However, when I reload the supervisor service, I get 502 Bad Gateway er

Re: any any help me to solve below error in my django project

2023-08-07 Thread Brian Gitau
change the naming of the urls like for the login from "login" to something like "login_page" because you are causing a clash in the views.py code since you are importing login and your url name is the same rename the logout too hope that helps On Mon, Aug 7, 2023 at 2:40 PM AKHIL KORE wrot

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: Apps vs Project

2012-01-28 Thread Brian Schott
n page 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 D

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: ANNOUNCE: Django 1.4 released

2012-03-24 Thread Brian Neal
On Friday, March 23, 2012 12:11:22 PM UTC-5, James Bennett wrote: > > Django 1.4 is finally here! > > For details, checkout the weblog: > > https://www.djangoproject.com/​weblog/2012/mar/23/14/ > > And the release notes: > > https://docs.djangop

serialize field name instead of "pk"

2012-04-06 Thread Brian Craft
I have a model with a "name" field that is the primary key. When serializing, this field gets serialized as "pk" instead of "name". Is there an easy way to get django to serialize with the actual field name instead of changing it to pk? -- You received this message because you are subscribed to

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 A

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

Denver Django users

2012-05-03 Thread Brian Rosner
don't hesitate to email me :-) Brian Rosner http://twitter.com/brosner -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/ahnYC8wsFNIJ. To post to t

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

2012-05-27 Thread Brian Schott
04(Foo, 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

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:

associate file upload to model

2012-07-28 Thread Brian Hunter
I'd like to use an upload handler function but confused as to how an uploaded file gets saved to a model's FileField. Eventually I will use a formset to allow for multiple files to be uploaded. #models.py class MyModel(models.Model): file = models.FileField(upload_to='attachments', blank=Tru

read only datatime field with a custom admin

2012-08-15 Thread brian downing
7; a read only attribute. In myAdmin if I add then 'adminform.form.Created_date' no longer exists. Next in 'myAdminForm' I added but this seems to be ignored. I also tried with the same effect. How should I create a read only datatime field? I'm using Djan

brute force protection

2012-08-30 Thread brian downing
form in the apps. Does anyone have suggestions about writing a brute force protector that will do the things I want? I posted this on stackoverflow <http://stackoverflow.com/questions/12135422/django-brute-force-protection> but didn't get a response. Brian -- You received this m

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 wrote: > Hi Everyone, > > I was hoping to get some input on how other people deal with complicated >

Syncdb is producing different databases on different machines.

2012-09-12 Thread Brian McKeever
On my development machine, upon freshly creating my postgresql database, when I run syncdb, it creates two invitation tables - invitation_invitationkey and invitation_invitationuser. On my production server, upon freshly creating my postgresql database, when I run syncdb, it only creates invita

Re: Syncdb is producing different databases on different machines.

2012-09-12 Thread Brian McKeever
', 'HOST': 'localhost', 'PASSWORD' : 'my password' } } On Wednesday, September 12, 2012 11:02:10 AM UTC-6, Cal Leeming [Simplicity Media Ltd] wrote: > > Are you using any sort of custom db router? (look for DATABASE_ROUTERS in >

Re: Syncdb is producing different databases on different machines.

2012-09-12 Thread Brian McKeever
ady exist? > Did you try running "manage.py sql" on the production server to see if the > SQL is printed out for the missing table? > > Cal > > On Wed, Sep 12, 2012 at 6:14 PM, Brian McKeever > > wrote: > >> I am not using any database router. &g

Re: Syncdb is producing different databases on different machines.

2012-09-13 Thread Brian McKeever
I appreciate your help. Thank you. On Wednesday, September 12, 2012 11:28:44 AM UTC-6, Brian McKeever wrote: > > I actually figured it out. > > I created a new virtualenv on my development machine and installed the > requirements to it, and from that virtualenv, syncdb fails

url pattern matching

2012-09-21 Thread Brian Patterson
Hi Everyone, I'm very new to Django and just trying to explore the basics. I'm having a problem with the url pattern matching. If i go to site: http://mysite:8000/paperforms/ I get the following error: Using the URLconf defined in mysite.urls, Django tried these URL patterns, in this order:

Re: url pattern matching

2012-09-21 Thread Brian Patterson
Thanks Larry, This is what my urls.py file looks like: from django.conf.urls.defaults import * from django.contrib import admin admin.autodiscover() urlpatterns = patterns('paperforms.views', 'IS THIS THE LINE I SHOULD MODIFY? url(r'^paperforms/$', 'index'), url(r'^paperforms/(?P\d+)/$', 'de

Re: Pip type error.

2012-09-26 Thread Brian Peiris
Thanks John, that was useful. This happens because powershell outputs UTF-16 by default. Another way to fix it is by using the out-file command with an ascii encoding specified: pip freeze | out-file -enc ascii requirements.txt On Sunday, March 11, 2012 4:17:59 AM UTC-4, John W. wrote: > > I kn

Re: [geo-django] Best way to capture geo-coordinate of an anonymous user?

2011-08-25 Thread Brian Bouterse
This is off topic, but I did this yesterday; here is a link that should help you along. http://code.google.com/apis/maps/documentation/javascript/basics.html#DetectingUserLocation Brian On Thu, Aug 25, 2011 at 2:06 PM, Ricardo L. Dani wrote: > Hello everyone, > > Anyone knows how to

Re: Problems during webcast (Using django for 40mil+ rows) - sorry!!!

2011-08-29 Thread Brian Bouterse
I really enjoyed what I was able to hear during the morning session. I ended up dropping out because of video problems, so I'm excited to see the recorded video when it is available. Thanks very much for putting this together. Thanks! Brian On Mon, Aug 29, 2011 at 5:41 PM, Cal Le

Django and Cherokee...

2011-08-30 Thread Brian Myers
'--enable-pthreads' '--prefix=/usr' '--localstatedir=/var' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' '--sysconfdir=/etc' '--docdir=/usr/share/doc/cherokee-doc' '--with-wwwroot=/var/www' '--wit

SCGI error

2011-09-10 Thread Brian Myers
efox error? Thanx, Brian -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. Fo

Re: DjangoCon US 2011 Videos

2011-09-21 Thread Brian Bouterse
Me 2. I was at the conference but missed one or two key sessions that I wanted to see. Brian On Wed, Sep 21, 2011 at 9:09 AM, Slafs wrote: > I would be interested also in watching those videos > > Regards > > > -- > You received this message because you are subscribed

Re: [pinax-users] Learn DJango first, then learn Pinax; or just learn Pinax straight-off?

2011-09-26 Thread Brian Rosner
before diving into Pinax. NOTE: the documentation linked is for the development version of Pinax. -- Brian Rosner http://twitter.com/brosner -- 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@

sekizai and django-registration tests failing

2011-09-27 Thread Brian Schott
;t setting this picked up in testing? 2. The registration error below means that django-registration isn't compatible with internationalization? Thanks, Brian == ERROR: test_12_validate_context (sekizai.tests.

<    2   3   4   5   6   7   8   9   10   >