Custom User

2021-05-06 Thread Owen Murithi
How do I make password for AbstractUser Hashed? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussio

Unwelcome error!

2019-05-20 Thread 'Stephen Owen' via Django users
Hi, all, I am creating a blog in Django, following lectures on You Tube. Everything was working fine and then an error occurred that I could fathom. So I have now just started a new project. One accessing localhost, I got the expected page but when I tried localhost I got this (attached.) Any

Re: Django 1.9 ./manage.py migrate error

2017-01-31 Thread Owen Chung
That works for me. You save my life. Thank you! On Friday, June 3, 2016 at 12:26:04 PM UTC-4, Tejesh Papineni wrote: > > its working when already have a db because views.py are using Models from > already existing db. But when creating new db, code in views.py is trying > to access Models that h

How to fetch data from LDAP to html textbox

2016-11-02 Thread Owen Cai
I am pretty new to Python and Django. Recently my team ask me to develop a web app based on Django 1.9 for the company. The authentication part involved using LDAP but not a common way I can search in google. On the top of the interface will have 2 button "use for self" and "use for others" Unde

How to fetch data from LDAP to HTML textbox

2016-11-02 Thread Owen Cai
I am new to Python and Django. Recently, my team ask me to develop a Django web app for the company. It requires use LDAP authentication in Django but not a common way that I can search on google. On index.html page. I will create two button "use for self" and "use for others", there will be co

Downloaded Django but the command prompt wont recognize commands

2016-08-06 Thread owen
jango-admin' is not recognized as an internal or external command, operable program or batch file. However I found the django-admin file by a search ...the command prompt window does not recognize it though. Can someone help me Regards, Owen -- You received this message becau

Trying to set up a website using Django but something went wrong

2016-08-06 Thread owen
ognized as an internal or external command, operable program or batch file.' I know django-admin is there because I searched for it...Can someone please help Regards, Owen -- You received this message because you are subscribed to the Google Groups "Django users" group. To un

Re: Overriding flatpages class meta

2010-08-31 Thread Owen Nelson
sions, but hey -- if it works, it works. Owen Nelson On Tue, Aug 31, 2010 at 12:38 PM, Karim Gorjux wrote: > Try to modify the flatpages source! You can find it directly in your > django installation. > > > -- > Karim Gojux > www.karimblog.net > > -- > You re

Re: Overriding flatpages class meta

2010-08-31 Thread Owen Nelson
The meta class instance is accessed through ClassName._meta -- not ClassName.meta I tried this when I got back last night and had (other) issues myself, so this might not be the right approach anyway. -- You received this message because you are subscribed to the Google Groups "Django users" gro

Re: Overriding flatpages class meta

2010-08-30 Thread Owen Nelson
Sorry to be guessing here, but I was looking at something similar recently. My attempt (untested at this point) would be something like: from copy import copy class NewFlatpage(FlatPage): _meta = copy(FlatPage._meta) _meta.verbose_name_plural = "foo" -- You received this message because

Re: Model validation for non-django-orm databases

2010-08-30 Thread Owen Nelson
Sounds good. Thanks for the advice! -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. Fo

Re: Model validation for non-django-orm databases

2010-08-30 Thread Owen Nelson
> With the hack i think you mean, it doesn't matter, just pick one, the > point of the hack is you just shamelessly lie to the django ORM. So make > sure to make your model ummanaged and _don't_ try to save. > Excellent. Yeah, I'd been planning on overriding save() to make it raise NotImplemented

Re: models as a package

2010-05-03 Thread Owen Nelson
Something I've seen that isn't particularly well documented (if at all)... If you have a model that isn't in your foo.models (ie, the top models.py for the app), and have a package setup, you need to add an app_name property to your model classes. Example myproject/ foo_app/ <-- needs to be in

Re: How to ordered comments by date ???

2010-04-16 Thread Owen Nelson
The comments are already ordered... by pk I assume, which would mean they are also ordered by date (unless you're messing with the comment id's or the dates themselves). If you simply want to switch the order from ascending to descending, maybe try the "reversed" parameter for the "for" tag: http:/

Re: Configure Django with mod_python on Ubuntu server

2010-04-16 Thread Owen Nelson
Opps! Since it's an alias, you need to tell apache what server location to map. For example, if you want http://localhost/ to map to your application: WSGIScriptAlias / /path/to/my/wsgi/my.wsgi Or if you wanted http://localhost/myapp to map instead WSGIScriptAlias /myapp /path/to/my/wsgi/my.wsgi -

Re: Configure Django with mod_python on Ubuntu server

2010-04-16 Thread Owen Nelson
The WSGIScriptAlias directive should point directly to the wsgi script -- in your case the line should read: WSGIScriptAlias /home/carlo /home/carlo/mysite/django.wsgi -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, s

Re: Giving up PHP. ...Can't decide between Django & Rails

2010-04-15 Thread Owen Nelson
I came from a job where I had been crafting applications using zend framework - probably the closest thing php has to django. The more object oriented my php code became, the more it looked, and smelled, like java. I ended up taking a new job, where my projects started to have dependencies on othe

Re: Catching User's First Log in

2010-04-05 Thread Owen Nelson
Although, I guess you could argue that a proxy class with a @property method could achieve the same thing. from django.contrib.auth.models import User as DjangoUser class User(DjangoUser): class Meta: proxy = True @property def is_new(self): return None == self.last_log

Re: Catching User's First Log in

2010-04-05 Thread Owen Nelson
I guess it depends on the implementation of the auth backend you're using. Really though, it seems like using a bool flag involves less "magic", and is perhaps more descriptive than making assumptions based on timestamps. if user.is_new: redirect(somewhere) rather than... if user.last_login is Non

Re: Catching User's First Log in

2010-04-05 Thread Owen Nelson
> it does feel a little bit dirty to me. Me too, that way leads to deciding something is a witch just because it floats. Can't argue with a Bool, and also, it might eventually be nice to be able to flip the bit on a whim (say a user wanted that "out of the box" experience all over again). --

Re: Catching User's First Log in

2010-04-05 Thread Owen Nelson
That would be the strategy I'd employ - however I'd recommend you not add the field to the user itself, but rather its profile. http://docs.djangoproject.com/en/dev/topics/auth/#storing-additional-information-about-users -- You received this message because you are subscribed to the Google Groups

Re: conditional loading of template tags

2010-04-05 Thread Owen Nelson
Tim Shaffer wrote: > I haven't tested this at all, but maybe try putting all the tagging > stuff, include {% load tagging_tags %}, in a separate template, then > wrapping the if statement around an include for that template: > > {% if object.tags %} > {% include "tag_stuff.html" %} > {% endif %}

Re: Generic views problem

2009-07-07 Thread Owen Jeremiah
ly do something". -- Andrew On Jul 7, 6:39 am, "Owen Jeremiah" wrote: > I'm following the tutorial from django documentation and got to part 4 about > generic views. But I can't get the Poll objects in my dictionary, and the > result is 'No polls are available.&#x

Generic views problem

2009-07-07 Thread Owen Jeremiah
I'm following the tutorial from django documentation and got to part 4 about generic views. But I can't get the Poll objects in my dictionary, and the result is 'No polls are available.' I'm running this in Ubuntu 9.04 with Python 2.6 and Django 1.0.2 installed. I would appreciate it if somebod

RE: "unexpected indent" error not allowing me to add the poll app to the admin site

2008-01-06 Thread owen
you probably should look at the python tutorial: > http://docs.python.org/tut/tut.html > in particular section 3.2 First Steps Toward Programming > Owen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups &q

Re: Can I use a underscore in my url to separate variables?

2008-01-01 Thread owen
I think that should be an underscore: [a-zA-Z_] Owen -Original Message- From: Greg <[EMAIL PROTECTED]> Sent: Tuesday, January 1, 2008 10:36pm To: Django users Subject: Re: Can I use a underscore in my url to separate variables? ocgstyles, I'm not sure what's going on