Re: Fixtures won't load twice in same testcase

2016-05-06 Thread Alasdair Nicol
Hi Rich, Regarding a couple of things you mentioned on Django-developers: On Thursday, 5 May 2016 19:20:16 UTC+1, Rich Rauenzahn wrote: > > > Thanks, Tim. > > Unfortunately I can't move past Django 1.7 yet -- dependencies. I've been > marching my way up one revision at a time hopefully up to 1.

Re: django1.7, python3.4 and MySQL

2015-05-20 Thread Alasdair Nicol
"%s is not a supported wheel on this platform." % wheel.filename) pip.exceptions.UnsupportedWheel: mysqlclient-1.3.6-cp34-none-win_amd64.whl is not a supported wheel on this platform. -- Alasdair Nicol Developer, MEMSET mail: alasd...@memset.com web: http://www.memset.com/ Memset Ltd.,

Re: Django 1.8 tutorial-Chapter4: ValueError at /polls/1/vote/

2015-05-14 Thread Alasdair Nicol
On 14/05/15 02:50, charito.romeo wrote: | | The problem is that there is a new line in the middle of "{{ choice.id }}". Change it to: value="{{ choice.id }}"/> Cheers, Alasdair -- Alasdair Nicol Developer, MEMSET mail: alasd...@memset.com web: http://

Re: Django 1.8 ImportError: No module named formtools

2015-03-12 Thread Alasdair Nicol
1d119-292b-4514-bce3-b2a0e9176e7e%40googlegroups.com?utm_medium=email&utm_source=footer>. For more options, visit https://groups.google.com/d/optout. -- Alasdair Nicol Developer, MEMSET mail: alasd...@memset.com web: http://www.memset.com/ Memset Ltd., registration number 4504980. Bui

Re: TemplateSyntaxError with {% cycle "Hello, how are you?" "Fine!" %}

2015-03-06 Thread Alasdair Nicol
wasn't clear. By 'as expected', I meant that you want the cycle tag to return "Hello, how are you". Switching to single quotes isn't a fix, because it only returns 'Hello'. Cheers, Alasdair -- Alasdair Nicol Developer, MEMSET mail: alasd...@memset.com w

Re: TemplateSyntaxError with {% cycle "Hello, how are you?" "Fine!" %}

2015-03-05 Thread Alasdair Nicol
Hello, how are you?' as expected. Cheers, Alasdair [1] https://docs.djangoproject.com/en/1.7/ref/templates/builtins/#cycle -- Alasdair Nicol Developer, MEMSET mail: alasd...@memset.com web: http://www.memset.com/ Memset Ltd., registration number 4504980. Building 87, Dunsfold Park, Stovo

Re: TemplateSyntaxError with {% cycle "Hello, how are you?" "Fine!" %}

2015-03-05 Thread Alasdair Nicol
On 05/03/15 16:53, Alasdair Nicol wrote: {% with hello="Hello, how are you?" {% cycle hello "Fine!" %}. {% endwith %} Oops, that should have read: {% with hello="Hello, how are you?" %} {% cycle hello "Fine!" %}. {% endwith %} -- Alasdair Nicol Deve

Re: malicious requests?

2014-12-22 Thread Alasdair Nicol
this malicious behaviour, or just users mistyping the URL? Also, browsers are clearly treating the final '.' as part of the path (as these requests are reaching my application), but Django is treating the '.' as part of the hostname. Which is right?

Re: Replacing usage of form._errors in Django 1.7

2014-11-20 Thread Alasdair Nicol
ndividual fields." https://docs.djangoproject.com/en/dev/ref/forms/validation/#form-subclasses-and-modifying-field-errors Thanks for your reply, and your link to the docs. I can go ahead and replace my occurrences of self._errors with self.errors with confidence :) Cheers, Alasdair -- Alasdair

Replacing usage of form._errors in Django 1.7

2014-11-14 Thread Alasdair Nicol
eases/1.7/#form-add-error [2]: https://github.com/django/django/blob/1.7.1/django/forms/forms.py#L150 -- Alasdair Nicol Developer, MEMSET mail: alasd...@memset.com web: http://www.memset.com/ Memset Ltd., registration number 4504980. Building 87, Dunsfold Park, Stovolds Hill, Cranleigh, Surr

Re: Did Ubuntu 14.04 or Linux Mint 17 break your Django project files?

2014-07-16 Thread Alasdair Nicol
s_cheese = models.BooleanField(default=False) For more info see the release notes [1]. It would be worth going through them to see if there are any other changes you should or need to make. [1]: https://docs.djangoproject.com/en/dev/releases/1.6/#booleanfield-no-longer-defaults-to-false Cheers, Alasdair --

Re: Writing your first Django app, part 1 (1.6)

2013-12-11 Thread Alasdair Nicol
. Did I missed something in the tutorial ? Could you help me, to solve this problem so i can continue learn the tutorial. -- Alasdair Nicol Developer, MEMSET mail: alasd...@memset.com web: http://www.memset.com/ Memset Ltd., registration number 4504980. Building 87, Dunsfold Park, Stovo

Re: Long url parameter in GET request locks python

2013-01-30 Thread Alasdair Nicol
k.views.isProjectDuplicate'), For a further explanation, see the question "url regex keeps django busy/crashing" [1] from the django-users group. [1]: https://groups.google.com/d/msg/django-users/Bxq9i0mttSc/DEz7S7M8lxAJ Cheers, Alasdair -- Alasdair Nicol Developer, MEMSET

Re: A question about Model.full_clean

2012-06-01 Thread Alasdair Nicol
? The default value for the CharField is the empty string, which as you show in your first example, doesn't cause a problem. Cheers, Alasdair -- Alasdair Nicol Developer, MEMSET mail: alasd...@memset.com web: http://www.memset.com/ Memset Ltd., registration number 4504980. 25 Frederick

Re: Possible bug in the Django documentation

2012-05-14 Thread Alasdair Nicol
https://docs.djangoproject.com/en/1.4/topics/auth/ -- Alasdair Nicol Developer, MEMSET mail: alasd...@memset.com web: http://www.memset.com/ Memset Ltd., registration number 4504980. 25 Frederick Sanger Road, Guildford, Surrey, GU2 7YD, UK. -- You received this message because you are subscribed to t

Re: Problems with {% url %} in templates

2012-03-29 Thread Alasdair Nicol
(.*)$ in the regex for the include. The documented pattern [1] for the include is (r'^d/events/', include('myproject.events.urls')), Regards, Alasdair [1]: https://docs.djangoproject.com/en/dev/topics/http/urls/#including-other-urlconfs -- Alasdair Nicol Developer, M

Re: Trouble setting up website with mysql as backend

2012-03-17 Thread Alasdair Nicol
with a really long name, or * defined a model with a really long name so that "Can view " is longer than 50 characters. Regards, Alasdair Nicol [1]: https://docs.djangoproject.com/en/dev/topics/auth/#default-permissions -- Alasdair Nicol Developer, MEMSET mail: alasd...@memset.com web

Re: Help on forms.py

2012-02-16 Thread Alasdair Nicol
27;keyword1'), ('keyword1', 'keyword1')] What you probably want is a ModelChoiceField [1], which takes a queryset argument. keywords = forms.ModelChoiceField(queryset=Keyword.objects.all()) [1]: https://docs.djangoproject.com/en/dev/ref/forms/fields/#modelchoice

Re: Model.delete() was not called.

2012-02-16 Thread Alasdair Nicol
Cheers, Alasdair [1]: https://docs.djangoproject.com/en/dev/topics/db/queries/#deleting-objects [2]: https://docs.djangoproject.com/en/dev/ref/contrib/admin/actions/#admin-actions -- Alasdair Nicol Developer, MEMSET mail: alasd...@memset.com web: http://www.memset.com/ Memset Ltd., registration nu

Re: MySQL limit sub-query problem

2012-01-26 Thread Alasdair Nicol
a separate query: total_objects = (obj_assigned | obj_class.objects.filter(pk__in=list(inner_q))) Alasdair -- Alasdair Nicol Developer, MEMSET mail: alasd...@memset.com web: http://www.memset.com/ Memset Ltd., registration number 4504980. 25 Frederick Sanger Road, Guildford, Surrey, GU2 7YD, UK. --

Re: change min_length in form __init__?

2012-01-13 Thread Alasdair Nicol
lidators in the __init__ method instead, Cheers, Alasdair [1]: http://stackoverflow.com/questions/8818261/django-change-min-length-in-form-init/ -- Alasdair Nicol Developer, MEMSET mail: alasd...@memset.com web: http://www.memset.com/ Memset Ltd., registration number 4504980. 25 Frederick San

Re: Class-Based Generic Views (CreateView) - field exclusions and defaults

2012-01-12 Thread Alasdair Nicol
def form_valid(self, form): form.instance.user = request.user return super(CreateCampaignView, self).form_valid(form) I haven't had a chance to test the code. I hope that it works, or at least leads you in the right direction! Regards, Alasdair -- Alasdair Nicol Developer, MEM

Re: clean function for field that may be blank

2011-11-16 Thread Alasdair Nicol
_birth: if date_of_birth.year < 1890: raise forms.ValidationError(u"It is very improbable...") return date_of_birth Regards, Alasdair -- Alasdair Nicol Developer, MEMSET mail: alasd...@memset.com web: http://www.memset.com/ Memset Ltd., registration number 4

Re: Strange traceback: DoesNotExist not callable

2011-10-20 Thread Alasdair Nicol
process is handles a different request later on, you get the type error because your code is trying to call the DoesNotExist instance which has replaced Sample.MultipleObjectsReturned. tschüss, Alasdair -- Alasdair Nicol Developer, MEMSET mail: alasd...@memset.com web: http://www.memse

Re: Filtering html for django comments

2011-10-07 Thread Alasdair Nicol
is group at http://groups.google.com/group/django-users?hl=en. -- 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-use

Re: ORM only/defer calls do not work on cross-table relations

2011-09-27 Thread Alasdair Nicol
dule_othermodel"."id" = 1 The 'only' call does nothing, and two queries are made when one would have sufficed (SELECT testmodule_othermodel.name FROM testmodule_atestmodel LEFT JOIN testmodule_othermodel ON testmodule_atestmodel.id = testmodule_othermodule.id). This raise

Re: AssertEquals __unicode__

2011-08-25 Thread Alasdair Nicol
oice_number self.assertEqual("2011/1", invoice) AssertionError: '2011/1' != Thanks for help Torsten You want to compare the unicode string for the object, so use the unicode function. The following should work: self.assertEqual("Invoice: 2011/1", unicode

Re: [ANN]: FeinCMS v1.4.0.rc1

2011-08-08 Thread Alasdair Nicol
account anymore. Great news Matthias! We're looking forward to using 1.4, especially the django-reversion support. Regards, Alasdair -- Alasdair Nicol Developer, MEMSET mail: alasd...@memset.com web: http://www.memset.com/ Memset Ltd., registration number 4504980. 25 Frederick Sanger

Re: url names

2011-07-19 Thread Alasdair Nicol
ame="get_all_data_download" ) Alasdair [1] https://docs.djangoproject.com/en/dev/topics/http/urls/#url -- Alasdair Nicol Developer, MEMSET mail: alasd...@memset.com web: http://www.memset.com/ Memset Ltd., registration number 4504980. 25 Frederick Sanger Road, Guildford, Surrey, GU2

Re: Linking to Django Admin from 1.3

2011-07-14 Thread Alasdair Nicol
template using: {% url admin:index %} For Django 1.3, the documented way [2] to include the admin site is: *url(r'^admin/', include(admin.site.urls)),* Regards, Alasdair Nicol [1] https://docs.djangoproject.com/en/dev/topics/http/urls/#url-namespaces [2] https://docs.djangoproject.

Re: Multiple forms into one form/trouble accessing form fields

2011-06-15 Thread Alasdair Nicol
. An alternative to this is a FormWizard, but that makes the user click thru a bunch of steps, which could be avoided if I could get all the fields into one new form. -- Alasdair Nicol Developer, MEMSET mail: alasd...@memset.com web: http://www.memset.com/ Memset Ltd., registration number

Re: VERY cheap django hosting?

2011-06-08 Thread Alasdair Nicol
ve me some hosts that are very cheap for django hosting? Is hostgator any good? I really don't know what to look for in a host. A lot of people are recommending web faction, but its around $9 bucks a month. I was looking in the $5 bucks a month range. Any ideas? Thank you. -Raj -- Alasdair

Re: login -->then on success--> my custom page

2011-04-05 Thread Alasdair Nicol
If you only need to change the success url, then use the LOGIN_REDIRECT_URL setting [1]. You won't need to customise the login page. Alasdair [1] http://docs.djangoproject.com/en/dev/ref/settings/#login-redirect-url On 05/04/11 10:14, GOUTAM KUMAR RANA wrote: please help me to make or inherit