Re: apache2 privileges

2012-04-18 Thread Andreas Schosser
Hi John

> My apache2 server on linux is running as www-data.  My project is in a
> standard user account.  apache2 can't access files on the user account
> unless I change the user on the user account directory to www-data.

Try this:
# chown -R john:www-data /your/project
# find /your/project -type f -exec chmod 660 {} \;
# find /your/project -type d -exec chmod 770 {} \;

Now apache can read and write the project files while you are still the
owner.
If you want to be a bit more secure try permissions 640/750.

Hope that helps.
Andreas

-- 
state of mind ()

http://www.state-of-mind.de

Franziskanerstraße 15  Telefon +49 89 3090 4664
81669 München  Telefax +49 89 3090 4666

Amtsgericht MünchenPartnerschaftsregister PR 563

-- 
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-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Detecting browser type after login

2012-08-02 Thread Andreas Schosser
Hi Larry

> They want the dialog to pop up on top of the login screen before the
> redirect. I don't know where the code that does this would live or how
> it would get invoked.
> 
> As far as to why they want this, it doesn't really support IE, and
> they want to alert the user to that if that's what they're using. It's
> a custom app, not for public use.

So why don't you catch the form.submit event with JavaScript and notify
the user about any issues with his browser.
Then you could either prevent them from proceeding or call the
form.submit within your JavaScript code.

No server side logic is necessary but of course it only works with
JavaScript enabled.

Greetings
Andreas

-- 
state of mind ()

http://www.state-of-mind.de

Franziskanerstraße 15  Telefon +49 89 3090 4664
81669 München  Telefax +49 89 3090 4666

Amtsgericht MünchenPartnerschaftsregister PR 563

-- 
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-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: 1.5 user abstract question

2013-11-08 Thread Andreas Schosser
Hi Frocco

> I need a couple of extra fields in my user model 

You can connect a model in your app to the user model and add your
fields there.

Example myapp/models.py:
...
from django.contrib.auth.models import User
...
class Profile(models.Model):
user = models.OneToOneField(User, related_name='profile')
...

You can then access your data via "user.profile" in your views.

Hope that helps,
Andreas

-- 
Kurs 10 / IT-Consulting
Andreas Schosser  a...@kurs-10.de

St.-Cajetan-Str. 13  Telefon +49 89 41615842-0
81669 MünchenTelefax +49 89 41615842-3

0x6EDECCF1 - 2AA0 939B 5585 819B FCE8 E43B 0B8E 0DF2 6EDE CCF1

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/527CC3FD.6000602%40kurs-10.de.
For more options, visit https://groups.google.com/groups/opt_out.


Re: crm app

2014-06-28 Thread Andreas Schosser
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Mike

> Do you know if Django-CRM is suitable for an end user?

I have set up several projects with django-cms. The backend is easy to
use and you can integrate your own apps with no great effort.

Andreas

- -- 
Kurs 10 / IT-Consulting
Andreas Schosser  a...@kurs-10.de

St.-Cajetan-Str. 13  Telefon +49 89 41615842-0
81669 MünchenTelefax +49 89 41615842-3

0x6EDECCF1 - 2AA0 939B 5585 819B FCE8 E43B 0B8E 0DF2 6EDE CCF1
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTrrwlAAoJEAuODfJu3szxWawH/3Tfvt67LcrbzChQVYbZLWNV
8p+0+nTGvIaejsdmso4E2iW33PV0woFS8UdY0Glm+vE+fRHDvL6IdAQDZd1AthBW
KpyPT7HAW/mCgdm7rRIwK7fyLGj/IUW9MN3zQAOvl4iXyRMue8hYvlnf/dzudoZg
eKSzXHuWd6v2HRd0Jr/sSI1y4OeKlclEdcq3ptAvxdulbxgJ3+hOD2r7O4CPmxD9
l6KEesV8/R35FDEJWuki5vuN9hWxPQ84JZ7+ZTzXS8Mlfz/UbSqiaCnxOuogHOoR
akpIkPZ+44IMgQD4Wo0AWdmG4C8Blo/Cj52lJ3/5s7O8E6M+fVZX6KeCBAElrng=
=CAJ/
-END PGP SIGNATURE-

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/53AEBC2A.2030904%40kurs-10.de.
For more options, visit https://groups.google.com/d/optout.


Re: crm app

2014-06-29 Thread Andreas Schosser
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Mike

> I'm also interested django-cms for another project so thank you for
> steering me in that direction.

Unfortunately i didn't read your first post thoroughly enough. I am
using django-cms (content management system) not django-crm (customer
relationship management).
But if you are looking for cms functionality, give django-cms a try.

Andreas

- -- 
Kurs 10 / IT-Consulting
Andreas Schosser  a...@kurs-10.de

St.-Cajetan-Str. 13  Telefon +49 89 41615842-0
81669 MünchenTelefax +49 89 41615842-3

0x6EDECCF1 - 2AA0 939B 5585 819B FCE8 E43B 0B8E 0DF2 6EDE CCF1
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTr9GxAAoJEAuODfJu3szxYdIH/3q/oVd9F8P0at3Rlrh8XVht
QBs3i1aC4NOVJxjw14Lv4RTbw0Gvrd1wte9BfBKmxAO37lAc1QAeR/vV/IUbHhD5
iU2NHNR18huWmg2G0/40u+X25f1mRkRn1jRuDVJycB4ZpHCopRXaZZ6MH0Yf6s8t
3gXlsRWpZbVI5xMsChwX7GBqdnUbSvxw6qpBmk72eQi5I+JCren2GCc0BRq63MuS
Abv7uPZeURQMb7wzPliqnFfLBmUJksDB7so8E9Q3tnHYo15HRFpnkbCaXcKMv5Vw
r7Q/yfs2kCtaZBevPmXE9Dazyu1fTKU4AjIXkRiFxawi+/2MkTCAfdlx6BaPqD8=
=elRs
-END PGP SIGNATURE-

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/53AFD1B5.6010905%40kurs-10.de.
For more options, visit https://groups.google.com/d/optout.


Re: Let's Encrypt installation fails with WSGI on Ubuntu 14 LTS

2017-04-11 Thread Andreas Schosser
Hi Moreplavec

> AH00526: Syntax error on line 26 of /etc/apache2/sites-enabled/my-domain.
> cz_crm.conf:
> Name duplicates previous WSGI daemon definition.

I had a similar issue on one of our servers. Since we enforce https I
just commented out the following directives in the original conf and
enabled them afterwards in the le-ssl.conf:

WSGIScriptAlias
WSGIDaemonProcess
WSGIProcessGroup

Hope this helps,
Andreas

-- 
Kurs 10 IT-Consulting   www.kurs-10.de
Andreas Schosser  a...@kurs-10.de

Baldestraße. 14  Telefon +49 89 41615842-0
80469 MünchenTelefax +49 89 41615842-3

0x6EDECCF1 - 2AA0 939B 5585 819B FCE8 E43B 0B8E 0DF2 6EDE CCF1

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1e21f7c8-0f5e-05d1-578e-6ca409123940%40kurs-10.de.
For more options, visit https://groups.google.com/d/optout.


smime.p7s
Description: S/MIME Cryptographic Signature


Re: static files not found on development server

2017-07-06 Thread Andreas Schosser
Hi Alex

> On development, I run the django-admin runserver, which AFAIK should take 
> care of the static path.

Did you restart the development server. I think the static files are
collected at startup and newly added files are not recognized on the fly.

Andreas

-- 
Kurs 10 IT-Consulting   www.kurs-10.de
Andreas Schosser  a...@kurs-10.de

Baldestraße. 14  Telefon +49 89 41615842-0
80469 MünchenTelefax +49 89 41615842-3

0x6EDECCF1 - 2AA0 939B 5585 819B FCE8 E43B 0B8E 0DF2 6EDE CCF1

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e0619a05-ae33-2f76-03d2-b80c5b70259e%40kurs-10.de.
For more options, visit https://groups.google.com/d/optout.


smime.p7s
Description: S/MIME Cryptographic Signature


Re: count

2016-01-26 Thread Andreas Schosser
Hi

> i am trying to count the number of fields that has request field begin
> checked and then display the value of count in a template.html but i am not
> sure how to go about doing that.

If you pass your object to the template you can use the "length" filter:

{{ test|length }}

Andreas

-- 
Kurs 10 IT-Consulting   www.kurs-10.de
Andreas Schosser  a...@kurs-10.de

Baldestraße. 14  Telefon +49 89 41615842-0
80469 MünchenTelefax +49 89 41615842-3

0x6EDECCF1 - 2AA0 939B 5585 819B FCE8 E43B 0B8E 0DF2 6EDE CCF1

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/56A77EE6.7030205%40kurs-10.de.
For more options, visit https://groups.google.com/d/optout.


smime.p7s
Description: S/MIME Cryptographic Signature


Re: variable to a template

2016-03-02 Thread Andreas Schosser
Hi Luca,

>  height="100"  

Try {% static "mysite/scorr/"|add:a %}

Andreas

-- 
Kurs 10 IT-Consulting       www.kurs-10.de
Andreas Schosser  a...@kurs-10.de

Baldestraße. 14  Telefon +49 89 41615842-0
80469 MünchenTelefax +49 89 41615842-3

0x6EDECCF1 - 2AA0 939B 5585 819B FCE8 E43B 0B8E 0DF2 6EDE CCF1

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/56D6E4F5.8010702%40kurs-10.de.
For more options, visit https://groups.google.com/d/optout.


smime.p7s
Description: S/MIME Cryptographic Signature


Re: Forbidden (CSRF token missing or incorrect.)

2018-11-29 Thread Andreas Schosser
Hi Rabah,

I encountered a similar problem today and could pin it to the setting
"CSRF_COOKIE_SECURE = True". I don't use https on my development
machines so the cookie is not set. Changing the value to
"CSRF_COOKIE_SECURE = False" in my local settings solved it.

You may check, how you access your sites, by http or https.

Greetings,
Andreas

>> I've been using Django 2.2Dev for a while now, since April 2018, and it is 
>> working just fine (I got my reasons why Django Dev). But since the last git 
>> pull, it shows the CSRF token missing, on every page has a form with CSRF 
>> token. 
>>
>> Is there something broke or ... ? since My Django-2.2Dev before the last 
>> "git pull" was working just fine.
>>
>> PS : Donwgrade to Django 2.1.3 stable, works fine too.
>>
>> thank you.

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5f1fb893-a4e1-c74d-b11e-b8ec06ef892d%40kurs-10.de.
For more options, visit https://groups.google.com/d/optout.


Re: Django Application logging --

2019-07-22 Thread Andreas Schosser
Hi

you can the use Logger class documented in
"https://docs.djangoproject.com/en/2.2/topics/logging/";.

Basically the code is something like

  import logging
  log = logging.getLogger('delhisanjays_app')
  log.info.('user logged in')

You can enhance the log message to your needs.

Cheers

Am 22.07.19 um 19:27 schrieb SNJY G:
> Hello Django Experts,
> There is Django application which uses LDAP in middleware for user
> authentication.
> I need to record user login and logout time. For that purpose, I think of a
> basic flow as per following details -
> Create new model for logging
> Make a function in views.py which will add the login/ logout time and date
> to a model.
> Call the function every time when user login/ logout.
> Could someone please suggest better way OR point me to good/relevant
> article around it.
-- 
Kurs 10 IT-Consulting   www.kurs-10.de
Andreas Schosser  a...@kurs-10.de

Baldestraße. 14  Telefon +49 89 41615842-0
80469 MünchenTelefax +49 89 41615842-3

0x85475B6B - 79BB 94F9 8523 0180 E2E5 7A8F 97B7 5BAB 8547 5B6B

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7f6d92a7-9ef0-66d7-f07e-51463a99ba3c%40kurs-10.de.


signature.asc
Description: OpenPGP digital signature