Re: learning django testing

2007-07-26 Thread james_027
Thanks bob cheers, james On Jul 25, 11:48 pm, "Bob T." <[EMAIL PROTECTED]> wrote: > > I don't have any idea what is the > > testing all about. > > James, you might want to take a look at Dive Into Python [1] as a > starting place. It has a couple good chapters on testing and test > driven

middleware or context_processors

2007-07-26 Thread james_027
Hi all, As I am trying to extend the django user model not using the auth_profile I have model like this class Profile(models.Model): """KSK Employee accounts to use this application""" user = models.ForeignKey(User, unique=True) department = models.CharField(maxlength=3,

Re: latest django version

2007-07-25 Thread james_027
hi oggie, On Jul 26, 3:39 am, oggie rob <[EMAIL PROTECTED]> wrote: > Re: TortoiseSVN, take a look athttp://tortoisesvn.net/node/87 > Short story - unless you can get your admin to change your firewall, > you can't use svn since "code" doesn't respond to https, no matter > which platform you are

newforms: common constraints

2007-07-26 Thread james_027
Hi all, I may not well understand the purpose of newforms, or perhaps it is still in a very early alpha stage ... I am looking to implement some common constraints like mininum or maximum letter of character field then values for numerical field., range for numerical or date field. Thanks

Re: newforms: common constraints

2007-07-27 Thread james_027
Thanks for the fast response Doug, but those min max constraints are so common? why not include it? james On Jul 27, 1:20 pm, Doug B <[EMAIL PROTECTED]> wrote: > Garg, hit enter too fast. > > Class MyForm(forms.Form): > username = forms.CharField(max_length=12) > def

adding contraints on admin

2007-07-27 Thread james_027
Hi, I really love Django admin, however how can I add customer validation or contraints to my models? Thanks james --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

error on models with foreign key on each other

2007-07-29 Thread james_027
Hi, I am trying to migrate an existing application to django. I am encountering the following problem with this models D:\private\james\documents\django\ksk>python manage.py validate manning.employee: Reverse query name for field 'employee_contract' clashes with field 'EmployeeContr

Re: newforms: common constraints

2007-07-29 Thread james_027
hi, what will be the proper approach to do this? creating a custom fields or custom field validation? Thanks james On Jul 27, 10:53 pm, "Jacob Kaplan-Moss" <[EMAIL PROTECTED]> wrote: > On 7/27/07, james_027 <[EMAIL PROTECTED]> wrote: > > > but those m

overiding the clean method on newforms

2007-07-30 Thread james_027
Hi, is there any sample on over riding the clean method of the newforms? Thanks james --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

retaining the data on validation error using newforms

2007-07-30 Thread james_027
Hi, this is how I am using the newforms. My Form class NewEmployeeForm(forms.Form): contract_from = forms.DateField() contract_to = forms.DateField() position = forms.CharField(max_length=20) My View def create_employee(request): f = None if request.method == 'POST':

Re: overiding the clean method on newforms

2007-07-30 Thread james_027
Hi, > > http://django-registration.googlecode.com/svn/trunk/registration/form... > Thanks Nathaniel, I am looking for over riding the clean() instead of clean_(). After hours of experiments. I would like to confirm if my learnings are correct. in over riding the clean() method, I have to

learning django's HttpRequest Object and Middleware

2007-07-31 Thread james_027
Hi, I want to make sure that my understanding is right. is middleware the place where I can add more attribute to the HttpRequest Object and manipulate the added attribte? Is this advisable? if Not where is the right place to do it? Thanks james

Re: learning django's HttpRequest Object and Middleware

2007-07-31 Thread james_027
Hi Thomas > The methods of each middleware are called one for every request. If your > changes need information from the request, that's the right place. > > If you want to add a method which should be added once the server (mod_python, > scgi, ...) starts you can use this place too. But it is

Re: how to overcome {% if %} limitation

2007-07-31 Thread james_027
Thanks everyone! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL

remember me feature

2007-07-31 Thread james_027
hi, is implementing remember me feature for login is as simple as changing the cookies settings in the settings.py? is manipulating of setting.py allowed in views? THanks james --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

understanding request.user

2007-08-01 Thread james_027
hi, I am seeking some enlightenment as why the user (variable use to track if the user is logged in or not) seems to be on the request level and not on the session which is the practice of most or all of web framework? If I am not wrong request.user is done on the middleware which will get

Re: understanding request.user

2007-08-01 Thread james_027
hi, > request.user gets created by to OR mapping (from the sql database). > request.session comes from a pickle (serialized to a bytestream). > > Both needs to be done for every request. You could use caching, > but object caching (like for request.user) is not possible up to now. > Just like

Re: default behavior of django.middleware.transaction.TransactionMiddleware

2007-08-01 Thread james_027
hi, anyone to clarify this? On Jul 17, 4:54 pm, james_027 <[EMAIL PROTECTED]> wrote: > hi, > > If I use django.middleware.transaction.TransactionMiddleware, is > @transaction.commit_on_success the default behavior? or I should > always call on the python decorator

something I really don't know in using manage.py shell

2007-08-01 Thread james_027
hi, i am trying to use the manage.py shell, for fast testing of what I would like to do. I have a model like this class Function(models.Model): """Functions that KSK Employee account could use""" name = models.CharField(maxlength=40) url = models.CharField(maxlength=40,

Django equivalent of ROR flash

2007-08-02 Thread james_027
Does Django have this http://api.rubyonrails.com/classes/ActionController/Flash.html Thanks james --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

value for choices arguments for newforms.MultipleSelectField

2007-08-02 Thread james_027
hi somewhere on the django documentation I saw the choice provided for MultipleSelectField is from a Database but I can't recall where I read it but I do it this way, let me know if there are better alternative items = newforms.MultipleChoiceField(choices = [('i.id', 'i.name') for i in

Re: value for choices arguments for newforms.MultipleSelectField

2007-08-02 Thread james_027
H On Aug 2, 11:35 pm, Nathan Ostgard <[EMAIL PROTECTED]> wrote: > You can use ModelMultipleChoiceField for this: > > items = > newforms.ModelMultipleChoiceField(queryset=Items.objects.all()) > I don't see ModelMultipleChoiceField on the documentaion or the latest source code Thanks james

Firebird support

2007-08-02 Thread james_027
Hi, anybody here heard of firebird database? how can I get support from django? Thanks james --~--~-~--~~~---~--~~ 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 handle forms with more than submit button

2007-08-02 Thread james_027
hi > create different URLs (and thus different views) for the different > buttons and then redirect to wherever you want to go. > How do I create a different URL for different buttons but under one form? Thanks james --~--~-~--~~~---~--~~ You received this

Re: how to handle forms with more than submit button

2007-08-02 Thread james_027
hi, On Aug 3, 11:12 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Oh... forgot the semicolons after .submit(); but you get the picture > thanks carole, yes I the picture. so its about javascript not django ... cheers, james --~--~-~--~~~---~--~~ You

how to handle forms with more than submit button

2007-08-02 Thread james_027
Hi, How do I handle this situation wherein I want different submit button to call different method on the views. I feel that calling the same method on views for all the submit button on a form is not good, as you'll make the distinction of what to do inside the method... Thanks james

Re: how to handle forms with more than submit button

2007-08-02 Thread james_027
Hi, On Aug 3, 11:21 am, Doug B <[EMAIL PROTECTED]> wrote: > As far as I know a form submits to a single url via the action=? > specifier. That's just the way an html form works. Each submit > button that is part of the form is going to post to the action url in > the form. You can override

help serving static files (css, images, pdf, js)

2007-08-03 Thread james_027
hi, I already did the (r'^media/(?P.*)$', 'django.views.static.serve', {'document_root':'d:/private/james/documents/django/ksk/media'}), in my urls.py and in my template i have something like this but why is it the image still don't appear? Thanks james

Re: help serving static files (css, images, pdf, js)

2007-08-03 Thread james_027
hi, are this settings used when running under development mode? MEDIA_ROOT MEDIA_URL does it affect the django.views.static.serve? thanks james --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: help serving static files (css, images, pdf, js)

2007-08-03 Thread james_027
hi, On Aug 3, 4:32 pm, koenb <[EMAIL PROTECTED]> wrote: > My guess is you are interfering with your admin_media (look at the > admin_media_prefix setting). > Try using something like r'^sitemedia/... and src="/sitemedia/...". > Thanks koen, that did it. I think it could be nice if it was

Re: help serving static files (css, images, pdf, js)

2007-08-03 Thread james_027
hi Kai, > If you do not use it, no. > If I use it, how does it affect then? thanks james --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

an application with print on dot matrix printer

2007-08-05 Thread james_027
hi, what is the nice way to provide a print function on a dot matrix printer for django apps aside from generating a printer friendly page? Thanks james --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

elseif or elseifqual or elseifnotequal

2007-08-06 Thread james_027
Hi, Just want to confirm if elseif and the alike doesn't exist in django's template. What tricks could be give to newbies if something like is needed ... if bool: elseif bool: elseif boo: it could be not nice to do something like this in django's template {% if bool %} {% else %}

Re: elseif or elseifqual or elseifnotequal

2007-08-06 Thread james_027
hi kai! thanks a lot. this will help a lot. cheers, james On Aug 6, 4:02 pm, "Kai Kuehne" <[EMAIL PROTECTED]> wrote: > Hi James, > > On 8/6/07, james_027 <[EMAIL PROTECTED]> wrote: > > > Just want to confirm if elseif and the alike doesn't exist in

weird django orm behavior

2007-08-06 Thread james_027
Hi, I have this models ... class Employee(models.Model): emplyoee_contract = models.ForeignKey('EmployeeContract', null=True, related_name='contracted_employee') employee_assignment = models.ForeignKey('EmployeeAssignment', null=True, related_name='assigned_employee') class

multiple user account login

2007-08-07 Thread james_027
Hi, How do I enable multiple user account login in one computer? I don't know what is the disadvantage if this works this way, I just need it for development and testing purpose. Thanks james --~--~-~--~~~---~--~~ You received this message because you are

Re: multiple user account login

2007-08-07 Thread james_027
Hi, > I think the OP is asking for the ability to have more than one > different user simultaneously logged into the web app. This > isn't conventionally feasible. You can use multiple browsers > (I've used FireFox, IE, Lynx, and Dillo for testing various users > at the same time) or possibly

using chaining filter() and select_related()

2007-08-07 Thread james_027
hi, I am doing something like this params = request.GET['name'].split() employees = Employee.objects.all().select_related() for p in params: employees = employees.filter(Q(firstname = p) | Q(lastname = p)) the query is fine but when I look at the

Re: using chaining filter() and select_related()

2007-08-07 Thread james_027
Hi, On Aug 8, 1:37 pm, Udi <[EMAIL PROTECTED]> wrote: > Try doing the select_related() at the end > > Remove the first use of it and then after the loop add this: > employees = employees.select_related() > > I think that'll work? > I try but it didn't work ... james

Re: using chaining filter() and select_related()

2007-08-07 Thread james_027
hi On Aug 8, 1:45 pm, Margaret <[EMAIL PROTECTED]> wrote: > how > > employees = employees.join(employees.filter(Q(firstname = p) | Q(lastname= > p))) > is this something new that hasn't been yet documented? james --~--~-~--~~~---~--~~ You received this

django.views.generic.simple

2007-08-08 Thread james_027
hi, is the purpose of this view for showing static html page? if not what is the use of this view? Thanks james --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Is this not allowed select_related()

2007-08-08 Thread james_027
hi, I have this model which doesn't work when using select_related(). What happen is django seems to be in a infinite loop. class Employee(models.Model): employee_contract = models.ForeignKey('EmployeeContract', related_name='contracted_employee') employee_assignment =

context vs request context

2007-08-08 Thread james_027
Hi, While I was studying the list generic view. I ask myself why does the django generic view list uses request context to store the pagination related info instead of a regular context. If I understand it right, using the request context could provide additional info from the context processor

Re: Is this not allowed select_related()

2007-08-08 Thread james_027
Hi collin On Aug 9, 1:06 pm, Collin Grady <[EMAIL PROTECTED]> wrote: > Because you have an infinite loop there. > > Why are you linking both directions? There's a reverse relation > available to get from EmployeeAssignment and EmployeeContract back to > the Employee model, you don't need to

getting pagination tag to work

2007-08-09 Thread james_027
hi, I am trying to do this http://code.djangoproject.com/wiki/PaginatorTag I have two apps in my projects which are main and manning. I put the pagination tag code in the main/templatetags/extra_tags.py file. And I am trying to use the tag from a template in manning/templates/ results.htm. But

pagination for search result ...

2007-08-09 Thread james_027
hi, I am trying to put a page list for a search result. So far here's what I've try by using the django.views.generic.list_detail.object_list and the pagination tag (http://code.djangoproject.com/wiki/PaginatorTag) and later found out that it won't meet my needs. def search_employee(request):

Re: pagination for search result ...

2007-08-09 Thread james_027
Hi Kai, > > Do you mean that the filter works on the first page but > is lost when you go to another page? If yes: > I save my filter in a session and filter on each page using > that filter values (the values that were given to the input fields > of the filter form). I don't know whether this

context processors execution

2007-08-09 Thread james_027
hi, Are the context processors executed only when you pass a request context from view to template? The documentation mentions that a requestcontext could accept an optional argument which is a context processor, is it the same as putting the context processor in the context processor settings

Re: Is this not allowed select_related()

2007-08-09 Thread james_027
hi, On Aug 9, 11:37 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > He means that you can remove: > > employee = models.ForeignKey(Employee) > > from your 'EmployeeAssignment' and 'EmployeeContract' models because > the relationship is already defined in your 'Employee' model. You can >

Re: pagination for search result ...

2007-08-09 Thread james_027
hi, > def list_filter(request): > """Update session filter""" > # request['filter'] is a hidden field. frankly, I don't know if > this is really needed. > # I added it in case I add another form to the template > if request.method == 'POST' and request['filter'] == '1': >

Re: Is this not allowed select_related()

2007-08-09 Thread james_027
hi collin, On Aug 10, 11:26 am, Collin Grady <[EMAIL PROTECTED]> wrote: > What do you mean by "get the history" ? the employee could have new contract & assignment as months goes by. the employee_contract & employee_assignment tells of their recent contract & assignment. while the employee

Re: pagination for search result ...

2007-08-09 Thread james_027
hi, On Aug 10, 11:25 am, "Kai Kuehne" <[EMAIL PROTECTED]> wrote: > On 8/10/07, james_027 <[EMAIL PROTECTED]> wrote: > > > > > > > hi, > > > > def list_filter(request): > > > """Update sessio

url styling

2007-08-09 Thread james_027
hi, is there any advantage or disadvantage or best practices in forming urls? like which set are much better? domain/employee/1 domain/edit_employee/1 domain/inactive_employee/1 or domain/employee/1 domain/employee/1/edit/ domain/employee/1/inactive/ thanks james

Re: Is this not allowed select_related()

2007-08-10 Thread james_027
THanks Doug > > class Employee(models.Model): > # your employee model fields here, no FKs to Contact or > Assignment models > ... > > class EmployeeAssignment(models.Model): > active = models.BooleanField() # I added this > employee = models.ForeignKey(Employee) > ... > >

django built-in web server

2007-08-10 Thread james_027
hi, Can I use the django's built in web server in an intranet enviroment where the maximum users could be not more than 50 users? I am just asking this for the purpose for easy deployment :). I am very newbie, and trying to avoid apache THanks james

Re: django built-in web server

2007-08-10 Thread james_027
Hi, > > > I am very newbie, > > and trying to avoid apache > > why? > Just in case a problem occur, I think it could be more easy to troubleshoot it without being a apache expert? Or if threre's a patch for the client's program that need to be apply it could be much easier? THanks james

scheduling job

2007-08-10 Thread james_027
hi, This might not be a django stuff, but how could I write something that will execute itself depending on the frequency that I'll set. For example, since django session table needs to be clean up at a certain time, I want to write a script that will execute itself monthly to clean up the

Re: editing newforms field

2007-08-10 Thread james_027
Hi, On Aug 10, 4:12 pm, Collin Grady <[EMAIL PROTECTED]> wrote: > Yes, just edit the fields in form.fields :) I am sorry, I didn't make it clear, I mean changing it like in views? james --~--~-~--~~~---~--~~ You received this message because you are subscribed

editing newforms field

2007-08-10 Thread james_027
hi, is it possible to edit the newforms field like required from true to false? or editing the widget property? Thanks james --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: context processors execution

2007-08-12 Thread james_027
hi, someone to confirm this? thanks james On Aug 10, 10:29 am, james_027 <[EMAIL PROTECTED]> wrote: > hi, > > Are the context processors executed only when you pass a request > context from view to template? The documentation mentions that a > requestcontext could accept

Re: context processors execution

2007-08-13 Thread james_027
hi Matt, On Aug 13, 3:13 pm, "Matt Davies" <[EMAIL PROTECTED]> wrote: > James, are you talking about putting a context processor into the > settings.py file? > yes, and also context processor called as argument on views by ContextRequest() Thanks james

Re: Installing django on a vm using NAT - SVN 400 bad request

2007-08-13 Thread james_027
Hi, On Aug 14, 9:36 am, sanchothefat <[EMAIL PROTECTED]> wrote: > Hi, I'm trying to get django going on a debian etch vm I have which > uses NAT to access the web. I found some info that suggested using https:// > but that won't work. > Should I try ubuntu or is there something in the vm

production instance on windowsxp

2007-08-15 Thread james_027
Hi, Ask I have successfully try to run django apps on apache/mod_python/ winxp, I learn that apache for winxp only support worker_mpm oppose to what django is suggesting (prefork_mpm). Should I worry about this? Or should I go with fast cgi? THanks james

ModelChoiceField on newforms

2007-08-17 Thread james_027
hi, while learning and experimenting with forms ... one should use ModelChoiceField in order to let newforms bind the value on a foreignkey field of a model. My concern is that in the real world, you usually don't use to let the user chose the value to be filled especially if the list of

using defaultdict on django

2007-08-24 Thread james_027
hi, I am using defaultdict to gather organize some data on request.POST. but the result seems to be different when execute outside django ... inside django I could get this result ... {u'item': [u'727'], u'unit_price': [u'5.50'], u'qty': [u'']} {u'item': [u'2'], u'unit_price': [u'23500.00'],

Re: Help needed

2007-08-24 Thread james_027
Hi ani, On Aug 24, 3:42 pm, Ani Nair <[EMAIL PROTECTED]> wrote: > Hi I'm new to this.. I want to know whether django restricts the use > of '?' in urls. I am unable to use it in the url config My guess is that "?" is a special char in regex which django uses in url config... try to escape it.

Re: using defaultdict on django

2007-08-24 Thread james_027
Hi, Anybody has an idea about this? Thanks james On Aug 24, 3:27 pm, james_027 <[EMAIL PROTECTED]> wrote: > hi, > > I am using defaultdict to gather organize some data on request.POST. > but the result seems to be different when execute outside django ... > > i

redirect with query

2007-09-02 Thread james_027
hi, is there a django/pythonic way to do this return HttpResponseRedirect('/main?app_message=you have no permission on %s vs ' % (function)) can the reverse() help? I think the args and kwargs are for the methods parameters ... Thanks james

newforms to validate if unique

2007-09-04 Thread james_027
hi, how do I use the newforms for creating an object that has an attribute with unique = True? Thanks james --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

weird behavior of connection.cursor.execute()

2007-09-28 Thread james_027
hi all the 2 methods below have no errors but are different in a way that the first one doesn't give me the resultset in the order that I want while the second method give me the resultset in the right order that I want. first method def sales(self, year=datetime.today().year,

Re: weird behavior of connection.cursor.execute()

2007-09-30 Thread james_027
anyone who has opinion on this? thanks james On Sep 29, 10:01 am, james_027 <[EMAIL PROTECTED]> wrote: > hi all > > the 2 methods below have no errors but are different in a way that the > first one doesn't give me the resultset in the order that I want while > the

importing on models.py breaks somethings

2007-10-20 Thread james_027
hi, i have made myself a module name utilities.py and shortcuts.py and place them in the root folder of my django app. When I use them in views.py or forms.py I just put a from app_name.shortcut import * from app_name.utilities import * but when I try to use it on my models.py in my forms.py

Re: importing on models.py breaks somethings

2007-10-20 Thread james_027
hi, > I can understand why your forms.py is importing models.py, but the > real question is: why is models.py importing forms.py? > I have a custom validation in some of my forms which need some of the object in my models.py. And I don't have my model.py importing forms.py. james

Re: importing on models.py breaks somethings

2007-10-20 Thread james_027
hi, > "Doesn't work" is not very informative. Does it raise an error? Do > nothing? What is the difference between "works" and "doesn't work" in > this case. > What I mean by "doesn't work" is the in my forms.py it is giving an error that doesn't recognize the objects I have in my models.py

django with other presentation solution

2007-11-27 Thread james_027
hi everyone fellow django users While I am having fun with django, but not with html/css/javascript (I am very bad at it). Any recommendation on making the presentation/view much painless. I am thinking of something like google web toolkit but this could mean a lot of work since the gwt is java

Multiple django version on developer machine

2010-05-11 Thread james_027
Hi all, While I have a number of django apps develop for Django 1.1 ... I also want to use Django 1.2 for my new project. How can I have multiple version of Django in my machine where my apps will be instructed either to use 1.1 or 1.2 Thanks, James -- You received this message because you are

Calling remote API

2010-07-08 Thread james_027
hi all, It will be my first time to create django app that requires calling remote API. As far as I know django has no built in support for this. I only way I know is URLLIB2, any good library for this purpose, which easily send your request as get this parameters and also easily parse the return

Business Application

2007-05-20 Thread james_027
Hi, I am seeking for some information, guidelines for me to choose the right framework for me. I am choosing between code igniter, django, & rails. So far my concerns with django is that I have read somewhere else that says django is much appropriate for web publishing type of web site but I am

Re: Business Application

2007-05-20 Thread james_027
Hi Tim On May 20, 8:21 pm, Tim Chase <[EMAIL PROTECTED]> wrote: > > I am seeking for some information, guidelines for me to choose the > > right framework for me. I am choosing between code igniter, django, & > > rails. So far my concerns with django is that I have read somewhere > > else that

django orm & sqlalchemy

2007-06-14 Thread james_027
Hi, I have read somewhere else that there is a plan of making sqlalchemy to work with django. My concern is while sqlalchemy is the more complete orm, but it lack validation which is something django's own orm has, am I right? Thanks james --~--~-~--~~~---~--~~

one model per file

2007-07-12 Thread james_027
Hi, I am following the official tutorial of django, and found out that several model are define in a single file. I just wonder if we could have one model per file? or can be as flexible as X no of models in file A and Y no of models in file B and so on. If this is allowed, how to we name the

regex in url

2007-07-16 Thread james_027
hi, urlpatterns = patterns('', (r'^polls/$', 'mysite.polls.views.index'), (r'^polls/(?P\d+)/$', 'mysite.polls.views.detail'), (r'^polls/(?P\d+)/results/$', 'mysite.polls.views.results'), (r'^polls/(?P\d+)/vote/$', 'mysite.polls.views.vote'), ) I am very new to django as well as

Re: regex in url

2007-07-16 Thread james_027
Yes I am looking for the explanation of ?P syntax, is this something related to python's regex or django's own regex. thanks james On Jul 17, 11:57 am, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On 7/17/07, james_027 <[EMAIL PROTECTED]> wrote: > > >

Re: regex in url

2007-07-17 Thread james_027
hi kenneth, thanks a lot, i think should be looking at official python doc more than the dive into python. cheers, james On Jul 17, 12:47 pm, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > On 17-Jul-07, at 9:36 AM, james_027 wrote: > > > Yes I am looking for the explan

Django ORM is very cool.

2007-07-17 Thread james_027
hi, i just starting to read http://www.djangoproject.com/documentation/model-api/ http://www.djangoproject.com/documentation/db-api/ I have some experience with other ORM, I think django's orm is really cool. Here are the things that I like that really makes Django's ORM a clean design.

default behavior of django.middleware.transaction.TransactionMiddleware

2007-07-17 Thread james_027
hi, If I use django.middleware.transaction.TransactionMiddleware, is @transaction.commit_on_success the default behavior? or I should always call on the python decorators? Thanks james --~--~-~--~~~---~--~~ You received this message because you are subscribed

session question

2007-07-18 Thread james_027
hi, sorry for this stupid question ... does django's session only work when cookies are enabled? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Django's User authentication

2007-07-18 Thread james_027
hi, is this use for the django admin features only? or I can use it for my own app? if yes, do I make it suitable for my application? Thanks james --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: Django's User authentication

2007-07-18 Thread james_027
what if I need additional fields or methods for my apps? Do i inherit it or edit the user class? Thanks james On Jul 18, 3:45 pm, Przemek Gawronski <[EMAIL PROTECTED]> wrote: > > is this use for the django admin features only? or I can use it for my > > own app? if yes, do I make it suitable

Re: Django's User authentication

2007-07-18 Thread james_027
Thanks Jason for sharing this one. cheers, james On Jul 18, 9:07 pm, [EMAIL PROTECTED] (Jason F. McBrayer) wrote: > james_027 <[EMAIL PROTECTED]> writes: > > what if I need additional fields or methods for my apps? Do i inherit > > it or edit the user class? >

Re: context processor question

2007-07-18 Thread james_027
Hi Jeremy, I am a bit lost ... where do I apply that? Isn't that I just call the variable name/dict key in the template? Thanks james On Jul 19, 11:18 am, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote: > On 7/18/07, james_027 <[EMAIL PROTECTED]> wrote: > ...

django foreignkey

2007-07-18 Thread james_027
hi, I have a model with a field models.ForeignKey(), with manage.py validate I check if my code are right, then run manage.py syncdb. When I was checking the tables generated I don't see any foreign key created? Is there something wrong? where should I check? I am using django 0.96, mysql 5 on

Re: django foreignkey

2007-07-19 Thread james_027
els.ForeignKey(User), then look for > a field named user_id in your table. > > > Nathan Ostgard > > On Jul 18, 9:57 pm, james_027 <[EMAIL PROTECTED]> wrote: > > > hi, > > > I have a model with a field models.ForeignKey(), with manage.py > > v

login() method conflict

2007-07-19 Thread james_027
hi, i've been trying to get started with django and i am stock in this problem and found out that there's a conflict in login() method. here is my view code from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render_to_response from django.contrib.auth import

Re: login() method conflict

2007-07-19 Thread james_027
; Then use: > user = auth.authenticate(username='foo', password='bar') > auth.login(request, user) > > On Jul 19, 1:02 am, james_027 <[EMAIL PROTECTED]> wrote: > > > hi, > > > i've been trying to get started with django and i am stock in this > > problem a

Re: django foreignkey

2007-07-19 Thread james_027
anyone to help me on this? thanks james On Jul 19, 3:20 pm, james_027 <[EMAIL PROTECTED]> wrote: > Hi Nathan, > > I did manage.py syncdb with the table still not existing. I did > manage.py sqlall myapps when saw that the foreign key was not created. > > here is my actu

Re: django foreignkey

2007-07-19 Thread james_027
hi, it seems that there is a small bug for not creating the foreign key on the database. Please see this ticket. http://code.djangoproject.com/ticket/4930#preview Thanks james On Jul 20, 9:05 am, james_027 <[EMAIL PROTECTED]> wrote: > anyone to help me on this? > > thanks >

setting up login required pages massly

2007-07-19 Thread james_027
hi, is there a stupidly fast way to make select but many pages to required login first? I am using 0.96 @login_required is cool, but 0.96 doesn't support LOGIN_URL in the settings.py yet. currently i am using something like this if not request.user.is_authenticated(): return

newforms

2007-07-19 Thread james_027
Which official django apps are using the newforms? I just want to take a look at the coding as I am trying to learn the django's newform thanks james --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: newforms

2007-07-20 Thread james_027
or something > ? If so, can somebody post a screenshot please ? > > Alper KANAT ([EMAIL PROTECTED])http://raptiye.org > > Thomas Guettler yazmış: > > > Am Freitag, 20. Juli 2007 07:53 schrieb james_027: > >> Which official django apps are using the newforms? I just

  1   2   >