Thanks Gergely,
That solved it for me.
Wim
On Sunday, 31 May 2015 09:58:32 UTC+2, Gergely Polonkai wrote:
>
> I had this error when I had two Django application with the same domain
> and both with the same (default) CSRF cookie name. Changing the cookie name
> to something different solved
Hi Tom,
Thanks for making this clear!
Now I explicitly save the session and everything works as supposed.
Thanks again!
Wim
On 3 June 2013 15:19, Tom Evans <tevans...@googlemail.com> wrote:
> On Mon, Jun 3, 2013 at 11:48 AM, Wim Feijen <w...@go2people.nl> wrote:
> > Hi,
Hi Daniel,
I would definitely recommend ordering a small VPS (costs: maybe 10 euros a
month) and go from there.
Wim
On Sunday, 2 June 2013 09:37:11 UTC+2, Daniel Braun wrote:
>
> Hello,
> I'm working in a non-profit organization. It's a design archive and
> research institute based in Israel.
Hi Christian,
I recommend defining your own ModelForm and using that in the admin. For an
example using a custom form, see:
https://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.form
But why don't you want a choicefield in the admin then?
Regards, Wim
On
Hi,
Is it normal that a session_key varies when a user is not logged in? And if
so, should I then use request.COOKIES instead to store information in?
In one of my projects, users can order a calendar and upload their own
photos, one for each month. In between, I like to keep track of which
Hi,
Yesterday I did some research on this topic and I would like to recommend
looking at examples on github, for example:
https://github.com/edcrewe/django-csvimport
or
https://github.com/foreveryh/django-excel-import
But I didn't use any of them, because I decided to re-use my own code.
Wim
Hello,
For an e-learning app in development, we want editors to be able to edit
html (TextField) within our app (not the admin), and insert formatted text,
images and (Vimeo) video in there.
At the moment, I am looking into using TinyMCE (django-tinymce) combined
with django-filebrowser.
, 7:58 am, Wim Feijen <wimfei...@gmail.com> wrote:
> Hello,
>
> I'd like to share the same session across two subdomains, namely:
> crm.trumpetcms.nl
> wtsadvocaten.trumpetcms.nl
>
> Do I have to set the SESSION_COOKIE_DOMAIN in both settings.py files?
> Or just in
Hello,
I'd like to share the same session across two subdomains, namely:
crm.trumpetcms.nl
wtsadvocaten.trumpetcms.nl
Do I have to set the SESSION_COOKIE_DOMAIN in both settings.py files?
Or just in one?
Is this line correct?
SESSION_COOKIE_DOMAIN = '.trumpetcms.nl'
I am hosting the projects
Hello,
I am using a form which (simplified) looks like this:
class AdvancedSearchForm(forms.ModelForm):
email = forms.CharField(label='Emailadres', required=False)
class Meta:
model = Address
fields = [
'last_name',
'middle_name',
Thanks Bruno for your detailed advice and attention!
I agree wholeheartedly.
Wim
On Jun 24, 12:53 pm, bruno desthuilliers
wrote:
> On Jun 24, 11:57 am,WimFeijen wrote:
>
>
>
> > Looking at it again, I saw what was wrong and fixed it! For
> >
Daniel for your help!
Wim
On Jun 22, 8:24 pm, Daniel Roseman <dan...@roseman.org.uk> wrote:
> On Wednesday, 22 June 2011 14:32:10 UTC+1, Wim Feijen wrote:
>
> > Hello,
>
> > Atwww.mkb-rotterdam.nlwe use a template tag to display NewsItems in
> > different
Hello,
At www.mkb-rotterdam.nl we use a template tag to display NewsItems in
different formats on the homepage.
However, when a new NewsItem is added, it does not appear at once.
Might this have to do with the fact that we use a template tag to get
the NewsItems out of the db?
Our query is:
Hi Octopus,
What do you mean by: "won't load correctedly"?
Is there an admin interface at /admin/ ? If not, did you enable the
admin in your settings.py and in your urls.py?
Is there one or more object missing from the admin interface? If there
is one missing, maybe you've made an error in your
Nice! It definitely saves typing. Sounds like a right thing for
newbies, because when I was a newbie, I always had to look up which
fieldname to use and oh the typos.
Wim
On Nov 20, 3:28 pm, Alvaro Mouriño wrote:
> Hi.
>
> I'd like to introduce to you this idea I've been
Hi Lom,
I would recommend the following:
1. Add all three buttons to your template
2. In your view, handle the form saving and then determine which
button has been pressed.
3. Accordingly, redirect to the same url (for example, redirect("/
address/14") for viewing, redirect("/address/14/edit")
Hi Corey,
I would recommend using a UserProfile for this, which is bound to a
user (so make sure an authenticated user can access only his profile
by using request.user.get_profile() in your views.
See: http://docs.djangoproject.com/en/dev/topics/auth/
Good luck!
Best regards,
Wim
On Nov 25,
In addition, you can use permissions to deny access for users to
certain views by using the permission_required decorator, see:
http://docs.djangoproject.com/en/dev/topics/auth/
Wim
On Nov 25, 4:46 pm, Knut Ivar Nesheim wrote:
> Hi Stefan,
>
> If you roll your own login view,
Hi Owidjaya,
Common usage is to refer to your_app_name/template_name.html , so you
can put for example
{% extends "datagrid/template1.html" %}
in your client template.
So it is recommended to store your templates in a directory
your_app_name/templates/your_app_name/template_name.html
For more
And I solved the problem as well, a new.pyc file was dangling
somewhere in my project root, so that was why new.SomeThing didn't
work. Oh, I'm happy now!
On 18 aug, 16:13, Wim Feijen <wimfei...@gmail.com> wrote:
> Nice app Reinout! This does really help in cleaning up!
>
> Unfortu
Nice app Reinout! This does really help in cleaning up!
Unfortunately, it does not solve this problem. But I'll try to dig
some deeper.
On 11 aug, 13:19, Reinout van Rees wrote:
> On 08/10/2010 09:53 PM, WimFeijenwrote:
>
> > Exception Type: ViewDoesNotExist at /
> >
So simple and so great!
Thanks!
On 11 aug, 21:50, Nick wrote:
> You can subclass the User admin and then unregister the default admin
> and register your new subclassy admin (subclassy is a word)
>
> in admin.py:
>
> from django.contrib.auth.admin import UserAdmin
> from
Hello,
I am banging my brain against the wall but it doesn't help and all I
get is brain damage. Maybe you can help me find a solution for the
following problem?
How can I add a filter to the django admin User interface (/admin/auth/
user/) so I can filter Users by Group?
What I have thought
Hi,
When using reportlab trying to import a file which contains the
following line, I get an error.
from reportlab.platypus import Paragraph
The error says:
ViewDoesNotExist at /
Tried book in module book.address.views. Error was: 'module' object
has no attribute 'instancemethod'
The trace is
09/06/10 12:23, Wim Feijen wrote:
>
> > Hello,
>
> > Do you know whether there is a minimum to a date?
>
> Well there is, at the postgresql level, dates are supported
> between 4713 BC and 5874897 AD
>
> http://www.postgresql.org/docs/8.4/static/datatype-datetim
Hello,
Do you know whether there is a minimum to a date? In my project, I'd
like to add birthdays from way back, from people born on 21 january
0061 for example.
When trying to write these dates to the db, I get the following error.
I'm using Django 1.0.5 alpha and Postgres 8.3.9.
---
Traceback
idation/#ref-forms-...
>
> <http://docs.djangoproject.com/en/1.1/ref/forms/validation/#ref-forms-...>
> Grtz
>
>
>
>
>
> On Sat, May 15, 2010 at 7:34 PM, Wim Feijen <wimfei...@gmail.com> wrote:
> > Hi all,
>
> > Can some of you please help me
Hi all,
Can some of you please help me with the following?
For an application, I need to display the same form ten times over.
Filling in each form is optional. Of course, I'd like to keep this
safe & simple and therefore I am looking at formsets.
Is it possible to use a formset, call
Hi,
I'm unsure if and how to use DateFormat from django/utils/
dateformat.py .
I'd like to use a local (Dutch) representation of dates. What I get
is:
u'26th March 2010'
I'd like that to be in Dutch. How do I do that?
Major thanks!
Wim
My IPython looks like this:
In [1]: import
OK Thanks! That explains a lot.
Wim
On Mar 8, 2:54 pm, derek <gamesb...@gmail.com> wrote:
> On Mar 8, 2:46 pm, Wim Feijen <wimfei...@gmail.com> wrote:
>
>
>
>
>
> > Hello,
>
> > In my admin interface, the data isn't ordered as expected. What I get
Hello,
In my admin interface, the data isn't ordered as expected. What I get
is:
Provincie/Land Type
Limburg Provincie
Groningen Provincie
Utrecht Provincie
etc.
which clearly isn't alphabetical order, while I do specify that
provinces should be ordered that way. In my python
Hi,
Will you help me please?
I've got a model called Card which has a ManyToMany relationship to
Tag. When I save a Card, I'd like to create a Product as well, which I
want to have the same ManyToMany relationship to tag.
How do I access the instance's tags? self.tags.all() gives an empty
list,
Hi ringmeup again,
What I would do is choose the most common one and use that. In many
web applications I find that people use American-style addresses,
where I have to enter my state which has no equivalent in the
Netherlands, but nevertheless I have to.
Another good solution would be to
Can you please post some more information for what purpose you like to
do this?
My first guess would be you are using the admin interface. Dirty
workarounds are: copying code and adapting it, importing from your
adaptation in stead of the original. Maybe modifying the admin view to
do something
It does nothing to help you solve your problem, but mod_wsgi is
generally preferred above mod python.
Good luck solving the problem!
Wim
On Sep 26, 10:06 am, nausikaa wrote:
> Have you done
>
> from yourapp.models import *
> from django.contrib import admin
>
>
Hi Hugo,
Your template code, does it actually contains and ?
Like below?
{% for row in rows %}
{% for value in row %}
{{ value }}
{% endfor %}
{% endfor %}
Then, what does rows look like? Can you post your output please? To
get this output, for example, use "print rows" before you render
So, if I understand correctly, creating new objects and saving them to
the database works correctly, and updating objects fails. Is that
correct? Is it an update from the admin interface or from code written
by you?
If the former, it might have something to do with db privileges. Which
back-end
Hello,
In my views, I'd like to be able to rename a user using the
UserChangeForm from django.contrib.auth.forms . However, the form does
not validate. Should I use another instance than request.user?
Errorlist:
Translation: "Dit veld is verplicht." is Dutch for "This field is
required."
Hello,
python manage.py syncdb failed for me, saying: there is no such table
auth_group. On closer examination, the error stack mentioned one of my
models: timewriting.
After commenting 5 lines of code: tada... syncdb worked!
However, I do not understand, and I am interested in: why ?
Wim
The source code for the form generator is now on github at:
http://github.com/wimfeijen/trumpet_form_generator
- Wim
On May 30, 7:29 pm, Wim Feijen <wimfei...@gmail.com> wrote:
> Hello,
>
> Several clients asked me whether they could have a form on their
> website, w
I'll look into that.
Cheers, Wim Feijen
--~--~-~--~~~---~--~~
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 em
Hi Marco,
In Django 1.0, you don't need to call clean from clean, Django will do
that automatically for you. :)
So what you can do is:
def clean(self):
data = self.cleaned_data
if (data['firstDate'] >= data['lastDate']):
raise ValidationError("Error")
Hello,
While writing a forum app, I ran into a problem: I am unable to sort a
list of threads by date of their latest post.
My models look like:
class Thread(models.Model):
club = models.ForeignKey(Club)
name= models.CharField(_('Thread'), max_length=100)
date =
OK, please ignore the above.
Turns out that I am not using DNS at all, but iframes. It will take
some time for the DNS to pick up, but let's see how it works after
that.
Wim
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Hello,
I'm happily running a project on a Strato web server.
I've forwarded the domain name 'uwadresboek.nl' to my server, it's at
IP 85.214.104.194 . Everything works fine, except that:
1. Pretty URLs are lost.
I can type www.uwadresboek.nl/prices and everything is well. In
addition, I can
Hi Anders,
For me, removing the slash in the FORCE_SCRIPT_NAME seemed to work. I
am not using the admin interface, so I can't check on that.
So I added to settings.py:
FORCE_SCRIPT_NAME=""
I totally agree that this change with great consequences for all
lighttpd users is poorly documented.
Works like a charm, thank you very much!
On Jun 12, 2:09 am, Johannes Dollinger
<[EMAIL PROTECTED]> wrote:
> You are looking for setattr():http://docs.python.org/lib/built-in-
> funcs.html#l2h-66
>
> for attr in ('groupon', 'companyon', 'addressfirst', 'extendnames',
> 'clubfieldson'):
>
Thanks Russell!
I suppose the code I want to get looks like:
settings = Settings.objects.get(owner=userid)
for switchable in ['groupon', 'companyon', 'addressfirst',
'extendnames', 'clubfieldson']:
if switchable in data:
settings._meta.get_field(switchable). = True
else:
Many thanks Peter for your help in identifying the problem!
After making an upgrade in my domainhosting package I can use DNS and
now I am okay: setting the cookie works. Yes!
I am a very happy person now, thanks again!
Wim
On Jun 5, 5:27 pm, Peter Rowell <[EMAIL PROTECTED]> wrote:
> Sigh,
Coding happily away...
And wondering, can I write better code, using a loop, perhaps? In
other words: can I set settings.groupon while using a variable in
stead of groupon?
Thanks for any recommendations you are willing to make!
Wim Feijen
---
My not-too-pretty code:
settings
Hello everyone,
Django is great. But I am experiencing a problem when trying to log in
to my site using Internet Explorer.
When I go to:
http://85.214.104.194:8098/accounts/login/
logging in works as it should.
However, at:
http://www.jouwadresboek.nl/
, which is hosted at Strato and forwarded
can of-course do this with any field and use any widget for said field.
>
> Best,
>
> R
>
> On Wed, Jun 4, 2008 at 6:49 PM, Wim Feijen <[EMAIL PROTECTED]> wrote:
>
> > Hello people,
>
> > Being able to work with Django is very helpful to me. However, I am
>
Hello people,
Being able to work with Django is very helpful to me. However, I am
unsure whether I can create a form out of a database model and then
customize that form. Using widgets to increase the textarea to 40
would be great! But after reading the documentation I am convinced I
cannot do
53 matches
Mail list logo