Select Date Time Widget

2008-11-18 Thread brad
ich are in SelectTimeWidget). Any suggestions on the best way to "combine" these two classes in a robust, maintainable way? My SelectTimeWidget is located here: http://www.djangosnippets.org/snippets/1202/ Thanks! Brad PS: please ignore my horrible regex. its inefficiency was kindly

Re: Select Date Time Widget

2008-11-19 Thread brad
In case anyone runs across this, I've figure out A solution to this problem. There's a class in django.forms.widgets called MultiWidget that allows creating a widget that is composed of multiple other widgets. So, I've copied what was done with django.forms.widgets.SplitDateTimeWidget, and creat

Re: Do you recommend "Practical Django Projects"?

2009-01-05 Thread brad
On Jan 5, 2:21 am, HB wrote: > Do you recommend "Practical Django Projects" instead? I got this book as soon as it came out, and very soon after Django hit 1.0. It's a good book, and I learned a few "big picture" ideas from the sample apps, but I really had to read the docs to figure out how t

Re: ANNOUNCE: Django 1.0 released

2008-09-04 Thread brad
W00t! :) (i've been patiently waiting :)) --~--~-~--~~~---~--~~ 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

Re: Need suggestions on subversion structure for project

2008-09-05 Thread brad
s DRY to some degree, but it's fairly easy to just copy the appropriate settings file over to settings.py whenever I deploy the app. In my settings files, I just use /path/to/ django_working_dir/templates (since all of my various app templates are under one directory). I'm open to s

Soliciting Feedback on SelectTimeWidget

2008-09-29 Thread brad
Hi All, I've started working on a SelectTimeWidget that is very similar to the SelectDateWidget in django.forms.extras. http://dpaste.com/hold/81196/ This is my first look at Django's internals, so any (constructive) criticism is welc

Re: ifequal and DateQuerySet objects

2009-02-03 Thread brad
On Feb 2, 6:37 pm, Bret W wrote: > I've run into a problem with ifequal in one of my templates. > > I'm using date-based generic view to display all objects for a given > year. > urls.py: > (r'^taken/(?P\d{4})/$' ... > > Part of the extra_context I pass is a DateQuerySet object: > months = Photo.

Re: A Very Puzzling MySQL Issue Performance...

2009-02-06 Thread brad
> You may have query caching turned on. > > http://www.mysqlperformanceblog.com/2006/07/27/mysql-query-cache/ Also here (for mysql 5.0): http://dev.mysql.com/doc/refman/5.0/en/query-cache-configuration.html --~--~-~--~~~---~--~~ You received this message because y

Re: CMS on Google Appengine

2009-03-04 Thread brad
On Mar 4, 9:51 am, poematrix wrote: > Is it possible to utilize the Django CMS on Google Appengine? I've just starting looking into Google's App Engine as a possible place to deploy a Django Project. I can't answer your question directly, but there are a couple of articles that might help you:

Re: Sort of OT on the django book

2009-03-19 Thread brad
On Mar 19, 2:03 am, James Bennett wrote: > Well, what's not welcome is being asked the same question over and > over again when the publication date's listed on the Amazon page for > anyone and everyone to look at ;) Which just happens to be June 1, 2009. --~--~-~--~~~

Re: Django book mostly done?

2009-03-24 Thread brad
On Mar 23, 8:15 pm, Malcolm Tredinnick wrote: > On Mon, 2009-03-23 at 15:08 -0700, Graham Dumpleton wrote: > > [...] > > > More of a concern is that mod_python is still regarded as the most > > robust production setup. I can't see that mod_wsgi is even mentioned > > at all. > > Here's a wild th

Re: TemplateDoesNotExist at /admin/ on Linux (Xubuntu) while doing Django Tutorial 2

2009-03-24 Thread brad
On Mar 2, 10:14 am, Karen Tracey wrote: > On Sun, Mar 1, 2009 at 10:56 PM, Chris Verehhotti < > > chris.peresso...@gmail.com> wrote: > > > > however, in my Thunar file viewer, every icon has a little "X" on it > > > -- this makes me think it's a permissions issue, but I'm a Linux n00b > > > and

File Storage Suggestions

2009-09-08 Thread brad
I currently have a django site running on a single machine (web server + database + file storage). This site contains many multimedia files (audio, video, documents) that are uploaded and retrieved by end- users. We've reached the point where we need to push the multimedia storage off of this se

Re: Best way to store arbitrary key:value pairs?

2009-09-19 Thread brad
> I have an arbitrary set of key:value pairs I'd like to store in a > database.   It's my uderstanding that this is exactly the scenario for which CouchDB was created. There's django-storages that let's you interface with couchdb. I haven't personally used either, so I can just speculate. Good

Re: About using django-tinymce

2009-09-21 Thread brad
> The document says we can get a tinymce editor in the admin site after > this. But nothing different shows with mine. Just to clarify, are you trying to get tinymce displaying in your django admin? If so, you have to tell the admin for your BlogPost model to use the BlogForm. So do you have an

Re: django vps hosts

2009-09-24 Thread brad
+1 Linode. They've got great management tools. I've enjoyed their service. On Sep 24, 12:28 am, Kenneth Gonsalves wrote: > On Thursday 24 Sep 2009 7:24:25 am neri...@gmail.com wrote: > > > I think I'm ready to finally switch to a django vps host due to > > problems with django on DreamHost. Can

Re: Module ho.pis can not be found when running on apache

2009-11-24 Thread brad
On Nov 24, 1:43 pm, "philip.bar...@impaerospace.com" wrote: > When I try running my project via Apache I get a "No module named > ho.pisa" error message. > > However, when I run the same project from django's built-in dev > server, it works just fine. > Well, this sounds very similar to a probl

Re: Moved server, can't log in

2009-12-10 Thread brad
On Dec 10, 4:57 am, Oli Warner wrote: > A couple of days ago I moved a site from one server to another server and > changed the DNS on the domain so it stayed the same. After the DNS had > migrated everybody but me could log in. All other users trying to log into > the admin were getting the "Lo

Re: Hosting for django?

2009-12-22 Thread brad
> Has anyone had good experiences with hosting companies that I can use > for production django apps, with backups, etc.? If you're comfortable administering a linux box, I'd highly suggest Linode (http://www.linode.com/). Their service has been great for me. -- You received this message becaus

Re: Display first name and last name for user in dropdown lists in the Admin

2010-04-22 Thread brad
This thread has prompted me to blog about my solution to this problem. Here's how I've done this: 1) I created a UserModelChoiceField(ModelChoiceField) class whose label_from_instance method returns a string containing the User's full name (and username in parenthesis) 2) Create a ModelForm for t

Re: Updating a video rating using AJAX

2010-10-20 Thread brad
> I would like to do this without using a view or doing a form POST or GET of > any kind. Any pointers? Why? If you're building a web app, you should use HTTP to for the client to communicate with the app (AJAX is just another form of that communication). You're almost there, though, because yo

Re: Updating a video rating using AJAX

2010-10-20 Thread brad
Also, if you DO choose to pass JSON back to your client, you should serialize it first. See this: http://docs.djangoproject.com/en/dev/topics/serialization/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to d

Re: django and ldap

2010-02-03 Thread brad
> i need to authenticate users through ldap but i need also to store their > preferences in the database, i cant really understand if > what is the best way to go? One thing you might consider doing is just write a custom backend: (http://docs.djangoproject.com/en/1.1/ref/authbackends/#ref- authe

Re: django and ldap

2010-02-04 Thread brad
On Feb 4, 2:33 am, andreas schmid wrote: > @brad: can you show me some sample code for this? the code that I have is all very specific to where I work. I'd have to clean it up a bit to try to make it useful to you. There's also several other people who have posted snippets for b

1.1.2

2010-03-10 Thread brad
Hi all When can we expect a release of 1.1.2? Specifically I'm hoping to get a test bug fixed - http://code.djangoproject.com/ticket/12720 Thanks Brad -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group

Re: 1.1.2

2010-03-10 Thread brad
Thanks both. We'll use the 1.1 branch head then On Mar 11, 4:22 pm, James Bennett wrote: > On Wed, Mar 10, 2010 at 9:16 PM, brad wrote: > > When can we expect a release of 1.1.2? Specifically I'm hoping to get > > a test bug fixed -http://code.djangoproject.com

NewForms Question..

2007-04-10 Thread brad
Hello, I am using NewForms with my current Django project, but I am stumped on one error message. Here's the error message: Cannot resolve keyword 'organization' into field. I am assuming that there is something wrong in my forms.py file in the application folder. Here's what I have in forms.py, a

Re: NewForms Question..

2007-04-11 Thread brad
You are exactly right. Thanks for your time and help. --~--~-~--~~~---~--~~ 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

Template For Loops

2006-09-25 Thread brad
Hello. I am having a little trouble retreiving data from my models so that I can use the data in my templates to create a html select. The template creates the html select, but the select is not populated with any options, like I want it to. Thanks in advanced for any and all ideas to get this tem

Re: Template For Loops

2006-09-25 Thread brad
Now I am getting an error of: Exception Type: TypeError Exception Value:'tuple' object is not callable Exception Location: E:\dp1\mysite\..\mysite\urls.py in ?, line 10 And line ten of 'urls.py' is the following: (r'^select/$', 'mysite.polls.views.select') --~--~-~

urls.py error

2006-09-25 Thread brad
Hello. I have recently received help on a related post that can be found here: http://groups.google.com/group/django-users/browse_thread/thread/272b01561e0eb43d But, I am getting an error now when I try to access my templates. Here's the error & thanks for all of the help that I may receive. Than

Re: urls.py error

2006-09-25 Thread brad
from django.conf.urls.defaults import * urlpatterns = patterns('', # Example: # (r'^mysite/', include('mysite.apps.foo.urls.foo')), (r'^polls/$', 'mysite.polls.views.select'), (r'^polls/(?P\d+)/$', 'mysite.polls.views.detail'), (r'^polls/(?P\d+)/results/$', 'mysite.polls.views

Re: urls.py error

2006-09-25 Thread brad
Opps. I posted before I treid all that I could try. I found my error thanks to you help Don Arbow and everybody's help on my last post. Thanks you all. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: urls.py error

2006-09-25 Thread brad
Thanks Shaun Li. I just figured that out, but thank you because I very well could have still been stumped until you posted. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group

Lost in the flow

2006-09-26 Thread brad
Hello. I have been reading through as much of the AJAX topics and AJAX tutorials surround Django as I have had time for, but I am lost in the flow of things. First some background information, I have three dynamic & dependent selects (dropdown lists). The options for the selects are populate

A view that looks up a model field

2006-10-01 Thread brad
Hello. I am trying to build a view to lookup a model field and return an array based on the data sent to the view. The goal is to send the contents of the "value" tag in an html select statement( i.e. in OPTION to send the SOME_VALUE part) to a Django view with a Dojo request call, have the Django

Re: A view that looks up a model field

2006-10-01 Thread brad
I think that I need to modify models.py to fit the scheme I thought that I had. The following is a table representation of what I thought I had with my current models.py: Table: Game id game == 0 0_Option1 1 1_Option1 1 1_Option2

Re: A view that looks up a model field

2006-10-01 Thread brad
Alright I got my model problem corrected. I needed to use the ForgeinKey() statement, so if there are any self-confusing newbies who are having this problem refer to: The url Matthew Flanagan provided to us in one of the replies above, and Tutorial 1 in the Django documentation ((( http://www.djan

QuerySet help

2006-10-24 Thread brad
Below is part of my models.py file and I am having trouble getting a queryset that includes all of the information that I need it to include. When I am in "manage.py shell", I import the model Data and I execute Data.objects.all(), what is returned to me are all of the prices in the database tabl

Re: QuerySet help

2006-10-24 Thread brad
Great! Thank you both for taking the time to reply and giving acurate advice. I appreciate it. --~--~-~--~~~---~--~~ 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@

Is Django the right tool?

2006-08-31 Thread brad
Hello. I am wondering right now whether Django will help speed up my project and help me or whether Django isn't the best tool in this situation. My project involves a web application that grabs thousands of prices, quantities and product names from a handful of predefined sites. The application

Re: Is Django the right tool?

2006-08-31 Thread brad
Thanks for the input Bryan and Adrian. I have to agree and say that Django could be an asset to this project. Bryan or anyone else could you name a few useful packages that will help me scrape the prices from the list of websites that I have? Thanks in advanced for any future help I get. Thank you

Creating a project

2006-09-10 Thread brad
On Django's documentation website there is an article titled "Writing your first Django app, part 1", which has the URL of http://www.djangoproject.com/documentation/tutorial1/, there is a paragraph that says to start a new project we should run the command "django-admin.py startproject mysite" fr

Re: Creating a project

2006-09-10 Thread brad
Great thanks. When I put the full path of the location of django-admin.py, then the command works. However, when I don't put the full path in and just type the command "python django-admin.py startproject mysite" then I get the error: 'python' is not recognized as an internal or external com

Re: Creating a project

2006-09-10 Thread brad
Well I finally stumbled upon a very useful documentation page on Python.org. Thanks again for all of the input that everybody gave becasue that input led me to find the right documentation. So...if anybody is having trouble with running python commands in Windows command prompt or having trouble w

Re: No module named models again

2013-02-06 Thread Brad
On Wed, 2013-02-06 at 10:31 -0800, frocco wrote: > Exception Location:C:\ndsutil\Menus\CTD-NDSUser\PycharmProjects\ntw > \checkout\views.py in , line 5 Django gives you the line in the file where the error occurs so you don't need to track it down ;-) It's probably failing when you try to import s

Re: No module named models again

2013-02-06 Thread Brad
On Wed, 2013-02-06 at 11:49 -0800, frocco wrote: > Line 22 does not make any sense to me as to why it is failing. > If I remove receipt, it runs fine It can be surprising sometimes what code can cause other code to get imported and run. My guess is, in trying to find your url route there, Django l

Re: How do I get the integer of a decimal string?

2013-02-09 Thread Brad
Convert it to float first: int(float("14.00")) On Sat, 2013-02-09 at 09:27 -0800, frocco wrote: > Hello, > > > I am reading a cdv file and one col has the value of "14.00" > I want to get the integer value if 14 > I tried int("14.00") > > > Thanks in advance > > -- > You received this messag

Re: Why i can't get the debug informations (in case of error) when i run LiveServerTestCase tests?

2013-02-09 Thread Brad
I admit it is vexing that Django overrides what you have specified in the settings file in this case, but it doesn't seem to be hard to override. I simply added "settings.DEBUG = True" to the beginning of the "setUp" function for the test class and that seems to do the trick. Btw, I see tracebacks

Re: Collectstatic not working

2013-02-10 Thread Brad
The problem is that you have your STATIC_ROOT as one of the STATICFILES_DIRS. The STATIC_ROOT directory should be empty, that is where all the static files from different places will be gathered when you run collectstatic. You should probably create a static directory under the myapp directory and

Re: How do I get the current user in a model?

2013-02-11 Thread Brad
Sounds like you are maybe calling a user method from a template? You will probably want to create a custom tag or filter: https://docs.djangoproject.com/en/1.4/howto/custom-template-tags/ A filter would look like this: {{ my_model_item|price:request.user }} And the filter itself something like th

Re: How to abstract model methods to a separate class?

2013-02-26 Thread Brad
On Tue, 2013-02-26 at 07:53 -0800, Richard Brockie wrote: > class myLinksClass: > basepath = 'testing/' > > def self(self): > return "%s" % (self.basepath, ) > > def view1(self): > return "%s%s" % (self.basepath, 'view1', ) > > def view2(self): > return "%

Re: cx_Oracle error: ImproperlyConfigured

2011-04-21 Thread brad
This may be related to Oracle's shared libraries not being in the path recognized by your web server. I created hard links to the Oracle shared libraries in /user/local/lib to get cx_oracle working. I have a blog post that outlines what I did, here: http://bradmontgomery.net/blog/gahhh-django-vi

Re: [ask for help] how to solve this issue: "DatabaseError at /admin/myapp, no such column: myapp.myvar"

2011-05-21 Thread brad
e corresponding to that model and run syncdb again. You should also consider looking at south (http://south.aeracode.org/). It provides migration tools that let you add columns to existing models via a managment command. - Brad -- You received this message because you are subscribed to th

Re: ManyToManyField to self with Intermediary

2008-09-01 Thread Brad Jasper
Did anything ever happen with this? I'm in the same position. I understand the reasoning behind the restriction but I think it would be useful to create custom intermediary tables. - Brad On Aug 17, 3:04 am, squeakypants <[EMAIL PROTECTED]> wrote: > Really? Still though, with th

Re: ManyToManyField to self with Intermediary

2008-09-04 Thread Brad Jasper
I'm sure there was a good reason why you guys disallowed this but I'm willing to give it a shot anyway. I'll report back if I run into any problems. Cheers, Brad On Sep 1, 11:10 pm, Brad Jasper <[EMAIL PROTECTED]> wrote: > Did anything ever happen with this? I'

Best practice for serving restricted or premium media

2010-04-20 Thread Brad Buran
I'm currently researching Django as a potential framework for a web application I am building. We plan to make a variety of media (images and videos) free on our website; however, we want to have some premium media available only when certain criteria are met (e.g. the logged-in user is of a certa

Re: Best practice for serving restricted or premium media

2010-04-21 Thread Brad Buran
approaches, but I can now use Google to find and review some tutorials regarding each of these. Will they all work on shared hosting? Brad On Tue, Apr 20, 2010 at 10:50 PM, Graham Dumpleton < graham.dumple...@gmail.com> wrote: > > > On Apr 21, 12:09 pm, Brad Buran wrote: > > I

Setting list_display for InlineModelAdmin

2010-04-21 Thread Brad Pitcher
r the inline. I don't understand, the documentation says that TabularInline and StackInline both inherit from ModelAdmin, so they should also use list_display. What am I missing? I'm using Django-1.1.1 Thanks, Brad -- You received this message because you are subscribed to the Google

Re: Setting list_display for InlineModelAdmin

2010-04-21 Thread Brad Pitcher
Thank you for setting me straight. What a dumb mistake. :) On Apr 21, 11:03 am, Daniel Roseman wrote: > On Apr 21, 3:20 pm, Brad  Pitcher wrote: > > > Hi guys, > > This is driving me a little crazy, so I hope someone can offer good > > advice.  I've specified a

auto generate "dummy" content (e.g. Lorem ipsum generator for Django)

2010-04-23 Thread Brad Buran
e if anyone has done something similar. I tried searching for a similar app, but couldn't find anything. Brad -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com.

Re: File Upload with Progress Bar

2010-06-02 Thread Brad Pitcher
ss reports. If you are looking for a demo, there is one linked in the article creecode posted. -Brad On May 30, 12:23 pm, Venkatraman S wrote: > HI creecode, > > Can you share the project please? I can probably work on it and see what is > happening. > Till now, i havent even been a

Re: File Upload with Progress Bar

2010-06-02 Thread Brad Pitcher
eports until the file has finished uploading. It's actually driving me a bit crazy so I'm going to have to move on to something else for a while. On Wed, Jun 2, 2010 at 9:16 PM, Venkatraman S wrote: > Does this work with the Django development server? > > > On Thu, Jun 3, 2010 at

Re: File Upload with Progress Bar

2010-06-03 Thread Brad Pitcher
x27;t streaming the file upload to django, I'm currently investigating that. On Jun 2, 9:24 pm, Brad Pitcher wrote: > Sort of, that's what the default is in the demo, but now I've noticed I have > the same problem with apache progress reporting as I did using django > progr

Re: File Upload with Progress Bar

2010-06-03 Thread Brad Pitcher
; > opposition to flash based solution. Also, i have not been to get it > > > > working > > > > > inspite of it being not an ideal solution. > > > > > I hear that there are some issues with filebrowser since it uses > > > > Uploadify. > > > > &g

best practice for widget that edits multiple model fields

2010-07-20 Thread Brad Buran
is, then I would use model.save() to deserialize the data in the combined_date_info field and save it to the appropriate model fields. This solution seems a bit hackish and not very DRY. Are there better approaches? Brad -- You received this message because you are subscribed to the Google G

Re: best practice for widget that edits multiple model fields

2010-07-21 Thread Brad Buran
elds/#howto-custom-model-fields > > On Jul 20, 10:00 pm, Brad Buran wrote: > > I have a group of fields (date_start, date_end, all_day) that I would > like > > to reuse in several models. I've defined a MultiWidget that displays two > > split datetime fields plus a ch

Re: best practice for widget that edits multiple model fields

2010-07-21 Thread Brad Buran
class EventDateRange(DateRange): date = ForeignKey(Event) class Event(Model): #various other fields required for event Does this seem like it would make more sense? Thanks, Brad On Wed, Jul 21, 2010 at 8:03 AM, Scott Gould wrote: > My immediate thought upon reading your post was that y

Sorting related model

2010-09-11 Thread Brad Buran
(revision=F('page__current_revision')).order_by('created').select_related() pages = [content.page for content in qs] This works fine, but is there a more straightforward way to do this? Thanks, Brad -- You received this message because you are subscribed to the Google Groups &quo

problem reversing namespaced URL (application instance not recognized?)

2010-10-17 Thread Brad Buran
eyword defined in the top-level urls.conf to know which : def display(request, wiki, slug): try: wiki = models.Wiki.objects.get_or_create(wiki) page = models.Page.objects.get(wiki=wiki, slug=slug) except models.Page.DoesNotExist: url = reverse('%s:wiki_page_404&#

Re: problem reversing namespaced URL (application instance not recognized?)

2010-10-17 Thread Brad Buran
x27;test.wiki.urls', app_name='wiki', namespace='help'). Sorry for the trouble, Brad On Sun, Oct 17, 2010 at 6:14 PM, Brad Buran wrote: > I'm trying to reuse a wiki app twice in my project; however, whenever I > call the reverse function, it returns the

Re: Match from list in URLconf

2007-07-30 Thread Brad Siegfreid
If all you have is a list of users to look through the suggestions work just fine. Otherwise, it's easier to set a common root for that particular lookup, such as mysite.com/user/matt. This avoids the problem of mixing in a variable URL value with other parts of your site. It also maps nicely to a

Re: Match from list in URLconf

2007-07-30 Thread Brad Siegfreid
if the categories were also numerous and > data-driven, you'd need a different solution to those mentioned. I > could always use "www.mysite.com/users/categories/premium", but it > doesn't have quite the same feel. > > > > On Jul 30, 3:56 pm, "Brad Siegfr

Re: Considering Django for web-application. Your thoughts please.

2007-07-30 Thread Brad Siegfreid
There's some big questions in there. Maybe you should stick to one for now and then get follow up on the details if you decide on Django: Python and Django vs Java and some enterprise framework. I use Java for my main project and also looked at Seam and JBPM. My day project is limited to Java for a

Re: Considering Django for web-application. Your thoughts please.

2007-07-30 Thread Brad Siegfreid
On 7/30/07, Snirp <[EMAIL PROTECTED]> wrote: > > > > Was BPM not a issue in these smaller projects, or did you have a way > of dealing with this? I am much less experienced a developer and want > to avoid using the wrong tool and hammering a screw in. On the other > hand, however much I was impress

Re: Considering Django for web-application. Your thoughts please.

2007-07-30 Thread Brad Siegfreid
> > The concerns are few: > - lack of big corporate backing (like Seam) and guaranteed sound > documentation Lack of big corporate backing is seen as an advantage to some. They need to make money somehow and support contracts can be very lucrative. Small teams can do amazing work. Just look at

How to I unsubscribe from this group

2007-08-15 Thread Brad Cathey
No offense, but we¹ve decided to head in another direction and now I can¹t get off the list. clicking the unsubscribe link is not working (I get a confirmation that I am not part of this group), but the emails flow. Thanks --~--~-~--~~~---~--~~ You received this m

Re: DB Models best practice

2008-06-13 Thread Brad Wright
On Jun 12, 11:44 pm, "Bartek Gniado" <[EMAIL PROTECTED]> wrote: > Instead of over complicating it like this. Why not just use memcached or > django's own cache? He's referring to: http://www.djangoproject.com/documentation/cache/ --~--~-~--~~~---~--~~ You receive

Using newforms to show a single form for multiple models

2007-05-13 Thread Brad Fults
I'm in a situation where I have a List model class and a ListItem model class. The ListItem class has a ForeignKey to the List class with `edit_inline=models.STACKED, num_in_admin=10`. In the admin interface for adding a new List, this is represented perfectly: it shows the fields for the List obj

Great Free Surprise

2007-01-19 Thread Nancy Brad
*Media Mall Toolbar : Advanced 1-click System to the Following Items :* *- 200 Live TV Channels - FM Radio With alot of Radio Stations and You Can Add More. - Live WebCams around The World - Tools and Essentials as : Online Spyware Scanners,Online Virus Scanners and Online Firewall S

Watch Online Movies for Free

2007-01-21 Thread Nancy Brad
Now You Can See Live TV Channels and Live Exciting Movies and Even Download DVD Movies if You Want for Free at : http://clipurl.com/?GYU620 With My Best Wishes To Enjoy -- See Our Magic , You Will Be Surprised http://www.mediamall.tk --~--~-~--~~~---~--

Re: I can't install django on my mac. I'm not sure why. Details inside.

2012-09-09 Thread Brad Pitcher
The question is, is django inside one of those directories? It should probably be installed to C:\Python27\lib\site-packages so there would be a C:\Python27\lib\site-packages\django directory. Is it there? On Sun, Sep 9, 2012 at 3:41 PM, Shayan Afridi wrote: > Interesting. I'm doing it on my PC n

Re: I can't install django on my mac. I'm not sure why. Details inside.

2012-09-09 Thread Brad Pitcher
I can't speak authoritatively on this, since that's not how it installs in Linux, but in my understanding the contents of the django.pth file should be the directory django has been installed to. Check the contents of that file to see if everything is in order. An alternative to this is to update P

Re: I can't install django on my mac. I'm not sure why. Details inside.

2012-09-09 Thread Brad Pitcher
Glad to here you got it working, and please let us know if you have any other questions. On Sun, Sep 9, 2012 at 5:52 PM, Shayan Afridi wrote: > It works! Thank you all so much. It feels great to know that there is a > very responsive and helpful support system for django users. Thanks again! > >

Re: Possible spam from mailing list? ("China Mobile")

2012-09-10 Thread Brad Pitcher
Yes, I received a similar email about the post "Re: I can't install django on my mac. I'm not sure wh..." which I recently responded to. Not sure what to make of it. On Mon, Sep 10, 2012 at 12:27 PM, Kurtis wrote: > I just received a very unusual e-mail that included a recent post's > subject. T

Re: static files

2012-10-11 Thread Brad Pitcher
I believe the best way of doing this is to have your image(s) in static/images and your css in static/css. Then you can use a relative URL to set the background image like so: background-image : url("../images/PAE.jpg") It's better not to have any CSS mixed in with your HTML anyway. On Oct 11, 2

Re: Best way to detect if a user has changed password

2012-10-24 Thread Brad Pitcher
You could use a "pre_save" signal. kwargs['instance'] will contain the updated record and you can get the old record with "User.objects.get(id= user.id) if user.pk else None". I've done this in the past to check for a changed email address. On Wed, Oct 24, 2012 at 2:23 PM, Roarster wrote: > I'm

Re: How to reference model instance fields dynamically

2012-10-26 Thread Brad Pitcher
You can use python's setattr function to do this: for k,v in fields.iteritems(): setattr(inst, k, v) On Fri, Oct 26, 2012 at 8:37 AM, Chris Pagnutti wrote: > Say I have a model like > class MyModel(models.Model) >name = models.CharField(max_length=100) >number = models.IntegerField()

Re: How to reference model instance fields dynamically

2012-10-26 Thread Brad Pitcher
Use setattr's counterpart, getattr :-) getattr(inst, k).add(relatedObject) On Fri, Oct 26, 2012 at 5:16 PM, Chris Pagnutti wrote: > Awesome. Thanks Brad. Now the question is, what if the attribute is a > ManyToManyField. > > e.g. > inst.k.add(relatedObject) > > How

Re: selenium test for fallback page loaded from app cache when server is unavailable

2012-11-03 Thread Brad Pitcher
Are you having the selenium test go to online.html first like in your manual test? Maybe you need to have selenium hit offline.html first and cache that page? On Nov 3, 2012 6:14 AM, "Joao Coelho" wrote: > Hi. I haven't been able to figure this one out. Trying to write an > automated test that us

Re: bar charts

2011-11-07 Thread Brad Montgomery
+1 for Google Charts. For small stuff (1 chart), I just render JavaScript in the of my html templates. For more complex stuff, you could write a view that *just* renders JavaScript and include it via a script tag. Just make sure to serve it with MIME type "application/javascript" Here's mor

Re: Email notifications app

2012-11-23 Thread Brad Pitcher
Checkout django drip: https://github.com/zapier/django-drip On Nov 23, 2012 7:22 AM, "Arnaud BRETON" wrote: > Hi everybody, > > I'm looking for a powerful third-app for Django to manage time-driven > email notifications. > > I found django-notifications ( > https://github.com/jtauber/django-notif

Re: newbie needs to copy a record in admin to a new record

2013-01-11 Thread Brad Pitcher
s and copy them. - Brad Pitcher Software Developer (702)723-8255 On Fri, Jan 11, 2013 at 7:06 AM, frocco wrote: > Hello, > > I am just learning django and want to allow a user in admin to copy a > record from the list to create a new record and make changes. > This wi

Re: Help - No module named models

2013-02-04 Thread Brad Pitcher
On Sun, 2013-02-03 at 10:04 -0800, frocco wrote: > from catalog.models import Category It is probably this line. Maybe there is no __init__.py file in the catalog directory? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from th

Re: Why i can't get the debug informations (in case of error) when i run LiveServerTestCase tests?

2013-02-09 Thread Brad Pitcher
Have you tried adding a: import pdb; pdb.set_trace() in the view to debug that way? On Jan 30, 2013 12:31 AM, "Alessandro Pelliciari" wrote: > Thanks for the answer! > > Because i'm developing and integrating some flow (social registration etc) > through tests. > > So, instead of creating every t

Re: Upgrade to django 1.5

2013-03-04 Thread Brad Pitcher
It should be safe, just test things out. Also, if you have DEBUG=False you must also include an ALLOWED_HOSTS array, which became required in Django 1.4.4: https://www.djangoproject.com/weblog/2013/feb/19/security/#s-issue-host-header-poisoning It should contain a list of domains used to access th

Re: Suggestion for using distinct on django 1.4+ in your unit tests?

2013-03-06 Thread Brad Pitcher
I believe sqlite supports "distinct" just not "distinct on". I have always managed to find workarounds using "distinct" anywhere I formerly used "distinct on". On Mar 6, 2013 7:01 AM, "Toran Billups" wrote: > I recently upgraded to django 1.4 and found that my "distinct" queries > don't work anym

Re: Can't store valid JSON in JSONField because of SubfieldBase/to_python issues

2013-03-21 Thread Brad Jasper
AM UTC-4, Brad Jasper wrote: > > I maintain django-jsonfield, a project that allows you to store arbitrary > JSON objects in the database. > > It's having a problem with the way to_python is called while > using SubfieldBase. A full explanation of the problem is here

Implementing query with Django ORM - left join with length() and replace() functions

2013-04-05 Thread Brad Buran
gth(a.ipa) = length(b.ipa) and a.ipa = replace(b.ipa, '%s', '%s') The idea of this query is to find all pairs of words that differ by one phoneme (e.g. "mat" and "bat" differ by only one sound). Is this query possible to accomplish with the ORM, or do I need

Re: django-social-auth problem with facebook

2013-04-15 Thread Brad Pitcher
In my experience, that particular error always means that the database doesn't match what you have in your models. Try a syncdb and/or check your south migrations to make sure your database is up to date. - Brad Pitcher Software Developer (702)723-8255 On Sun, Apr 14, 2013 at 11:

  1   2   >