#x27;t posted any
code that can reproduce the problem. It doesn't need to be the actual code,
in fact the simpler the example is the better.
Cheers,
Alasdair
[1]: https://docs.djangoproject.com/en/1.9/releases/1.8/#testcase-data-setup
[2]:
https://docs.djangoproject.com/en/1.9/topics/testi
Hi eduardo,
Have you tried the following?
pip install mysqlclient
Usually, you should use the package name, you don't need to specify the
specific wheel you want to install.
Cheers,
Alasdair
On 20/05/15 16:03, eduardo.canaljun...@gmail.com wrote:
Hi, sorry but I tryed to in
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://
github repository to make a PyPi
release.
Django 1.8 is in beta at the moment, hopefully django-formtools will be
on PyPi by the time Django 1.8 is released. In the meantime, you can
install django-formtools from github with:
pip install git+ssh://g...@github.com/django/django-formtools
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
{% cycle hello "Fine!" %}.
{% endwith %}
On 05/03/15 16:48, Vijay Khemlani wrote:
> Changing the double quotes for single quotes seems to do the trick,
but I don't know why it works
If you use single quotes and render the template, it outputs 'Hello',
not '
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
ming host
> validation, thus an entry with a trailing dot isn’t required.
cheers,
Alasdair
On 22/12/14 12:05, Alex Haylock wrote:
Thanks Markus.
So, as per the RFC, are 'example.com' and 'example.com.' considered to
be the same domain, or two separate domains?
Are there an
Hi Collin,
On 17/11/14 21:19, Collin Anderson wrote:
Hi Alasdair,
I'm upgrading to Django 1.7, and updating my forms to use the new
form.add_errors() method.
I have one remaining pattern which uses form._errors.
class MyForm(forms.Form):
...
def
use self.errors instead? Looking at the source code [2],
errors is a property, not an attribute. By the time the clean() method
is called, self._errors should have been created, so I think that
accessing self.errors should be safe.
cheers,
Alasdair
[1]: https://docs.djangoproject.com/en/dev/rel
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
--
retry and follow the instructions, it should work.
You can select the version of the tutorial using the selector in the
bottom-right corner of the screen.
Cheers,
Alasdair
On 10/12/13 22:19, Suhendri wrote:
Hi,
I'm new in Django, I'm excited with Django so I have to following th
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
? 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
he template
includes the following statement.
{% load url from future %}
If you don't include this, then the alternative is to remove the quotes,
as you found.
Hope that explains things.
Cheers,
Alasdair
https://docs.djangoproject.com/en/dev/releases/1.3/#changes-to-url-and-ssi
(.*)$ 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
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
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
onsole.
Should I consider this behaviour as a bug or I am doing something
wrong?
The delete select action uses the queryset's delete method [1], which
means the model's delete method is not called.
It's not a bug, the behaviour is documented on the admin actions page. [2]
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.
--
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
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
_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
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
following {{ text|markdown }}
with and without the safe parameter!
text = """
alert(boo!);
**This is bold**
"""
Regards,
Alasdair
On 07/10/11 15:04, arkai...@gmail.com wrote:
Hi,
I am aware that Markdown is a formatting language like textile or any
other.
It is
Hi John,
Use select_related [1] to tell Django to 'follow' the foreign key. Try
the following:
testmodels =
models.ATestModel.objects.all().select_related('other').only('other__name')
print testmodels[0].other.name
Regards,
Alasdair
[1]:
https://docs.djang
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
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
On 19/07/11 11:08, NISA BALAKRISHNAN wrote:
how to add url names to the following entry in urls.py.
( r'^all/synchro/download/file/', "get_all_data_download" )
Use the url function [1]
url( r'^all/synchro/download/file/', "get_all_data_download",
n
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.
https://docs.djangoproject.com/en/dev/ref/forms/api/#prefixes-for-forms
Regards,
Alasdair
On 15/06/11 14:09, Thomas Weholt wrote:
I got several forms I need to display in one page and post to one
site. Actually, what I want to do is take all the fields from all the
forms and display them as
I have used djangohosting.ch before and recommend them. As BR says it's
very easy to deploy, and I thought their support was super.
Alasdair
On 08/06/11 22:13, Tiago Almeida wrote:
I use http://djangohosting.ch/ for a small company website and haven't
experienced any issues on
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 in
I got the admin to use the models.Manager() by overriding the queryset
method in my EntryAdmin class:
class EntryAdmin(admin.ModelAdmin):
[...]
def queryset(self, request):
return Entry.objects
--~--~-~--~~~---~--~~
You received this message becaus
Thanks for your reply, Peter. When I set live = BadManager(), it
properly returns posts, so maybe the issue is with my
LiveEntryManager:
class LiveEntryManager(models.Manager):
def get_query_set(self):
return super(LiveEntryManager,self).get_query_set().filter
(status=self.model.LIVE_
I've defined a custom manager
class Entry(models.Model):
[...]
live = LiveEntryManager()
objects = models.Manager()
so that when I use _default_manager.all() it uses the LiveEntryManager
().
However, the django admin is now also using LiveEntryManager. How can
I get the admin to use
ok at the docs at
http://docs.djangoproject.com/en/dev/ref/generic-views/#django-views-generic-date-based-archive-year
Alasdair
On Aug 11, 1:27 am, Matthew wrote:
> I am using Django's generic views to create a blog site. The
> templates I created, entry_archive_day, ent
don't know if this helps - there might be a way grab it without
DarwinPorts trying to install PostgreSQL but I don't know of a way.
Please excuse my ignorance in these matters...
- Alasdair
--~--~-~--~~~---~--~~
You received this message because you a
PostgreSQL and psycopg without SSL support, or something
like that.
I hope everything works out - keep us posted.
- Alasdair
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to
39 matches
Mail list logo