Django real world website samples (with django source codes)

2011-04-06 Thread django beginner
Hi all, Could someone please give a link on some of the samples for real world Django websites? Thanks and have a nice day! Regards, Django Beginner -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: sample real world Django website sample scripts

2011-04-06 Thread Kenneth Gonsalves
On Thu, 2011-04-07 at 13:24 +0800, djangodjango django wrote: > Could someone please give a link on some of the samples for real world > Django websites? http://www.djangosites.org/ -- regards KG http://lawgon.livejournal.com Coimbatore LUG rox http://ilugcbe.techstud.org/ -- You received

sample real world Django website sample scripts

2011-04-06 Thread djangodjango django
Hi all, Could someone please give a link on some of the samples for real world Django websites? Thanks and have a nice day! Regards. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: how to setup apache server for django?

2011-04-06 Thread Graham Dumpleton
On Thursday, April 7, 2011 12:21:38 PM UTC+10, Charlie from china wrote: > > Can not find the page now... You need to be more specific. What URL? What HTTP status response? 404? What messages are in the Apache error logs? Have you enabled DEBUG to be True in Django settings file so that if

Re: how to setup apache server for django?

2011-04-06 Thread ug Charlie
Can not find the page now... On 4/7/11, Graham Dumpleton wrote: > > > On Thursday, April 7, 2011 2:16:43 AM UTC+10, Charlie from china wrote: >> >> Good to hear from you. >> I am following this guide. >> http://docs.djangoproject.com/en/dev/howto/deployment/modwsgi/ >

Re: Passing extra context data to class-based generic views?

2011-04-06 Thread Russell Keith-Magee
On Thu, Apr 7, 2011 at 12:02 AM, David Chandek-Stark wrote: > Function-based generic views provided an "extra_context" keyword argument to > add variables to the template context.  It appears that under the initial > implementation of class-based generic views in Django

Re: unique identifier to distinguish an instance

2011-04-06 Thread Roy Smith
On Wed, 2011-04-06 at 15:13 -0700, Tony wrote: > so I have two models, A and B. B has a foreignkey relationship in it > from A (To be clear because I know I dont explain it that well, one A > has many Bs). for each group of Bs each A is connected with, I want > there to be a way to mark one of

unique identifier to distinguish an instance

2011-04-06 Thread Tony
so I have two models, A and B. B has a foreignkey relationship in it from A (To be clear because I know I dont explain it that well, one A has many Bs). for each group of Bs each A is connected with, I want there to be a way to mark one of the Bs as unique from the rest of them. I added in an

Re: how to setup apache server for django?

2011-04-06 Thread Graham Dumpleton
On Thursday, April 7, 2011 2:16:43 AM UTC+10, Charlie from china wrote: > > Good to hear from you. > I am following this guide. > http://docs.djangoproject.com/en/dev/howto/deployment/modwsgi/ Read: http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango Watch:

A question about field forms and the widget SelectMultiple

2011-04-06 Thread Ariel
Hi everybody, I have a form with a field that uses the SelectMultiple widget: class DocumentForm(forms.ModelForm): options = forms.CharField(label='Options', max_length=100 ,widget=forms.SelectMultiple(attrs={'class':'listbox'}, choices=([(aspect.id, unicode(aspect.title)) for aspect in

Re: User and efficient

2011-04-06 Thread wluka
anyone? On 6 Kwi, 20:56, wluka wrote: > efficient for hit ratio and my database server. > > On 6 Kwi, 20:43, bruno desthuilliers > wrote: > > > On 6 avr, 20:39, wluka wrote: > > > > I have question about

extending django-registration forms

2011-04-06 Thread Antonio Sánchez
Hi, im having problems extending django-registration register form. i have extended auth.User -> UserProfile, and added some attributes, one of this is country, that is a ForeignKey to Country Table (Django- Countries, with all countries). After configuring django-registration, i extend register

Intermediary model with many to many from model to itself not fully documented?

2011-04-06 Thread Margie Roginski
Hi developers - your review would be appreciated here! It seems to me, based on my experimentation, that if I have an intermediary model that has a many-to-many relationship from the model to itself, that the order of the two fields that point back to the model is important. For example: class

Re: Check "if other user is logged in"

2011-04-06 Thread Abhijeet Rastogi
Thanks Shawn for your reply. I was afraid if that was the only way. Anyways, I implemented using AJAX only. I already had a AJAX request being made from counter side every 3 seconds. https://github.com/shadyabhi/pycourt_login/commit/e8303fe6a07761066a75226f7cd6dcb6d3c296f7 Thanks for that point.

Re: wan to use django's default theme

2011-04-06 Thread Mike Ramirez
On Wednesday, April 06, 2011 12:57:17 pm GOUTAM KUMAR RANA wrote: > Sorry for that. Actually I was asking how to use the default theme as in > django's admin in my custom pages file locations are here: http://code.djangoproject.com/browser/django/trunk/django/contrib/admin/media templates in

Re: Rendering read-only forms?

2011-04-06 Thread Roy Smith
On Wed, 2011-04-06 at 12:51 -0700, Mike Ramirez wrote: > the form widgets accept a key word arguement of "attrs"[1] which takes a > dictionary that has the key as the option and the value is the options fale. > i.e.: attrs={'readonly': 'true'}. These are added to the field when it's > rendered

Re: Cascade delete not entirely correct in 1.3?

2011-04-06 Thread Aaron Madison
oh. got it... thanks! On Wed, Apr 6, 2011 at 2:46 PM, Jacob Kaplan-Moss wrote: > On Wed, Apr 6, 2011 at 2:41 PM, Aaron Madison > wrote: > > I'm not sure if attaching files straight through email will work or > not... > > I meant on the ticket.

Re: wan to use django's default theme

2011-04-06 Thread GOUTAM KUMAR RANA
Sorry for that. Actually I was asking how to use the default theme as in django's admin in my custom pages -- 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

Re: wan to use django's default theme

2011-04-06 Thread Mike Ramirez
On Wednesday, April 06, 2011 12:41:59 pm GOUTAM KUMAR RANA wrote: > wan to use django's default theme in all my custom pages or applications Asking for permission or the location of the files and then which theme, site or admin panel. It's hard to know what's in your head without some real

Re: Rendering read-only forms?

2011-04-06 Thread Mike Ramirez
On Wednesday, April 06, 2011 12:23:56 pm Roy Smith wrote: > I want to display an object in exactly the same style as an existing > template that looks like this: > > > {% csrf_token %} > > {{form}} > > > > > except that I want all the fields to be read-only. It's easy enough > to not

Re: Cascade delete not entirely correct in 1.3?

2011-04-06 Thread Jacob Kaplan-Moss
On Wed, Apr 6, 2011 at 2:41 PM, Aaron Madison wrote: > I'm not sure if attaching files straight through email will work or not... I meant on the ticket. django-users is so high traffic that it's likely that developers could miss stuff posted here, so giving all the

Re: Cascade delete not entirely correct in 1.3?

2011-04-06 Thread Aaron Madison
and the model setup: class Policy(models.Model): policy_number = models.CharField(max_length=10) class Version(models.Model): policy = models.ForeignKey(Policy) class Location(models.Model): version = models.ForeignKey(Version, blank=True, null=True) class Item(models.Model):

wan to use django's default theme

2011-04-06 Thread GOUTAM KUMAR RANA
wan to use django's default theme in all my custom pages or applications -- 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

Re: Check "if other user is logged in"

2011-04-06 Thread Shawn Milochik
Just to be pedantic, your model allows someone to be both a student and a counter at the same time. If they must be mutually exclusive then you can create one CharField which uses an iterable of choices, or add custom code to your save() (and your modelform) to require compliance. Unfortunately,

Rendering read-only forms?

2011-04-06 Thread Roy Smith
I want to display an object in exactly the same style as an existing template that looks like this: {% csrf_token %} {{form}} except that I want all the fields to be read-only. It's easy enough to not include the submit button, but I also want to add readonly="true" attributes to all the

Re: Cascade delete not entirely correct in 1.3?

2011-04-06 Thread Jacob Kaplan-Moss
On Wed, Apr 6, 2011 at 11:14 AM, amadison wrote: > It you run the test case against django 1.3 it blows up... in django > 1.2.5 it passes. Just a quick process point: it helps a lot if you post the actual error you're seeing, traceback and all. Unless Django's

Check "if other user is logged in"

2011-04-06 Thread Abhijeet Rastogi
I have implemented two types of users using:- class UserProfile(models.Model): user = models.ForeignKey(User) is_counter = models.BooleanField() is_student = models.BooleanField() So, a user can either be a student or counter. Basically, I have a project

Re: User and efficient

2011-04-06 Thread wluka
efficient for hit ratio and my database server. On 6 Kwi, 20:43, bruno desthuilliers wrote: > On 6 avr, 20:39, wluka wrote: > > > I have question about efficient with user. What is more efficient user > > from auth + special auth model

Re: Where to put custom classes

2011-04-06 Thread bruno desthuilliers
On 6 avr, 19:13, Mazery Smith wrote: > Hello, > I have a project with a few application folders in it. One of those > applications houses all the views for the website. I've built some > utility classes placed in an entirely different application folder > (utility_app

Re: User and efficient

2011-04-06 Thread bruno desthuilliers
On 6 avr, 20:39, wluka wrote: > I have question about efficient with user. What is more efficient user > from auth + special auth model (with OneToOneField) or changing auth > for my own purposes or if I made own user from beginning? For which definition of "efficient"

User and efficient

2011-04-06 Thread wluka
I have question about efficient with user. What is more efficient user from auth + special auth model (with OneToOneField) or changing auth for my own purposes or if I made own user from beginning? -- You received this message because you are subscribed to the Google Groups "Django users"

Re: Where to put custom classes

2011-04-06 Thread Cal Leeming [Simplicity Media Ltd]
Personally, I keep all files which do not have a specific place in Django, in a 'libs' folder within the project. On Wed, Apr 6, 2011 at 6:13 PM, Mazery Smith wrote: > Hello, > I have a project with a few application folders in it. One of those > applications houses all

Re: Where to put custom classes

2011-04-06 Thread Aaron Madison
that seems like the way i'd do it On Wed, Apr 6, 2011 at 12:13 PM, Mazery Smith wrote: > Hello, > I have a project with a few application folders in it. One of those > applications houses all the views for the website. I've built some > utility classes placed in an

override ManyToMany.add()

2011-04-06 Thread Alsond
Lets say we have: def Sample(models.Model): many = ManyToManyField(ForeignModel) sample = Sample() sample.many.add(data) How to make extra call to django cache on last line, when using add(). -- You received this message because you are subscribed to the Google Groups "Django users"

Re: how to setup apache server for django?

2011-04-06 Thread ug Charlie
Good to hear from you. I am following this guide. http://docs.djangoproject.com/en/dev/howto/deployment/modwsgi/ Using the mod_wsgi. Util now I got some empty django project works. But my satchmo shop does not work. It turns out to download when open the localhost. My file structure looks like:

Cascade delete not entirely correct in 1.3?

2011-04-06 Thread amadison
Has anybody else noticed deletes blowing up that used to work fine, but now are broken with django 1.3? Using: Django 1.3 MySQL 5.1 Python 2.6 I have some complicated models from a legacy system that won't delete items in the proper order anymore and I receive a Referential Integrity error from

Where to put custom classes

2011-04-06 Thread Mazery Smith
Hello, I have a project with a few application folders in it. One of those applications houses all the views for the website. I've built some utility classes placed in an entirely different application folder (utility_app helper module) that assist in processing requests in each view. Is this the

Passing extra context data to class-based generic views?

2011-04-06 Thread David Chandek-Stark
Function-based generic views provided an "extra_context" keyword argument to add variables to the template context. It appears that under the initial implementation of class-based generic views in Django 1.3, there are two major differences: 1. To add extra context, you have to subclass and

reverse or selected_related or?

2011-04-06 Thread MikeKJ
There is a way to get it I know there is but I cant see the wood for the trees There are 2 areas each with the same name but belonging to the same PracticeCategory Practice categories are Individual and Business There is a practicetype called Property that belongs to Individual (1) There is a

Re: Django app for data management and visualization

2011-04-06 Thread Marwan Al-Sabbagh
this sounds very interesting to me too. I'm working at a financial institution and I'm facing a similar challenge of allowing the users to generate ad hoc reports and export those reports to excel. I've already implemented this requirement in PHP and I'm in the process of migrating these reporting

Subqueries

2011-04-06 Thread bernatbonet
Data Model: class A(models.model): desc: model.CharField() class B(models.model): a: model.ForeignKey('A') desc: models.CharField() I need to do this select in a view: select max(num_a) as max_num_a from (select a, count(desc) as num_a from B group by a) as x; I've tried this:

Uso de subconsultas

2011-04-06 Thread bernatbonet
Tengo el siguiente modelo de datos: class A(models.model): desc: model.CharField() class B(models.model): a: model.ForeignKey('A') desc: models.CharField() Tengo una vista que quiere sacar la siguiente select: select max(num_a) as max_num_a from (select a, count(desc) as num_a from

Re: Caught NoReverseMatch while rendering: Reverse for 'homepage_about' with arguments '()' and keyword arguments '{}' not found.

2011-04-06 Thread Anoop Thomas Mathew
Hi goutam, 1. You should not attach files in here. Bad practice. Just post it somewhere like dpaste.de or pastebin.ca Now, You just try renaming your homepage_about to about. _ are usually taken instead of . .And change correspondingly everywhere. It should work. regards, atm ___ Life is

Re: Caught NoReverseMatch while rendering: Reverse for 'homepage_about' with arguments '()' and keyword arguments '{}' not found.

2011-04-06 Thread GOUTAM KUMAR RANA
Oops Sorry , Its _ i was just trying by changing _ to - . At the time of - I had taken the screen shot . At _ and _ the same error is shown. plesae help. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Caught NoReverseMatch while rendering: Reverse for 'homepage_about' with arguments '()' and keyword arguments '{}' not found.

2011-04-06 Thread Casey Greene
- and _ are different characters. The screenshot shows - while your posted error message and urls.py have _. Casey On 04/06/2011 09:29 AM, GOUTAM KUMAR RANA wrote: -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: Caught NoReverseMatch while rendering: Reverse for 'homepage_about' with arguments '()' and keyword arguments '{}' not found.

2011-04-06 Thread GOUTAM KUMAR RANA
can u please help me in a small inventory project. -- 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

Re: Caught NoReverseMatch while rendering: Reverse for 'homepage_about' with arguments '()' and keyword arguments '{}' not found.

2011-04-06 Thread GOUTAM KUMAR RANA
here are the files please -- 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. For more

Re: Jinja2 & Django 1.3 Integration - Example?

2011-04-06 Thread Shawn Milochik
Line 16 (where you say the error occurs) is an import line. So this is probably a Python or Jinja2 issue. Try to do a very simple Python script using a bare-bones Jinja 2 template and confirm that everything is working before trying to troubleshoot a whole Django app.

Re: Caught NoReverseMatch while rendering:

2011-04-06 Thread Gonzalo Delgado
El 05/04/11 17:48, GOUTAM KUMAR RANA escribió: 7 : home - about - archive - contactcontact Make sure a url named[0] "homepage_about" exists in one of your active urls.py files, and that it takes no arguments. [0]

Re: E-Commerce - Payment

2011-04-06 Thread Shawn Milochik
I'll just add in that you do *not* want to ever have access to the credit card numbers. That obligates you to be PCI-DSS compliant, and that's not something you want to deal with if you don't have to. So yes, use a trusted third-party as everyone else has already said. Not just because they

Re: Caught NoReverseMatch while rendering: Reverse for 'homepage_about' with arguments '()' and keyword arguments '{}' not found.

2011-04-06 Thread Anoop Thomas Mathew
Hi Goutam, Post your urls.py somewhere. It seems you have not added anything in urls.py to handle homepage_about. regards, atm ___ Life is short, Live it hard. On 6 April 2011 18:26, GOUTAM KUMAR RANA wrote: > Environment: > > > Request Method: GET > Request URL:

Caught NoReverseMatch while rendering: Reverse for 'homepage_about' with arguments '()' and keyword arguments '{}' not found.

2011-04-06 Thread GOUTAM KUMAR RANA
Environment: Request Method: GET Request URL: http://localhost:8000/ Django Version: 1.3 Python Version: 2.7.1 Installed Applications: ['django.contrib.auth', 'django.contrib.contenttypes' , 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages',

Re: how to setup apache server for django?

2011-04-06 Thread Graham Dumpleton
On Wednesday, April 6, 2011 6:24:50 PM UTC+10, Charlie from china wrote: > > I have tried whole day. And I just got a new django project works. > > But I want my old project works too. Anyone could give me some info? > Depends on what WSGI hosting mechanism you are using and you don't mention

Re: how to setup apache server for django?

2011-04-06 Thread Marcos Moyano
You need to create a VirtualHost for each one of your projects. http://httpd.apache.org/docs/2.0/vhosts/ Marcos On Wed, Apr 6, 2011 at 5:24 AM, ug Charlie wrote: > I have tried whole day. And I just got a new django project works. > > But I want my old project works too.

how to setup apache server for django?

2011-04-06 Thread ug Charlie
I have tried whole day. And I just got a new django project works. But I want my old project works too. Anyone could give me some info? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Djando admin - custom error when deleting

2011-04-06 Thread galgal
I would like to use validating fields connections, but ONLY when delete action is performed. What should I do to validate that fields given in form via admin, chech them and if something is wrong - display errors in admin. I use custom ModelForm as admin form, but have no idea how to check in

Re: Python Decorators

2011-04-06 Thread cootetom
Yeah it's really odd. Since I posted I did the test that you've just shown and it's works fine. As soon as I put the same decorator on a django view function the as_string parameter is not defined in the wrapper. It's baffled me! On Apr 6, 10:48 am, Jonathan S

Re: Python Decorators

2011-04-06 Thread Jonathan S
Your code looks perfect. Following does print 'True'. def widget(widget_switch, as_string=False): def decorator(func): def wrapper(*args, **kwargs): # logic in here can access the value of 'widget_switch' but 'as_string' is not defined? print as_string

Admin custom button in edit

2011-04-06 Thread galgal
Hi, what is the best way to add custom button to save/save and edit buttons list? I need to add it only in edit mode and only in one model. Thanks for help. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: E-Commerce - Payment

2011-04-06 Thread Isaac XxX
Thank you a lot for your explanation. These concepts are really new for me, and now seems to be some light on this issue. On Wed, Apr 6, 2011 at 9:04 AM, Kenneth Gonsalves wrote: > On Wed, 2011-04-06 at 08:56 +0200, Isaac XxX wrote: > > And then, some advice at how to

Re: E-Commerce - Payment

2011-04-06 Thread Kenneth Gonsalves
On Wed, 2011-04-06 at 08:56 +0200, Isaac XxX wrote: > And then, some advice at how to manage "credit card gateways"? or some > information source about it? basically a credit card gateway is a company (usually a very big company) which will process your credit cards for you. All you need to do

Re: E-Commerce - Payment

2011-04-06 Thread Isaac XxX
Thanks for advice and responses, I will take a look at payment gateway solutions, looking for one well fit to me On Wed, Apr 6, 2011 at 8:56 AM, Mike Ramirez wrote: > On Tuesday, April 05, 2011 11:25:12 pm Isaac XxX wrote: > > Hi folks, > > > > > Paypal seems to be clear at

Re: E-Commerce - Payment

2011-04-06 Thread Isaac XxX
And then, some advice at how to manage "credit card gateways"? or some information source about it? Sorry if this is a beginner question, but is my first e-commerce application, and had never deal with payments and credit card information. On Wed, Apr 6, 2011 at 8:37 AM, Kenneth Gonsalves

Re: E-Commerce - Payment

2011-04-06 Thread Mike Ramirez
On Tuesday, April 05, 2011 11:25:12 pm Isaac XxX wrote: > Hi folks, > > Paypal seems to be clear at how to manage, but Use a gateway service, much easier and less costly. >I don't know really how to manage credit card data:? can be stored? Yes but the infrastructure is important on how all

Re: E-Commerce - Payment

2011-04-06 Thread Kenneth Gonsalves
On Wed, 2011-04-06 at 08:25 +0200, Isaac XxX wrote: > Paypal seems to be clear at how to manage, but I don't know really how > to > manage credit card data: can be stored? shall I transfer directly that > ssl > channeled data to my bank? shall I manage it handly? are you *sure* you want to

E-Commerce - Payment

2011-04-06 Thread Isaac XxX
Hi folks, after some time spent in investigating django solutions for shopping carts, i got satchmo as my one. I've developed a custom shopping cart, and this app is ready to be published. The problem arised when I started to look for some information about how to manage payments: all information