Re: Using a model method in ModelAdmin fieldsets

2009-01-08 Thread Andy
The better approach would be to specify a custom form in your ModelAdmin. This way your fieldset definition could include anything that's specified in your custom form. For Example: class SampleModel(models.Model): email = models.EmailField... firstname = models.CharField... class Sampl

Re: Using a model method in ModelAdmin fieldsets

2009-01-08 Thread Andy
).__init__(self, *args, **kwargs) ... self.fields['lastname'].initial = ... On Jan 8, 3:14 am, Andy wrote: > The better approach would be to specify a custom form in your > ModelAdmin.  This way your fieldset definition could include anything > that's speci

Re: Database connection closed after each request?

2009-07-24 Thread Andy
On Jul 24, 4:39 pm, James Bennett wrote: > Except this is what it turns into. So suppose a patch is added which > does nothing except keep the database connection open; well, that's > problematic because it means a server process/thread that's not > handling a request at the moment is still tying

Re: Database connection closed after each request?

2009-07-24 Thread Andy
On Jul 23, 10:50 pm, Glenn Maynard wrote: > In this case, that's a terrible-performance-by-default approach. > (It's also not a default, but the only behavior, but I'll probably > submit a patch to add a setting for this if I don't hit any major > problems.) Agreed. Please share any patches you

Re: Database connection closed after each request?

2009-07-24 Thread Andy
On Jul 24, 8:54 pm, Alex Gaynor wrote: > "Seen under this light, the additional 150ms latency resulting from non- > persistent DB connection is huge - it implies almost 30% fewer > customer orders. And it has nothing to do with traffic." > > I'd just like to take a moment to point out that that s

Re: How to scale out django apps?

2009-04-13 Thread Andy
Tim, Thanks for the helpful answers. As for specific details about my app, right now I'm still in the design phase. It will start small, but hopefully it will get popular quickly. So I don't know how big the Db will be or how many users will there be. What I'm trying to do is to make sure there

Re: How to set up MySQL replication on Django?

2009-04-19 Thread Andy
Great. Thanks. On Apr 19, 7:59 am, Alex Koshelev wrote: > There is an existing production-ready application [1] that allows you > to use MySQL replication facilities. It is formed as django database > backend with some additional functional. > > We use it for our high-load Django powered content

Re: Hidden field in Admin without label

2009-05-07 Thread Andy
field property. (so still a hack!) Andy On May 7, 10:01 am, PierreR wrote: > Thanks for your reply. > > My intention is to use this field as a version/timestamp to implement > a form of optimistic locking. I need to receive it back from the user > through a form and check it against

Re: Is there a version of @login_required that requires the user to log in as a specific user?

2009-05-25 Thread Andy
On May 24, 9:54 pm, Brian Neal wrote: > On May 24, 6:50 pm, Continuation wrote: > > > For example, I have a view edit_profile that edits a user's profile. > > Obviously I want to make sure that each user can edit his own profile > > only. > > > So before the profile of user A is being edited b

Newbie needs help

2009-05-30 Thread Andy
Hello, I am new to Django and Python but am determined to learn. I am creating a page that asks for some user input. My model looks like this: from django.db import models from django.forms import ModelForm floor_plan_choices = ( ('A', 'Square'), ('B', 'Rectangular'),

Re: How to modify and object before saving it in ModelForm [was] Newbie needs help

2009-05-30 Thread Andy
Thanks Kenneth. I'll check out the link and use better subject lines in the future...unless you want to send a donation! On May 30, 1:38 am, Kenneth Gonsalves wrote: > On Saturday 30 May 2009 12:47:27 Andy wrote: > > > I would like to set the order_number in my model t

Confirm email by matching on form

2009-11-15 Thread Andy
I have a form with an email field and email confirmation field. I want to check the form input to make sure the two fields match. So far I can get the error message 'Email addresses do not match.' to display, but if they do match I am getting an error 'InterfaceError at /order/ Error binding para

Re: Confirm email by matching on form

2009-11-15 Thread Andy
I should say that I am using Django 1.1.1, Python 2.5 and sqlite3. Thanks for your help. On Nov 15, 9:29 am, Andy wrote: > I have a form with an email field and email confirmation field.  I > want to check the form input to make sure the two fields match.  So > far I can get the erro

Re: Confirm email by matching on form

2009-11-16 Thread Andy
Thank you all for your replies. Karen, both good points. pjrharley, I agree with Dennis. If the user is required to re-type their email address, then that in combination with Django's simple built in email validation should be sufficient. I am using a ModelForms right now. If I remove email_co

Difficulty using anchor tags in templates

2009-11-29 Thread Andy
I have a model named Articles with title and content fields. Each page of my site should display a list of the titles, linked with anchor tags to the corresponding area of the Resources page which displays all the titles and content. I am having trouble figuring out how to pass the #title info.

Re: Difficulty using anchor tags in templates

2009-11-29 Thread Andy
Hmm, still not clear. My url is simply this: (r'^resources/$', views.resources) I have read that I need to use HttpResponseRedirect to make use of #anchor tags. Is this not the case? Thanks for your help! On Nov 29, 8:38 am, rebus_ wrote: > 2009/11/29 Andy : > > >

Re: Difficulty using anchor tags in templates

2009-11-29 Thread Andy
Fantastic! I think I was overthinking my problem. Thanks a lot! On Nov 29, 10:36 am, rebus_ wrote: > BTW here is an example: > > When you click this > link:http://en.wikipedia.org/wiki/Fragment_identifier#Processing > > your browser will open uphttp://en.wikipedia.org/wiki/Fragment_identifierp

How to choose one row of data

2009-12-09 Thread Andy
This is a very beginner question: Say a user has just filled out a form and hit the submit button. They are redirected to an order confirmation page. How can I retrieve the one row of data the user just submitted and display it on the order confirmation page? Here is my simple View so far, but

Re: How to choose one row of data

2009-12-11 Thread Andy
Thanks for the response Shawn. I have done what you suggested, assigning a variable named order_info and can use it if I use render_to_response in my order view. But I want to use HttpResponseRedirect after the form is saved. I'm thinking I need to get the order_info variable into my order_compl

Re: How to choose one row of data

2009-12-11 Thread Andy
.html', order_info, articles) On Dec 11, 9:30 am, Daniel Roseman wrote: > On Dec 11, 3:13 pm, Andy wrote: > > > > > > > Thanks for the response Shawn.  I have done what you suggested, > > assigning a variable named order_info and can use it if I use > > ren

Re: How to choose one row of data

2009-12-11 Thread Andy
Tom - DR's method is simple and effective, but I'm guessing you say it's the worst way because it creates an unnecessary database request. Is this a correct assumption? If not, please explain. On Dec 11, 10:58 am, Tom Evans wrote: > On Fri, Dec 11, 2009 at 4:44 PM, Andy wr

Horizontal database sharding implemented by model sharding?

2010-07-20 Thread Andy
What is the best way to implement horizontal database sharding through Django? For example, say I have a class Note. I want to shard the database table Note into N shards based on the Note author's id - author.id % N 1) Should I shard the class Note into N corresponding classes - Note0, Note1, No

Possible to create models programatically?

2010-07-20 Thread Andy
I have N models that are identical except the model names (i.e. they all have the same attributes, methods): MyModel0, MyModel1, MyModel2, ... Normally I'd need to type out the model definitions for those N models by hand inside models.py. Is there a way to generate the N model definitions progr

Re: Possible to create models programatically?

2010-07-22 Thread Andy
> > I'm not completely sure what you're trying to do, but I have a blog > entry on creating temporary models programmatically - it might help > you:http://blog.roseman.org.uk/2010/04/13/temporary-models-django/ What I'm trying to do is to shard my database horizontally. For example say I have a m

Re: Possible to create models programatically?

2010-07-22 Thread Andy
> > Why not use the facilities for sharding that are built in? > > Database routers [1] are designed to allow you to have a single model > definition, but decide which database connection is used at runtime > based on properties of the objects involved. > > [1]http://docs.djangoproject.com/en/dev/t

Re: scaling my site

2010-07-23 Thread Andy
I'd stay away from Amazon if like you said money is a concern. Amazon web services are extremely overpriced. For the same amount of money you'd be able to get much better performance by renting a dedicated server or even a VPS. Also if you're running databases then IO performance is critical. The

How to use the Database Router?

2010-07-23 Thread Andy
I'm trying to shard my database horizontally. In another thread (http://groups.google.com/group/django-users/ browse_thread/thread/2748cdf205b5cf3e/ e8fe5087748d3c43#e8fe5087748d3c43) I was told it's best to use the Database Router to implement horizontal sharding. But I can't figure out how to u

Re: How to use the Database Router?

2010-07-23 Thread Andy
> Ah - this is possibly the source of confusion. Django's Routers can > shard to different databases, but not to different tables in the same > database. > > Why do you want to shard into different *tables*? The usual > interpretation of sharding (at least, the usual interpretation that > *I'm* fa

Re: How to use the Database Router?

2010-07-24 Thread Andy
> The db_for_read() and db_for_write() methods accept a model, and > usually a hint. If provided, the hint will be the instance the > database operation is acting on (or an instance related to the > operation). These methods return the alias of the database that should > be used to perform the rea

How to limit entries from each user to a specific number N (N > 1)?

2010-08-10 Thread Andy
I have an application that's similar to the typical Q&A system. A user asks a question. other users submit answers to that question: - Each user is allowed to submit up to N answers to each question, where N > 1 (so, say each user can submit no more than 3 answers to each question) - A user can e

How long do objects live?

2010-08-11 Thread Andy
When I create an object in Django, how long does it live? When Django finishes responding to a HTTP request, the Python process lives on to serve the next request. Does that mean all those objects that were created would continue to hang around? -- You received this message because you are subsc

Any job queue systems that integrates with Django & allow scheduling jobs by date?

2010-08-17 Thread Andy
I have a Django application. One of my models looks like this: class MyModel(models.Model): def house_cleaning(self): // cleaning up data of the model instance Every time when I update an instance of MyModel, I'd need to clean up the data N days later. So I'd like to schedul

How does Django handle auto-increment PK when a model is sharded horizontally into multiple databases?

2010-08-19 Thread Andy
I have a model Tweet that I'd like to shard horizontally based on the tweet author's id. class Tweet(models.Model): author_id = models.IntegreField() text = models.TextField() Let's say I set up 3 databases: shard0, shard1, shard2 I'd like to take the tweet author's id, do a modulo 3 an

Re: How does Django handle auto-increment PK when a model is sharded horizontally into multiple databases?

2010-08-19 Thread Andy
On Aug 19, 9:28 am, Russell Keith-Magee wrote: > You've got the right idea, but the implementation you provide probably > won't be comprehensive enough in practice. The hint is any extra > information that will help you determine the right database to use; > there's no guarantee that the insta

Re: How does Django handle auto-increment PK when a model is sharded horizontally into multiple databases?

2010-08-20 Thread Andy
On Aug 19, 9:03 pm, Russell Keith-Magee wrote: > As for the instance not existing: Consider the following queries: > > MyModel.objects.filter(foo=bar) > > or > > MyModel.objects.update(foo=bar) > > These are read and write queries respectively, but neither has any > meaningful concept of a curr

Re: How does Django handle auto-increment PK when a model is sharded horizontally into multiple databases?

2010-08-23 Thread Andy
On Aug 20, 10:04 pm, Russell Keith-Magee wrote: >Of course, given that you know your sharding scheme, you could use the >router directly. > >Tweet.objects.using(router.db_for_read(Tweet, author=a)).filter(author_id=a) Ah Thanks. This is what I need. > You won't get any argument from me. What's

Possible to do location detection?

2010-08-25 Thread Andy
I'd like to detect the location of each user and then set the default language and location for him accordingly. The homepage would also be tailored to each location (country and city). Can anyone share information on how to do that with Django? -- You received this message because you are subsc

save() isn't thread-safe?

2010-08-27 Thread Andy
In this presentation save() is described as not thread-safe and update() is recommended to be used instead of save(): http://www.slideshare.net/zeeg/db-tips-tricks-django-meetup (page 2, 3, 4) Is it true that save() is not thread-safe? How is it not? Should I avoid using save() and use updat

How to store and retrieve objects to/from session?

2010-08-28 Thread Andy
I know I can store simple key/value pairs to session. Is it possible to store entire objects to session? I want to enable un-logged-in users to submit form data. After the form is submitted, I want to store the form data in session and then redirect the user to sign-in. After they sign in, I'd ret

Re: ANN: PyMySQL 0.3

2010-09-03 Thread Andy
Pete, Would you recommend PyMySQL for production use? Which parts of Django do I need to modify in order to use it with PyMySQL instead of MySQLdb? Thanks. On Sep 3, 2:07 pm, Pete Hunt wrote: > I’m proud to announce the release of PyMySQL 0.3. For those of you > unfamiliar with PyMySQL, it is

Spam filters for Django?

2010-09-03 Thread Andy
I'm working on a Django-based site that consists mostly of user- generated content: reviews, comments, tweet_like posts, etc. I'm concerned about spam. Are there any spam filters available for Django? If not, what types of algorithm can be used for spam filtering? On a more general note, does any

Re: Spam filters for Django?

2010-09-03 Thread Andy
c spam filtering or flagging in addition to the logged-in requrement. On Sep 4, 1:10 am, Kenneth Gonsalves wrote: > On Fri, 2010-09-03 at 21:56 -0700, Andy wrote: > > I'm working on a Django-based site that consists mostly of user- > > generated content: reviews, comments,

Re: Composite Primary Key Support

2010-09-04 Thread Andy
What are the downsides of just importing & using SQLAlchemy (which supports composite PK) in a Django program? On Sep 3, 10:43 pm, Russell Keith-Magee wrote: > On Sat, Sep 4, 2010 at 7:17 AM, Brendon wrote: > > I have a project where we have an existing database which uses > > composite (multipl

Re: ANN: PyMySQL 0.3

2010-09-04 Thread Andy
ant to drop by: http://groups.google.com/group/gevent/browse_thread/thread/b5f7bf44b7690ed9 On Sep 4, 4:58 pm, Pete Hunt wrote: > Hi Andy - > > Below is a patch that will let Django use pymysql if MySQLdb is not > available. Currently it is not in use in production anywhere but I

Re: ANN: PyMySQL 0.3

2010-09-05 Thread Andy
On Sep 5, 5:29 am, Daniel Roseman wrote: > If I get some time I'll try and work up an example. Please do Daniel. That'd really 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-us...@googlegro

Django with PyPy JIT?

2010-09-05 Thread Andy
Anyone tried running Django with PyPy JIT? What are the steps to set it up? Is it stable? PyPy benchmark shows almost 3X speed up of Django and they also said it would reduce memory consumption. I'm interested in trying it out. Just want to learn about anyone's experience with running Django on P

How do you avoid this race condition in Django?

2010-09-06 Thread Andy
I have a model MyModel that has a field expiration_datetime. Every time a user retrieves an instance of MyModel I need to first check if it has expired or not. If it has expired, than I need to increment some counter, update others, and then reset the expiration_datetime to some time in the future

Re: How do you avoid this race condition in Django?

2010-09-06 Thread Andy
How do I freeze a row in database? On Sep 6, 11:05 am, Jim wrote: > Maybe I'm not understanding the question but I'd freeze the row in the > database, do the work, and then unfreeze the row. > > Jim -- You received this message because you are subscribed to the Google Groups "Django users" gro

Re: Django with PyPy JIT?

2010-09-07 Thread Andy
Thanks Alex, Is there any instructions on how to set up django with PyPy you could point me to? Andy On Sep 5, 7:50 pm, Alex_Gaynor wrote: > On Sep 5, 4:40 pm, Andy wrote: > > > Anyone tried running Django with PyPy JIT? > > > What are the steps to set it up? Is

Re: ANN: PyMySQL 0.3

2010-09-10 Thread Andy
On Sep 10, 11:18 am, Andy Dustman wrote: > Uh, no. > > MySQLdb releases the GIL on any blocking call, so other threads can run. > > Django is *not* asynchronous. It's threaded. The default Django behavior is threaded. But it can be made to run in async mode, where socket c

Possible to have dynamic drop down list in ModelForm?

2010-09-18 Thread Andy
I have a model FieldReport that has, among other fields, these two fields: -country -city Both "country" and "city" are lists of choices. I want to have a form FieldReportForm as a ModelfForm based on the model FieldReport. I want to have "country" and "city" represented as drop down lists. More

Re: ANN: PyMySQL 0.3

2010-09-30 Thread Andy
db() > +except ImportError: > +    pass > + > > On Sep 10, 12:25 pm, Andy wrote: > > > On Sep 10, 11:18 am, Andy Dustman wrote: > > > > Uh, no. > > > > MySQLdb releases the GIL on any blocking call, so other threads can run. > > > > Djan

Django for internationalized sites - are models.User internationalized?

2010-10-01 Thread Andy
According to documentation (http://docs.djangoproject.com/en/dev/ topics/auth/), models.User contains: first_name Optional. 30 characters or fewer. last_name Optional. 30 characters or fewer. email Optional. E-mail address. Are "first_name" & "last_name" limited to alphanumeric charac

Re: Django for internationalized sites - are models.User internationalized?

2010-10-01 Thread Andy
On Oct 2, 1:45 am, Torsten Bronger wrote: Thanks for responding. > Hallöchen! > > > Are "first_name" & "last_name" limited to alphanumeric characters > > or can they contain non-English characters like "ü" or > > non-European characters like "黒"? > > Yes. "Yes" is in "first_name" & "last_name"

Re: Django for internationalized sites - are models.User internationalized?

2010-10-02 Thread Andy
On Oct 2, 3:27 am, Torsten Bronger wrote: > Hallöchen! > > Andy writes: > > On Oct 2, 1:45 am, Torsten Bronger > > wrote: > > > Thanks for responding. > > >>> Are "first_name" & "last_name" limited to alphanumeric > >>

Any way to select which Model to initialize without resorting to "if-elfi" statements?

2010-10-03 Thread Andy
I need to model many different product categories such as TV, laptops, women's apparel, men's shoes, etc. Since different product categories have different product attributes, each category has its own separate Model: TV, Laptop, WomensApparel, MensShoes, etc. And for each Model I created a Model

How to use django session outside of the view

2010-10-07 Thread andy
>>> from django.contrib.sessions.backends.db import SessionStore >>> s = SessionStore(session_key='2b1189a188b44ad18c35e113ac6ceead') >>> s['last_login'] = datetime.datetime(2005, 8, 20, 13, 35, 10) >>> s['last_login'] datetime.datetime(2005, 8, 20, 13, 35, 0) >>> s.save() The above shows how to u

Questions about Django's authentication system

2010-10-12 Thread Andy
A few questions about Django's authentication system: - Once a user is logged in, how long does he remain logged in? Is there any way to configure this - e.g. "users will remain logged in for 24 hours"? - Once a user provided a matching username & password and is authenticated, then what? In subs

html in django password_reset_email.html

2010-11-02 Thread andy
I recently tried to send the following in a test password email from a site I am creating: This is a test reset password email. However when I received the email it displayed the "This is a test reset password email.". My question is how can I send a styled email using html tags and possibly eve

Re: Mod_Python and everything loaded, Apache serving HTML files without using Django first

2010-11-02 Thread Andy
This isn't directly related to your question, but mod_python is not a recommended method of deploying Django. Support for it will be deprecated. You might want to check out mod_wsgi. On Nov 1, 5:15 pm, The End wrote: > I've finally got mod_python and mysqldb working with apache (long > story shor

Re: html in django password_reset_email.html

2010-11-02 Thread andy
On Nov 2, 4:50 am, Tom Evans wrote: > On Tue, Nov 2, 2010 at 9:07 AM, andy wrote: > > I recently tried to send the following in a test password email from a > > site I am creating: > > > This is a test reset password email. > > > However when I received the

Re: html in django password_reset_email.html

2010-11-02 Thread andy
On Nov 2, 4:50 am, Tom Evans wrote: > On Tue, Nov 2, 2010 at 9:07 AM, andy wrote: > > I recently tried to send the following in a test password email from a > > site I am creating: > > > This is a test reset password email. > > > However when I received the

Re: html in django password_reset_email.html

2010-11-02 Thread andy
On Nov 2, 4:50 am, Tom Evans wrote: > On Tue, Nov 2, 2010 at 9:07 AM, andy wrote: > > I recently tried to send the following in a test password email from a > > site I am creating: > > > This is a test reset password email. > > > However when I received the

Re: html in django password_reset_email.html

2010-11-02 Thread andy
On Nov 2, 4:50 am, Tom Evans wrote: > On Tue, Nov 2, 2010 at 9:07 AM, andy wrote: > > I recently tried to send the following in a test password email from a > > site I am creating: > > > This is a test reset password email. > > > However when I received the

Django apps and models

2010-11-04 Thread andy
Hi guys, Say I have a CUSTOMER, BRANCH and a SALES table for my project design. Question, should is it wise to create a customer, branch and sales app. I like this idea of doing this but I have a few issues. 1. If I create a customer app and create a Customer model class that has a ForeignKey re

Re: Django apps and models

2010-11-05 Thread andy
he flexibility to link up the same > customer to many branches. > > On Nov 4, 6:24 pm, andy wrote: > > > Hi guys, > > > Say I have a CUSTOMER, BRANCH and a SALES table for my project design. > > > Question, should is it wise to create a customer, branch and sale

Can extra() be used to implement JOIN?

2010-11-08 Thread Andy
I have a Q&A type of site with the following models: class Question(models.Model): title = models.CharField(max_length=70) details = models.TextField() class Answer(models.Model): question_id = IntegerField() details = models.TextField() I need to display a specific question toge

Saving images in django

2010-11-10 Thread andy
Django recommends saving images to the file system since this gives better performance than storing the files in a database. However I don't seen any documentation on how to restrict access to those files by user. If someone knows the url to your image directory they could possibly view all the con

Re: Saving images in django

2010-11-10 Thread andy
Thanks for the info very useful. On Nov 10, 6:34 pm, Łukasz Rekucki wrote: > On 11 November 2010 03:19, andy wrote: > > > Django recommends saving images to the file system since this gives > > better performance than storing the files in a database. However I > > don&

Re: remember me in login

2010-11-27 Thread andy
you might also want to take a look at this "Remember me for login" snippet from django snippets http://djangosnippets.org/snippets/1881/ On Nov 27, 6:00 am, robos85 wrote: > request.session.set_expiry() it's ideal for me:) > > On 27 Lis, 02:01, Addy Yeow wrote: > > > i use thishttp://djangosnip

Re: Comments by guest and foreign key in model

2010-12-05 Thread andy
Well you don't have to make the foreign key field required, that way comments belonging to guest users can have a blank foreign key Possibly you could also create a default guest user that is assign to comments made by guest users. I generally having my application depending on the creation of som

Is their much benefit In using a second hidden salt

2010-12-06 Thread andy
So I was having a bit of confusion over the method that django uses to protect passwords. The issues I had was that It seen unsecured to have the salt publicly available in the database since anyone who gets hold of the database would know the salt. After rereading the django book and doing some ad

Re: Error when running python manage.py loaddata datadump.json

2010-12-06 Thread andy
Generally when I get an error similar to that(not necessarily when using django) It means that I have violated some field that has a unique constraint. Look in you database and see if you have a constrain on that table. On Dec 6, 2:55 pm, jc wrote: > I'm migrating my Django database from sqlite t

Re: Generic ForeignKey in Database Queries

2010-12-06 Thread andy
>From the django doc "Due to the way GenericForeignKey is implemented, you cannot use such fields directly with filters (filter() and exclude(), for example) via the database API. They aren't normal field objects." http://docs.djangoproject.com/en/dev/ref/contrib/contenttypes/#generic-relations O

Re: General question about NOT EXISTS...

2010-12-06 Thread andy
Well django has a ISNULL which I guess could be use to get the result that you want. I'm a bit new to django and have not done any many-to- many relationships as yeah but I'm guessing you could do something like this: Lest say table A = Blog, B = entry and C = blogentry Blog.objects.filter(entry_

Re: General question about NOT EXISTS...

2010-12-06 Thread andy
Well django has a ISNULL which I guess could be use to get the result that you want. I'm a bit new to django and have not done any many-to- many relationships as yeah but I'm guessing you could do something like this: Lest say table A = Blog, B = entry and C = blogentry Blog.objects.filter(entry_

Re: General question about NOT EXISTS...

2010-12-06 Thread andy
Sorry for the double post. The table should have been A = Blog, B = blogentry and C = entry On Dec 7, 1:12 am, andy wrote: > Well django has a ISNULL which I guess could be use to get the result > that you want. I'm a bit new to django and have not done any many-to- > many relatio

Re: redirect after login

2010-12-07 Thread andy
Did you get the next parameter in the login template and append it to form action, If that is not done then once the form is submitted the next param would be lost. On Dec 7, 5:45 am, vamsy krishna wrote: > request.GET returns an empty dict > > On Dec 7, 3:35 pm, Kenneth Gonsalves wrote: > > > O

Looking for Django developer in DC

2010-01-19 Thread Andy
skills 8) A desire to work for a very cool company (my client's), writing code for a huge consumer facing website If this sounds like you, please send your resume to me asap, and we'll see what we can make happen. Thanks, Andy www.aajinteractive.com -- You received this message becau

'Context' object has no attribute 'period'

2010-01-26 Thread Andy
I am (still) new to Django and a novice at relational databases, so I am having some problems. I've read and read, but can't sort this out. I have a customer enter data into a form. The model is here: class Order_Info(models.Model): date_stamp = models.DateTimeField(auto_now_add=True)

(Funny Video Clip) Amazing singer with dolphin tone!

2007-06-20 Thread Andy
Wow!How high can he go?? He scares me. So beautiful dolphin tone . http://www.gamestar.ws/en-video/Vitas.htm Please tell us about your opinion. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" gr

Settings.py variables in CSS file

2007-08-15 Thread Andy
blem. Is there an easier solution? Thanks in advance, Andy --~--~-~--~~~---~--~~ 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 unsubsc

Re: Settings.py variables in CSS file

2007-08-17 Thread Andy
is adapted to the svn version though. Simon, excellent idea. I guess I was going for something way too complicated, where your solution should've been completely obvious. However, if you want other variables (other than just the media host), then Jame's idea sounds pr

upload_to dir in ImageField

2007-10-05 Thread Andy
I'm having some trouble with the object.get__url() results for my image field. I'm trying to get this going with the Django's (ver 0.95) development server in WinXP. I have the following line in my model: avatar = models.ImageField(upload_to='users/', blank=True, null=True) I have the followin

Creating one call for most recent entry, and another call for the rest

2006-11-02 Thread Andy
I have just set up a blog using the helpful tutorial over at http://fallingbullets.com/blog/2006/aug/06/wordpress-clone-27-seconds-part-1-40/";>Falling Bullets, and now I am looking to do a little customization. I am completely new to Django and Python, so if this question seems simple, forgive m

Creating one call for most recent entry, and another call for the restI have just set up a blog using the helpful tutorial over at

2006-11-02 Thread Andy
I have just set up a blog using the helpful tutorial over at http://fallingbullets.com/blog/2006/aug/06/wordpress-clone-27-seconds... and now I am looking to do a little customization. I am completely new to Django and Python, so if this question seems simple, forgive my niavete. Here is the cod

Re: Creating one call for most recent entry, and another call for the restI have just set up a blog using the helpful tutorial over at

2006-11-03 Thread Andy
Do I need to include {% for object in latest %}? Or, does this replace 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@googlegroups.com To

Re: Creating one call for most recent entry, and another call for the restI have just set up a blog using the helpful tutorial over at

2006-11-03 Thread Andy
Okay, so I've put in that code and it processes it fine and everything, however, all the entries are being placed in the else section, the filter for counter "1" doesn't seem to be grabbing the latest article. Is there another filter that could maybe grab it? --~--~-~--~~

Re: Creating one call for most recent entry, and another call for the restI have just set up a blog using the helpful tutorial over at

2006-11-03 Thread Andy
PS the site is main.howcurio.us/blog --~--~-~--~~~---~--~~ 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 ema

Re: Creating one call for most recent entry, and another call for the restI have just set up a blog using the helpful tutorial over at

2006-11-04 Thread Andy
http://paste.e-scribe.com/2598/ Check it out! --~--~-~--~~~---~--~~ 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

Re: Creating one call for most recent entry, and another call for the restI have just set up a blog using the helpful tutorial over at

2006-11-05 Thread Andy
It doesn't seem to be working, or at least it hasn't yet come out that way. I made another attempt where I essentially left out the {else} and nothing at all rendered, so that filter doesn't seem to be catching it. --~--~-~--~~~---~--~~ You received this message

Re: Creating one call for most recent entry, and another call for the restI have just set up a blog using the helpful tutorial over at

2006-11-07 Thread Andy
Hazaa, that seemed to have done the trick. When I have a second, I'll try to debug the sucker too, that way we can have some closure on your method, Rajesh. Thank you both for your help! --~--~-~--~~~---~--~~ You received this message because you are subscribed t

Re: Creating one call for most recent entry, and another call for the restI have just set up a blog using the helpful tutorial over at

2006-11-12 Thread Andy
Rajesh, I added in the counter and it popped out "1" for the first entry, so I am unsure why your method didn't work. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, sen

Re: Creating one call for most recent entry, and another call for the restI have just set up a blog using the helpful tutorial over at

2006-11-14 Thread Andy
It's namely the second I'm worried about. I have an ordered list and I want the first entry to have a special style, something to the degree of "new content." I want to target the second one because I want it to start the "old content" section, with a different style, like a fade on top, or someth

Looking for a Senior Django Application Developer

2013-01-09 Thread Andy
enior person who know Python/Django inside and out. The hourly rate would be around $80/hr. You would be required to be on-site in NW DC a couple of days/week (probably like 3), although some of the work could be done remotely. Please let me know if you are interested. Thanks, Andy Nussbaum a

Looking to hire a great team of Python/Django developers

2013-02-26 Thread Andy
great knowledgeable folks who want to work in DC (NW), and push the cutting edge of the technology. Let me know if you're interested, and I'll be happy to forward you the complete job details, Andy Nussbaum AAJ Interactive Technologies -- You received this message because you are subscribe

[JOB] Looking for a bunch of great Python/Django developers to work in the District

2013-03-06 Thread Andy
req - but you know who you are. If you're a great Python developer, looking to do cool web development, on a site that will be viewed by a ton of people (one you'll be excited to tell people you are working for), then you should get back to me asap. Hope to hear from you soon, And

Need to hire a Senior Django Web Architect

2013-04-30 Thread Andy
27;re interested, and we can chat. Sincerely, Andy Nussbaum Our client is looking for qualified candidates for a Web Architect position. The successful candidate will be a charismatic leader and passionate web architect with a proven track r

Where are request.user defined and assigned?

2011-05-10 Thread Andy
I'm trying to understand how does request.user work. Looking into the source code of the HttpRequest class (https:// code.djangoproject.com/browser/django/trunk/django/http/ __init__.py#L135) there is no "user" attribute for HttpRequest. So where is the "user" attribute defined? And which code is

Re: Where are request.user defined and assigned?

2011-05-10 Thread Andy
Thank you. So LazyUser is there to cache the user instance. In LazyUser(object), the user instance is stored in request._cached_user In AuthenticationMiddleware(object), the user instance is stored in request.__class__.user But I don't see request.user being assigned at all. Where does that hap

  1   2   3   4   5   6   7   >