Email Validation when adding a user to the backend

2013-09-09 Thread vanderkerkoff
Hello there. We're running a 1.1 django application and have run into a bit of a problem. Recently our organisation decided to change its email addresses. Moving from myn...@domain.com, to firstname.secondn...@domain.com I've just tried adding a user to the site and I'm bumping up against an i

Doing something silly, I'm sure

2012-03-30 Thread vanderkerkoff
Sorry everyone, but this is driving me crazy https://docs.djangoproject.com/en/1.2/topics/auth/ urls.py (r'^accounts/login/$', 'django.contrib.auth.views.login'), view.py if pg.registration_required and not request.user.is_authenticated(): return HttpResponseRedirect('/accounts/login/?next=%s'

Re: Using the backend database to secure a page on the frontend

2012-03-30 Thread vanderkerkoff
sion-req... > > You could add some extra permissions to your models too if you need > them:https://docs.djangoproject.com/en/1.4/ref/models/options/#permissions > > Kind regards > Phil > > On 30/03/2012 10:28, vanderkerkoff wrote: > > > > > > > > &g

Using the backend database to secure a page on the frontend

2012-03-30 Thread vanderkerkoff
Hello there I"m sure this question has been answered before but I just can't find it, apologies. We've got a django 1.1.2 site and I need to secure some sections of the frontend, and use the users and groups model in the backend as the database to provide authentication. I really don't know wher

Re: Importing html from an external assets server to manage headers and footers

2011-11-22 Thread vanderkerkoff
Thanks Tom I went for option 2. Here's what I've done so far, works ok at the moment, will need some tidying up and caching. geturl.py in my mytags/templatetags folder from django import template from django.template import Library, Node register = Library() class GetUrlNode(Node): de

Importing html from an external assets server to manage headers and footers

2011-11-22 Thread vanderkerkoff
Hello everyone I've done some initial digging and found some solutions that I can't seem to get working for a variety of reasons, thought I'd ask here. We've got an external assets server that spews out html. I need to load up that html in the base.html template. Something like {% render_html

Re: feed updates stopped working

2011-09-01 Thread vanderkerkoff
got it, f7*&*%678^&*&&*& bast987^&^&** http://forum.zentyal.org/index.php?topic=7006.0 Thanks Reinout On Sep 1, 3:05 pm, vanderkerkoff wrote: > right, the plot thickens, but I don't think it's django or python > related > > ps aux | grep cron

Re: feed updates stopped working

2011-09-01 Thread vanderkerkoff
right, the plot thickens, but I don't think it's django or python related ps aux | grep cron shows it running, but this does not work 03 15 * * * /bin/echo "foobar" >> /home/user/wanker so cron isn't running the jobs, it is running though Nearly there :-) O

Re: feed updates stopped working

2011-09-01 Thread vanderkerkoff
t variable DJANGO_SETTINGS_MODULE is undefined. On a working machine that uses site-packages and exactly the same fact.pth file, I don't get that error On Sep 1, 2:22 pm, Reinout van Rees wrote: > On 01-09-11 15:11, vanderkerkoff wrote: > > > Thanks for trying though, I w

Re: feed updates stopped working

2011-09-01 Thread vanderkerkoff
r/lib/python2.6/dist-packages That dist-packages folder has the fact.pth file in it, as well as all the other python modules that are working correctly. Thanks for trying though, I will find the problem, eventually :-) On Sep 1, 2:00 pm, Reinout van Rees wrote: > On 01-09-11 14:42, v

feed updates stopped working

2011-09-01 Thread vanderkerkoff
I wonder if someone can help me here We've been using cron to run an update script that looks in our django commmunity pages(aggy), pulls out Feeds and creates feeditems. Here's what an example of the cron file looks like 17 13 * * * /var/www/django/django_projects/scripts/computing_feeds.sh He

Trying to simplify the last post

2011-08-09 Thread vanderkerkoff
Hello there I'm trying to make this as easy as possible, but it's pretty complicated. Here's my form class EventBookForm(ModelForm): """A form for governors to email to govwales with details of which events they wish to attend""" title = CharField() firstname = CharField(

Passing data between the view and the form

2011-08-09 Thread vanderkerkoff
Hello there I've got an event model, which has an association with multiple workshops models.py class Event(models.Model): workshops = models.ManyToManyField(Workshop, related_name='evt_workshop', limit_choices_to = {'lang_code__in': ('B', 'E')}, blank=True, null=True) I've got a form that I the

Re: using the request object inside a form

2011-08-02 Thread vanderkerkoff
Thanks Daniel I told you I was doing something stupid :-) V On Aug 2, 5:22 pm, Daniel Roseman wrote: > The problem isn't in the code you've posted, but in how you instantiate the > form in your view. You need to actually pass in 'request' as a keyword > argument. > -- > DR. -- You received

using the request object inside a form

2011-08-02 Thread vanderkerkoff
Hello there. I need to use parts of the URL to calculate some thing inside my form. Here's a stripped down version, I can't seem to get it to give me anything other than none for self.request :-( class EventBookForm(ModelForm): title = CharField() firstname = CharField()

mysql MySQL-python and libmysqlclient.so.16 hell

2011-03-01 Thread vanderkerkoff
Hi everyone This is completely driving me crazy :-) I've installed(reinstalled many times) mysql5.5.9 from source, followed this guys instructions http://greensysadmin.com/2011/01/24/mysql-5-5-installing-from-source-ubuntu-debian/ Then downloaded and installed django1.2.4 from source Then down

Re: ManyToMany fields and ordering in the admin

2011-02-11 Thread vanderkerkoff
had been moved into admin.py, obviously not :-) matt On Feb 11, 8:04 am, vanderkerkoff wrote: > django1.2.4 > > I've got a document model > > class Document(models.Model): >         LANG_CODE = ( >                 ('B', 'Both'), >  

ManyToMany fields and ordering in the admin

2011-02-11 Thread vanderkerkoff
django1.2.4 I've got a document model class Document(models.Model): LANG_CODE = ( ('B', 'Both'), ('E', 'English'), ('C', 'Cymraeg'), ) title = models.CharField(max_length=100) slug = models.SlugField(max_length=100, u

Re: File Upload

2011-02-06 Thread vanderkerkoff
Thanks again Karen On Feb 6, 6:06 pm, Karen Tracey wrote: > On Sun, Feb 6, 2011 at 12:45 PM, vanderkerkoff wrote: > > I got it :-) > > > import os > > PROJECT_PATH = os.path.abspath(os.path.dirname(__file__)) > > > # MEDIA_ROOT = ( > > #       o

Re: File Upload

2011-02-06 Thread vanderkerkoff
he same method above to grab templates, and that works ok at least we got it sorted thanks again On Feb 6, 5:16 pm, vanderkerkoff wrote: > Hi Karen > > I promise you I'm changing the code that I'm displaying, I've been > updating the app all day,  just tying off

Re: File Upload

2011-02-06 Thread vanderkerkoff
brand new mac install if that's anything to go by thanks for helping, it is really appreciated On Feb 6, 4:39 pm, Karen Tracey wrote: > On Sun, Feb 6, 2011 at 11:11 AM, vanderkerkoff wrote: > > Hi Karen > > > Thanks for getting back > > > Here's the model def

Re: File Upload

2011-02-06 Thread vanderkerkoff
Hiya both I'm outputting all the data types I'm saving now in a save in the admin.py, they're all strings :-( I'm going to kick myself when I find it On Feb 6, 4:11 pm, vanderkerkoff wrote: > Hi Karen > > Thanks for getting back > > Here's the model

Re: File Upload

2011-02-06 Thread vanderkerkoff
Hi Karen Thanks for getting back Here's the model def http://dpaste.com/391872/ On Feb 6, 3:33 pm, Karen Tracey wrote: > On Sun, Feb 6, 2011 at 9:50 AM, vanderkerkoff wrote: > > I'm trying to upload a file in a project, the app is called Documents, > > here'

File Upload

2011-02-06 Thread vanderkerkoff
Hello everyone I'm trying to upload a file in a project, the app is called Documents, here's the admin.py from django.contrib import admin from governors.documents.models import Document import datetime class DocumentAdmin(admin.ModelAdmin): fields = ('title','slug','the_file','lang_code

Re: Upgrading to 1.2.4

2011-02-06 Thread vanderkerkoff
Aha I had the old admin line still in the urls file beneath the new one, it was twistin the melons :-) I've deleted the old line and all is well. On Feb 6, 1:38 pm, vanderkerkoff wrote: > Hi Guys > > I've gone a long way to upgrade an application we wrote in ages ago in

Upgrading to 1.2.4

2011-02-06 Thread vanderkerkoff
Hi Guys I've gone a long way to upgrade an application we wrote in ages ago in really old django to new django, I've got stuck some way into it though. Front end all sorted, I can fire up the app so the admin.py stuff is all working, but when I click on anything inside the admin, for this example

django.utils.functional.__proxy__ object

2010-07-04 Thread vanderkerkoff
Evening all I've just moved a really old django project of ours over to a new machine, newer python, and newer mysql. I'm using a mentally old version of django, revision 5783. The move has gone tickety boo, we're using nginx instead of lighttpd as well. The only oddity I've got is that in the

admin site form encoding

2007-09-07 Thread vanderkerkoff
Has anyone experienced any problems with getting IE browsers to recognize that they should be using the default_charset when entering data into forms in the admin site? I'm having a hell of a time of it, all unicode, new trunk, front end running of lighttpd, all set to utf8, database utf8, no pro

content type with runserver

2007-08-29 Thread vanderkerkoff
Is it possible to set the content type using runserver in development in the same way you'd set lighttpd to use utf-8 as described below? mimetype.assign = ( ".css"=> "text/css; charset=utf-8", ".gif"=> "image/gif", ".htm"=> "text/html; charset=utf-8", ".html"

Re: Anyone built a django site in Welsh?

2007-08-29 Thread vanderkerkoff
if you set lang_code to cy in settings.py the labels in the admin ar ein welsh, home is adref etc etc On Aug 29, 8:36 am, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > On 29-Aug-07, at 12:58 PM, vanderkerkoff wrote: > > > I was wondering if anyone in this group had buil

Anyone built a django site in Welsh?

2007-08-29 Thread vanderkerkoff
Hello everyone I was wondering if anyone in this group had built a django powered site in the welsh language, that is, with Welsh Language content and using Django's built in Welsh Admin backend? I'd be really interested in starting up a conversation. --~--~-~--~~~-

CheckboxField problem when not ticked

2007-08-24 Thread vanderkerkoff
hello everyone. I'm using a manipulator in an applications view file. class RegistrationManipulator(AuthenticationForm): def __init__(self, request): AuthenticationForm.__init__(self, request) self.fields = ( forms.TextField(field_name="username", is_required=True

Re: RSS2 feeds and overwriting the item description

2007-08-13 Thread vanderkerkoff
I found it One of our developers had created a file called latestnews_description.html in the feeds folder. This was outputting the body. I've now added description_template into all the feeds and either used a generic {{ obj.body_html }} or some other type of output depending on the nature of

Re: email_message documentation

2007-08-01 Thread vanderkerkoff
Thanks Kpoh There's a misleading piecve of documentation in there about EmailMultiAlternatives I've reported a ticket to trac to fix it. http://code.djangoproject.com/ticket/5042#preview On Aug 1, 10:43 am, KpoH <[EMAIL PROTECTED]> wrote: > check this outhttp://www.djangoproject.com/documentat

unicode trouble

2007-07-09 Thread vanderkerkoff
Hello everyone, using newest django trunk as of today I've written a save overide in my models file to textile the entries, here's the bit of that code I'm having trouble with. def __unicode__(self): return self.title def save(self): if self.summary:

Re: summary field

2007-07-04 Thread vanderkerkoff
Ignore me generic views have nothing to do with fields my bad On Jul 4, 12:34 pm, vanderkerkoff <[EMAIL PROTECTED]> wrote: > Quick question, I think I know the answer I just want someone to > confirm. > > We've got alot of apps in our project that use generic view

summary field

2007-07-04 Thread vanderkerkoff
Quick question, I think I know the answer I just want someone to confirm. We've got alot of apps in our project that use generic views. One of which is a noticeboarad app. I don't want to have a summary field in this app, but want to use generic views, but want to use generic views in the other

Re: Broken pipes with HttpResponseRedirect and Firefox / Trouble in paradise

2007-05-31 Thread vanderkerkoff
Hello everyone We're having a similar issue, still trying to debug it now. We don't have a form on the page where the issue is, but there is a slight difference in error message. We get the same as Jon but hsi line is also in there. File "/usr/local/lib/python2.5/site-packages/django/core/serv

inclusion tags or simple tags

2007-02-19 Thread vanderkerkoff
Hello everyone, pretty new to this stuff so please bear with me. I've written a simple bit of python in my mytags directory to output our aggregated feeds form our feedjack application that we built last week. def rssfeeds(request, slag): import feedparser if slag == 'researchnew