Re: Python-django project

2020-07-26 Thread Andi Setyawan
Interested

Pada tanggal 21 Jul 2020 10:10 AM, "learn code" 
menulis:

> Hi everyone,
>
> I am learning python and django, like to work on the projects to improve
> more.If any one interested to join with me to work on the projects,plz send
> me a email.
>
> --
> 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/e7116e9b-9458-4f49-a638-135c4b5874e0o%
> 40googlegroups.com.
>

-- 
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/CAG_zNb--MuYzCdxh4PmzbCmXiKCMxefeM%3D4zUx5mRU7zkvE99A%40mail.gmail.com.


Re: Python-django project

2020-07-24 Thread Andi Setyawan
Goodluck

Pada tanggal 24 Jul 2020 10:08 AM, "Parampal Singh" <
parampalsingh...@gmail.com> menulis:

> 🤣🤣 best of luck brother 👊
>
> On Fri, 24 Jul, 2020, 7:19 am Sreenivasulu Boggala, 
> wrote:
>
>> I am also interested
>>
>> On Fri, 24 Jul, 2020, 2:19 am Himanshi Dhanwadhiya, 
>> wrote:
>>
>>> Interested
>>>
>>> On Tue, 21 Jul, 2020, 8:39 am learn code, 
>>> wrote:
>>>
 Hi everyone,

 I am learning python and django, like to work on the projects to
 improve more.If any one interested to join with me to work on the
 projects,plz send me a email.

 --
 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/e7116e9b-9458-4f49-a638-135c4b5874e0o%
 40googlegroups.com.

>>> --
>>> 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/CAK%2B6XsCzaXtAcCY_pKw%2Bc3n%
>>> 3DJbB%2Beu3NF6wEbDDTYGwc6_wfiw%40mail.gmail.com
>>> 
>>> .
>>>
>> --
>> 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/CAH%2BGg%3DyxT6rXad2vv5dma9OEnbZziz1TX5
>> X4wzmS72XXw1dUag%40mail.gmail.com
>> 
>> .
>>
> --
> 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/CANYMdQLAiPuU%3Dspxv0nBUOq3%
> 3DwV_0xiuQvgK3gOdR7cJMdj%3DYg%40mail.gmail.com
> 
> .
>

-- 
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/CAG_zNb_L4Cr04WMZU9OXxnBtLDCinxbMHOd-heGW67sOAL4SVA%40mail.gmail.com.


Re: Flood of ''Invalid HTTP_HOST header" mails

2015-01-23 Thread andi-h
Hi Collin,

that's a 'yes' to all three questions (loading settings for wrong website 
was no question).

In the meantime I have found the "error":

As I wrote below my ALLOW_HOSTS variable was a tuple of ordinary strings 
("www.example.com") as in the documentation. Using instead unicode strings 
(u"www.example.com") solved the problem.

Thanks for your answer.

Andi

Am Donnerstag, 22. Januar 2015 04:49:41 UTC+1 schrieb Collin Anderson:
>
> Hi,
>
> So django is rejecting hosts even though they are listed in ALLOWED_HOSTS? 
> Are you using apache/mod_wsgi by chance? It could be loading the settings 
> for the wrong website. I assume you are reloading the server in between 
> changes to the file.
>
> Collin
>
> On Monday, January 19, 2015 at 1:18:11 PM UTC-5, andi-h wrote:
>>
>> -BEGIN PGP SIGNED MESSAGE- 
>> Hash: SHA1 
>>
>> Hi folks, 
>>
>> after upgrading my project to Django 1.7 it seems my host validation 
>> got a bit out of control. I have tried these possibilities, but my web 
>> server continues to send lots of mail about invalid HTTP_HOST headers: 
>>
>> ALLOWED_HOSTS = [ ".example.com" ] # domain name changed ;) 
>> ALLOWED_HOSTS = [ "example.com", "www.example.com" ] 
>>
>> But in each case I get the mails about "www.example.com". Has anybody 
>> else encountered this? 
>>
>> CU Andi 
>> - -- 
>> Andreas Pritschet 
>> Phone:   +49 151 11728439 
>> Homepage:http://www.pritschet.me 
>> GPG Pub Key: http://goo.gl/4mOsM 
>> -BEGIN PGP SIGNATURE- 
>> Version: GnuPG v1 
>>
>> iQIcBAEBAgAGBQJUvUojAAoJEO0gsAalef15wqIP/3BBybnA6ZhBiIw33gnXa/TX 
>> vYJrqcLv6mFQ4s7UmR4wxdTo+IfjZhhEx0p4qEqxOArPahdObAoO8KQEoFSanO3f 
>> VVCq7EBSS84g26/NrVfudyERgjxPbLvVL9L7vUbSxNuT5HYBW0IXqWOXUhkq8VsK 
>> gGGZkbQft8IH3jK28FNnNAJ+6PVY9yL2NDgB475Y6IlLqJHaXZYLl46U9ZbdTrF4 
>> apJUmoaorZ1ul5Ga1Xkj8c97RSfyQwK2EH6IQ7Vb2U7Ad/5sDsVKC/Kx6hxt2fbR 
>> ZkWPqVXAs7SbZIwAyeUggVEhz6n0XKzAYk7lsbNOzitwAWIXuzqk+5Hu/anDsTmt 
>> lS144lIyhuIKNPgwv02eNg4wH5hytXwK+kf1Z/4H+LcNu5szxMtREb2/PBvm/nQC 
>> zoJYZV1+sTmSjKKOb8DoX5i+dVdhgbQzvu/XBIJBLbUn4NSQiAlEKnArBeD2H01Z 
>> K1u37aIITOgcFqigDnLQEfIfzl+nng/O22W9RISPEOMyjE+9wcmgYXiKAt1RY2C5 
>> LjJQwhIkb94Aqzv288ip2131NxZq/eoGO8neQNBRRM4BoYbeP9gDT9D+BF8bnkQL 
>> FO5emHWj7oLdtcUteyMKKgdP/ryrwHiAQ2MBUIMVfPmmmCD2PN1M8v6nmPV0mbCH 
>> dQ6GeHlr/6Gh3rpoNFb/ 
>> =L0Pv 
>> -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/8e0ba7fe-1830-4f6f-aec8-277dc2f5d59d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Can not add a group to a custom auth user

2014-08-31 Thread Ikaros andi
super(Merchant, self).save(force_insert=True) 

solved the problem!


On Monday, September 1, 2014 2:15:22 PM UTC+8, Ikaros andi wrote:
>
> I debug into save method and find:
>
> ValueError: "" needs to have a value for field "user" 
> before this many-to-many relationship can be used.
>
> Merchant have already been super saved. I can figure it out
>
>
>
>
> On Wednesday, August 27, 2014 10:08:15 PM UTC+8, Collin Anderson wrote:
>>
>> i assume "groups" is an editable field in the admin.
>>
>> after the admin calls merchant.save(), it then clears out and re-assigns 
>> the value of groups based on the data in the input field.
>>
>

-- 
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/f746f39e-1933-4c64-bc10-f1516da803d4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Can not add a group to a custom auth user

2014-08-31 Thread Ikaros andi
I debug into save method and find:

ValueError: "" needs to have a value for field "user" 
before this many-to-many relationship can be used.

Merchant have already been super saved. I can figure it out




On Wednesday, August 27, 2014 10:08:15 PM UTC+8, Collin Anderson wrote:
>
> i assume "groups" is an editable field in the admin.
>
> after the admin calls merchant.save(), it then clears out and re-assigns 
> the value of groups based on the data in the input field.
>

-- 
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/fcbff67e-a647-4701-9781-f7a860b0b6be%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Can not add a group to a custom auth user

2014-08-26 Thread Ikaros andi


I want create a user with custom group in django admin. so I write below 
code:

from django.contrib.auth.models import User as AuthUserfrom 
django.contrib.auth.models import Group
# These groups have already been created while project start.class 
TestGroup(object):
Admin = 'Admin'
Merchant = 'Merchant'
User = 'User'
class Merchant(AuthUser):

def save(self, **kwargs):
super(Merchant, self).save(**kwargs)

for group in Group.objects.all():
print group.name

# way 1
if not self.groups.filter(name=TestGroup.Merchant).exists():
print self.groups.filter(name=TestGroup.Merchant).exists()
g = Group.objects.get(name=TestGroup.Merchant)
g.user_set.add(self)
print self.groups.filter(name=TestGroup.Merchant).exists()

# way 2
if not self.groups.filter(name=TestGroup.Merchant).exists():
g = Group.objects.get(name=TestGroup.Merchant)
self.groups.add(g)


# way 3
if not self.groups.filter(name=TestGroup.Merchant).exists():
g = Group.objects.get(name=TestGroup.Merchant)
self.groups.add(g)
self.save()

I have tried three ways to add a group to a user.But none of them could 
work.

*For Test:*

You can test by following this steps:

   1. 
   
   create a group named 'Merchant' at django admin
   2. 
   
   add my code (add print in way 1 to test), syncdb and so on.
   3. 
   
   create a Merchant at django admin. you can see log:
   
   u'Merchant'
   False
   True
   4. 
   
   enter the merchant you just created, you can see, the group merchant is 
   not selected(means this user do not beyond to this group).
   5. 
   
   click save again, you would still see
   
   u'Merchant'
   False
   True
   
add group to merchant fail, very strange.

-- 
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/6c880992-08f0-477d-a8dc-3b592695f49c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [feincms] [ANN]: FeinCMS v1.7

2013-02-26 Thread Andi Albrecht
Hi Matthias,

first of all thanks for the new release and all the work (this goes to
all developers of course!).

On Tue, Feb 26, 2013 at 10:00 PM, Matthias Kestenholz  wrote:
>
>
> Compatibility with Django and other apps
> 
>
> FeinCMS 1.7 requires Django 1.4.

Should that be read as requires at least Django 1.4? IOW is FeinCMS
1.7 tested with Django 1.5?

Best regards,

Andi

>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django FeinCMS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-feincms+unsubscr...@googlegroups.com.
> To post to this group, send an email to django-fein...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: UnicodeEncodeError in file uploads

2012-03-01 Thread andi-h
1) $ cat /etc/apache2/envvars
export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data
export APACHE_PID_FILE=/var/run/apache2.pid
. /etc/default/locale
export LANG
# comments have been stripped

2) $ cat /etc/default/locale
LANG="en_US.UTF-8"
$ sudo su - www-data
$ export
export HOME='/var/www'
export LANG='en_US.UTF-8'
export LOGNAME='www-data'
export MAIL='/var/mail/www-data'
export PATH='/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games'
export PWD='/var/www'
export SHELL='/bin/sh'
export TERM='xterm'
export USER='www-data'

By the way, I have the same django project running on a Debian5 server
with locale de_DE.UTF-8 and the upload of filenames containing German
umlauts is working.
Would it help to change the locale settings on this Ubuntu server to
de_DE.UTF-8, too?

-- 
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: UnicodeEncodeError in file uploads

2012-03-01 Thread andi-h

Hi, as you suggested I changed that settings. In addition I made a new
MySQL database with an UTF8 collation and copied all the data to that
one.

No change, I still got the same problem :-(

-- 
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: noob question about URLconf

2010-10-09 Thread Andi Trînculescu
it looks like your dev server isn't running.

On Oct 9, 12:50 am, lyrical  wrote:
> I'm following the Django book but run into a pathing problem (I think)
> I did exactly what the book said, even copying and pasting the code as
> to make sure I didn't make a typo.
>
> so in the views.py I have
>
> from django.http import HttpResponse
>
> def hello(request):
> return HttpResponse("Hello world")
>
> and url I have
>
> from django.conf.urls.defaults import *
> from mysite.views import hello
>
> urlpatterns = patterns('',
> ('^hello/$', hello),
> )
>
> I get the error "Unable to connect" what is wrong?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: noob question about URLconf

2010-10-09 Thread Andi Trînculescu
You probably didn't run manage.py runserver.
You also need to install your app in settings.py

On Oct 9, 12:50 am, lyrical  wrote:
> I'm following the Django book but run into a pathing problem (I think)
> I did exactly what the book said, even copying and pasting the code as
> to make sure I didn't make a typo.
>
> so in the views.py I have
>
> from django.http import HttpResponse
>
> def hello(request):
> return HttpResponse("Hello world")
>
> and url I have
>
> from django.conf.urls.defaults import *
> from mysite.views import hello
>
> urlpatterns = patterns('',
> ('^hello/$', hello),
> )
>
> I get the error "Unable to connect" what is wrong?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: www.djangoproject.com

2010-07-12 Thread Andi
On Jul 12, 3:40 pm, Nick Raptis  wrote:
> Yea, for some reason, my thoughts went to Weave too. Maybe it has
> something to do with it, maybe it doesn't. Haven't got any more trouble
> since I fixed it though.
> Glad I could help :)

I'm using Weave too, don't think that's a coincidence.

Bye, Andi

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: www.djangoproject.com

2010-07-08 Thread Andi
On Jul 8, 5:12 pm, Nick Raptis  wrote:
> If there is a non-standard value there (perhaps "/etc/locale/prefs.conf"
> or something) instead of a locale like en-US,
> some django pages won't ever display.

That's it.  You have to *remove* this non-standard value, it's not
sufficient to add another locale to the first position.

Thank you very much, I would never have found this.
--
Bye, Andi

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: www.djangoproject.com

2010-07-05 Thread Andi


On Jul 2, 10:44 pm, Bill Freeman  wrote:
> What might be of help is adding the IP address to /etc/hosts, if you are
> on linux.

I have the same problem regarding djangoproject.com (Firefox 3.6.6 on
Ubuntu).  Everything works but Firefox using my default profile: host
and nslookup succeed in resolving the domain name.  Adding the IP to /
etc/hosts or accessing the IP address directly in firefox doesn't
help.  Opera, chromium, arora, w3m, elinks, lynx and konqueror are not
affected.  Firefoxes on other hosts within the same LAN can connect to
djangoproject.com without a problem.  Disabling all add-ons living in
my Firefox doesn't have an effect -- but starting with a fresh profile
does: djangoproject.com loads successfully.

It's a very strange problem, because there is no problem with the
other thousands of websites I've visited during the last days.  It's
the combination djangoproject.com + my main Firefox profile which
produces the problem exclusively.

--
Andi

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.



Scheduler proposal

2007-05-20 Thread Andi Albrecht
Hi,

while developing a small application I had to implement some scheduled
tasks like sending notification mails (hourly, daily and weekly) and
gathering some information from around the web (every two hours). I've
searched for deploying these tasks and came across the cron jobs
solution. It works fine so far, but I've got still some troubles with
it:

- During developing it wasn't easy to maintain these jobs. Some code
changes required a different crontab entry, some jobs had to be added
others were gone forever. In addition I've had to deploy the
application in four environments (2 for developing, a testing
environment and a production environment).

- Another problem was to implement event-based jobs. Under certain
circumstances one of the daily jobs triggers another task, but with a
delay of two hours.

My first approach was to use some kind of plugin for Django, but the
scheduler needs to know when a server starts or stops so I came up
with patching Django.

Apart from the Django project I'm involved in another project which is
based on TurboGears and I recalled my good experiences with their
scheduler mechanism and had a look at it again. It's implementation is
solid and easy and about an hour later I came up with this solution:

I've created two new signals "server_starting" and "server_stopped"
which are emitted by the management script when a server starts up or
shuts down. These two signals are connected to the scheduler to bring
it up, if required (determined by a configuration option). The
scheduler itself is just the imported TurboGears scheduler for
simplification.

A patch based on rev. 5297 is attached to this mail.

I've tested this solution in my application a few days now and it
works pretty well. What do you think about it?

Regards,

Andi

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---

Index: django/conf/global_settings.py
===
--- django/conf/global_settings.py	(revision 5297)
+++ django/conf/global_settings.py	(working copy)
@@ -337,3 +337,10 @@
 
 # The list of directories to search for fixtures
 FIXTURE_DIRS = ()
+
+#
+# SCHEDULER #
+#
+
+# True by default for testing... Should be False in real life
+USE_SCHEDULER = True
Index: django/core/management.py
===
--- django/core/management.py	(revision 5297)
+++ django/core/management.py	(working copy)
@@ -1160,6 +1160,8 @@
 
 def runserver(addr, port, use_reloader=True, admin_media_dir=''):
 "Starts a lightweight Web server for development."
+from django.core import signals
+from django.dispatch import dispatcher
 from django.core.servers.basehttp import run, AdminMediaHandler, WSGIServerException
 from django.core.handlers.wsgi import WSGIHandler
 if not addr:
@@ -1175,6 +1177,9 @@
 print "\nDjango version %s, using settings %r" % (get_version(), settings.SETTINGS_MODULE)
 print "Development server is running at http://%s:%s/"; % (addr, port)
 print "Quit the server with %s." % quit_command
+if settings.USE_SCHEDULER:
+from django import scheduler
+scheduler.init()
 try:
 import django
 path = admin_media_dir or django.__path__[0] + '/contrib/admin/media'
@@ -1179,6 +1184,7 @@
 import django
 path = admin_media_dir or django.__path__[0] + '/contrib/admin/media'
 handler = AdminMediaHandler(WSGIHandler(), path)
+dispatcher.send(signal=signals.server_starting)
 run(addr, int(port), handler)
 except WSGIServerException, e:
 # Use helpful error messages instead of ugly tracebacks.
@@ -1200,6 +1206,7 @@
 autoreload.main(inner_run)
 else:
 inner_run()
+dispatcher.send(signal=signals.server_stopped)
 runserver.args = '[--noreload] [--adminmedia=ADMIN_MEDIA_PATH] [optional port number, or ipaddr:port]'
 
 def createcachetable(tablename):
@@ -1278,6 +1285,8 @@
 "Runs this project as a FastCGI application. Requires flup."
 from django.conf import settings
 from django.utils import translation
+from django.core import signals
+from django.dispatch import dispatcher
 # Activate the current language, because it won't get activated later.
 try:
 translation.activate(settings.LANGUAGE_CODE)
@@ -1284,7 +1293,12 @@