Re: Dynamic CSS

2014-08-13 Thread Avraham Serour
just remember to change the headers of the response to reflect that you are
serving a css file and not html


On Wed, Aug 13, 2014 at 3:37 AM, Drew Ferguson 
wrote:

> On Tue, 12 Aug 2014 19:53:34 -0400
> François Schiettecatte  wrote:
>
> > You could certainly render the CSS either in-line in the HMTL pages or
> > in templates, just produce CSS as opposed to HTML (I have produced RSS,
>
> My goodness, of course!
>
> Sometimes the "bleedin' obvious" is hard to see
>
> Thanks
>
> > ATOM, XML and JSON in templates). Or you could have multiple CSS files
> > and just pick the one you want to use when you render the link to the
> > CSS in your HTML pages.
> >
> > François
> >
> > On Aug 12, 2014, at 7:37 PM, Drew Ferguson 
> > wrote:
> >
> > > Hi
> > >
> > > Is there any documentation describing possible ways of having dynamic
> > > CSS in a site?
> > >
> > > For example, having a CSS colour scheme set from a database query or
> > > setting a site logo URL from a database query
> > >
> > > Ta
> > > --
> > > Drew Ferguson
> > >
> > > --
> > > 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/20140813003710.3f766b96%40blacktav.fergiesontour.org
> .
> > > For more options, visit https://groups.google.com/d/optout.
> >
>
> --
> Drew Ferguson
>
> --
> 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/20140813013703.223bf526%40blacktav.fergiesontour.org
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAFWa6tLj8L5cgDg95gfZz_er8kL%2BbetjWsW4scyBEGSaKvotXg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Warnings instead of only errors in Django Forms

2014-08-13 Thread Thomas Güttler

Is there a solution to this?

I want to display additional text next to a form field.

There is a four years old question on stackoverflow[1], but the
solution to use the message framework does not help me, since
I want to see the additional text next to the form field. Message
at the top of the page won't help me.

I need a python solution (without templates), since the form rendering is
done by a third party library.

[1] 
http://stackoverflow.com/questions/2270550/warnings-or-even-info-messages-instead-of-only-errors-in-django

Regards,
  Thomas

--
Thomas Güttler
http://thomas-guettler.de/

--
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/53EB260F.6010908%40tbz-pariv.de.
For more options, visit https://groups.google.com/d/optout.


Re: Custom management commands provided as only .pyc files?

2014-08-13 Thread Russell Keith-Magee
As it says on the ticket you reference, you shouldn't be thinking of .pyc
files as "compiled" python. It's an internal cache of the runtime state of
a particular interpreter. And even if you are able to avoid any cross
machine architecture problems, you're really not providing that much
protection, because it's easily to decompile PYC files back to source code.

However, assuming you're going to ignore that advice... :-)

As I see it, you have four options:

 * Maintain a private fork of Django that handles PYC files the way you
want, and merge any changes that are made to Django's trunk with your own
fork whenever you want to make a release.

 * Maintain your own implementation of management commands. Remember,
manage.py is just a python script, and it's under your control. If you want
to change the entry point to point at your own handling of management
commands, go right ahead. You may even find that you can crib *most* of the
implementation from Django's own code, and only override a couple of key
methods.

 * Find a different way to distribute your code. Think outside the box.
Don't distribute a tarball of "compiled" code - distribute a virtual
machine with an encrypted disk image. The end user then "runs" the virtual
machine. Or distribute the code as a service - provide a service endpoint
(under your control) that holds all the important data or algorithms, and
the only thing you put on the end user's computer is a frontend that
contains no useful IP.

 * Use the legal approach. Distribute the Python code as Guido intended
:-), but accompany it with a very clear usage agreement that says "you copy
this code, and we send in the goon squad". Most businesses will be very
careful if you make them sign a document like that.

Yours,
Russ Magee %-)



On Tue, Aug 12, 2014 at 9:55 PM, Stodge  wrote:

> As explained in https://code.djangoproject.com/ticket/14952, Django
> doesn't support custom management commands that are only provided as .pyc
> files. I have a requirement with my project that I cannot distribute the
> .py files - only the .pyc. It's a roundabout way of not providing the
> source code when we install our software on a client's server. Is the only
> recommended way around this to hack django/core/management/init.py? Is it
> acceptable to monkey patch the file instead? I don't want to hack the
> Django source as it will break when I upgrade Django in the future. Thanks
>
> --
> 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/6b8f36ee-3419-4af7-a46c-43236b8620b0%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAJxq848-fyg6KmLNx5ZwftrT66S%3DYpAUGTDY7%3D%3DJXkSJ3P7LbA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Model not appearing in django admin

2014-08-13 Thread Collin Anderson
Wow. Is the admin.py file actually getting run? (try a print statement or 
try throwing an exception)

-- 
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/105ae354-0605-4ecc-9eb8-bb17251703d2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Warnings instead of only errors in Django Forms

2014-08-13 Thread Collin Anderson
Can you override the render() method of a form field widget?

-- 
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/dafd4c77-f4fa-45b2-8063-39eb4bed985e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Model not appearing in django admin

2014-08-13 Thread Thomas Brightwell
Collin,

Thanks for the help. I updated my admin.py with this (also been trying 
other variations of the register):

from django.contrib import admin
from .models import Retailer

@admin.register(Retailer)
class RetailerAdmin(admin.ModelAdmin):
pass

print 'foo'
raise Exception()

Restarted my webserver and http://localhost:8000/admin/django_admin/ loads 
without error. I have debugged right through the loading on startup and 
checked django-admin is attempting a module import of the webapp.admin, and 
it does seem to be trying.

On Wednesday, 13 August 2014 13:58:17 UTC+1, Collin Anderson wrote:
>
> Wow. Is the admin.py file actually getting run? (try a print statement or 
> try throwing an exception)
>

-- 
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/b8548658-e084-463d-b64d-16f852de1792%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Model not appearing in django admin

2014-08-13 Thread Collin Anderson
Do you have a webapp/__init__.py file? Can you import webapp.admin in
./manage.py shell?

-- 
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/CAFO84S4jfCtMK6Z%3DjzO%3DaXUmtSL6R1Jzyfk6CF8uAO7BsvSCRQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Model not appearing in django admin

2014-08-13 Thread Thomas Brightwell
 

Yes, have an __init__.py file. And yes, works fine importing.

bash-3.2$ ./manage.py shell

Python 2.7.5 (default, Mar  9 2014, 22:15:05) 

In [1]: import webapp.admin

In [2]: 


webapp directory listing:

bash-3.2$ ls

__init__.py admin admin.pyc item migrations models.pyc templates tests view

__init__.pyc admin.py fixtures locale models.py search templatetags util 
views.pyc

On Wednesday, 13 August 2014 14:34:53 UTC+1, Collin Anderson wrote:
>
> Do you have a webapp/__init__.py file? Can you import webapp.admin in 
> ./manage.py shell? 
>

-- 
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/bcac7b77-293c-47b7-afac-e3e2a13a5c02%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Model not appearing in django admin

2014-08-13 Thread Thomas Brightwell
Ok, figured it. I have an admin folder as well as admin.py so they're 
conflicting. 

Removing it solved the issue and Retailer now appears in the admin 
interface. 

Thanks for the debugging steps!

Cheers,

Tom

On Wednesday, 13 August 2014 14:38:51 UTC+1, Thomas Brightwell wrote:
>
> Yes, have an __init__.py file. And yes, works fine importing.
>
> bash-3.2$ ./manage.py shell
>
> Python 2.7.5 (default, Mar  9 2014, 22:15:05) 
>
> In [1]: import webapp.admin
>
> In [2]: 
>
>
> webapp directory listing:
>
> bash-3.2$ ls
>
> __init__.py admin admin.pyc item migrations models.pyc templates tests 
> view
>
> __init__.pyc admin.py fixtures locale models.py search templatetags util 
> views.pyc
>
> On Wednesday, 13 August 2014 14:34:53 UTC+1, Collin Anderson wrote:
>>
>> Do you have a webapp/__init__.py file? Can you import webapp.admin in 
>> ./manage.py shell? 
>>
>

-- 
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/f78b4884-8ead-441e-9c73-3e95e11910b1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


My form filed values are not sent to server

2014-08-13 Thread Mahdi Rahimi
Hi all

I've a template which includes a form. 
When my form is submitted to the server all of my field values are empty!!
I was working. I changed my template. I transferred any required thing.

What's the reason? 
Does it regard to JS or CSS?
Is any one to help me?

Thanks

-- 
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/7304cd18-79d7-4a21-a152-e22b90c925b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How to run Python script? (configure settings error)

2014-08-13 Thread Daniel Grace
I have a Python script as follows:

from django.db import transaction
from django.contrib.auth.models import User
from flow.models import States, Types, Docs, Logs

if __name__ == '__main__':
with transaction.atomic():
models.Logs.objects.all().delete()
models.Docs.objects.all().delete()
models.States.objects.all().delete()
models.Types.objects.all().delete()
models.User.objects.all().delete()
user1 = User.objects.create_user('john', 'xxx...@gmail.com', 
'johnpass')
user1.save()

When I run this in IDLE I get the following error:

Traceback (most recent call last):
  File "C:\Python34\lib\site-packages\django\conf\__init__.py", line 38, in 
_setup
settings_module = os.environ[ENVIRONMENT_VARIABLE]
  File "C:\Python34\lib\os.py", line 651, in __getitem__
raise KeyError(key) from None
KeyError: 'DJANGO_SETTINGS_MODULE'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Daniel\Documents\Python\cresta\flow\test_data.py", line 7, 
in 
from django.contrib.auth.models import User
  File "C:\Python34\lib\site-packages\django\contrib\auth\__init__.py", 
line 6, in 
from django.middleware.csrf import rotate_token
  File "C:\Python34\lib\site-packages\django\middleware\csrf.py", line 14, 
in 
from django.utils.cache import patch_vary_headers
  File "C:\Python34\lib\site-packages\django\utils\cache.py", line 26, in 

from django.core.cache import get_cache
  File "C:\Python34\lib\site-packages\django\core\cache\__init__.py", line 
69, in 
if DEFAULT_CACHE_ALIAS not in settings.CACHES:
  File "C:\Python34\lib\site-packages\django\conf\__init__.py", line 54, in 
__getattr__
self._setup(name)
  File "C:\Python34\lib\site-packages\django\conf\__init__.py", line 47, in 
_setup
% (desc, ENVIRONMENT_VARIABLE))
django.core.exceptions.ImproperlyConfigured: Requested setting CACHES, but 
settings are not configured. You must either define the environment 
variable DJANGO_SETTINGS_MODULE or call settings.configure() before 
accessing settings.

How do I configure these settings?

Thanks.

-- 
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/9b3a4974-26fd-4229-a3bf-7d7ce28dbdfe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: My form filed values are not sent to server

2014-08-13 Thread Collin Anderson
Are your form fields actually in the  tag? Is there any data at all 
in request.POST?

-- 
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/ea89ba10-fe57-4ef0-965b-0475971fc34e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to run Python script? (configure settings error)

2014-08-13 Thread Tom Evans
You cannot use django before configuring it.

https://docs.djangoproject.com/en/1.6/topics/settings/#designating-the-settings

Django provides several entry points, manage.py and wsgi.py, which
perform this configuration steo.

If you choose not to use those entry points, you are required to
configure it yourself manually:

https://docs.djangoproject.com/en/1.6/topics/settings/#either-configure-or-django-settings-module-is-required

Cheers

Tom

On Wed, Aug 13, 2014 at 3:21 PM, Daniel Grace  wrote:
> I have a Python script as follows:
>
> from django.db import transaction
> from django.contrib.auth.models import User
> from flow.models import States, Types, Docs, Logs
>
> if __name__ == '__main__':
> with transaction.atomic():
> models.Logs.objects.all().delete()
> models.Docs.objects.all().delete()
> models.States.objects.all().delete()
> models.Types.objects.all().delete()
> models.User.objects.all().delete()
> user1 = User.objects.create_user('john', 'xxx...@gmail.com',
> 'johnpass')
> user1.save()
>
> When I run this in IDLE I get the following error:
>
> Traceback (most recent call last):
>   File "C:\Python34\lib\site-packages\django\conf\__init__.py", line 38, in
> _setup
> settings_module = os.environ[ENVIRONMENT_VARIABLE]
>   File "C:\Python34\lib\os.py", line 651, in __getitem__
> raise KeyError(key) from None
> KeyError: 'DJANGO_SETTINGS_MODULE'
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>   File "C:\Users\Daniel\Documents\Python\cresta\flow\test_data.py", line 7,
> in 
> from django.contrib.auth.models import User
>   File "C:\Python34\lib\site-packages\django\contrib\auth\__init__.py", line
> 6, in 
> from django.middleware.csrf import rotate_token
>   File "C:\Python34\lib\site-packages\django\middleware\csrf.py", line 14,
> in 
> from django.utils.cache import patch_vary_headers
>   File "C:\Python34\lib\site-packages\django\utils\cache.py", line 26, in
> 
> from django.core.cache import get_cache
>   File "C:\Python34\lib\site-packages\django\core\cache\__init__.py", line
> 69, in 
> if DEFAULT_CACHE_ALIAS not in settings.CACHES:
>   File "C:\Python34\lib\site-packages\django\conf\__init__.py", line 54, in
> __getattr__
> self._setup(name)
>   File "C:\Python34\lib\site-packages\django\conf\__init__.py", line 47, in
> _setup
> % (desc, ENVIRONMENT_VARIABLE))
> django.core.exceptions.ImproperlyConfigured: Requested setting CACHES, but
> settings are not configured. You must either define the environment variable
> DJANGO_SETTINGS_MODULE or call settings.configure() before accessing
> settings.
>
> How do I configure these settings?
>
> Thanks.
>
> --
> 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/9b3a4974-26fd-4229-a3bf-7d7ce28dbdfe%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/CAFHbX1K_oF52T1DWgzzx3ZKOyPsg1-jCaWRdRyT4wesaOgH78A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to run Python script? (configure settings error)

2014-08-13 Thread Andrew Farrell
Note: this is much better documented at
https://docs.djangoproject.com/en/dev/howto/custom-management-commands/

You want to move this file to the management.commands module. I don't know
what the equivalent commands are on windows, but on linux this would be.
1) `cd myapp; mkdir management`: Within you app, in the same directory as
views.py create a directory called 'management'
2) `cd management`: Go into that directory
3) `touch__init__.py`: create an empty file named __init__.py
4) `mkdir commands`: create a directory named "commands"
5) `cd commands`: go into that directory
6) `touch __init__.py`: create another empty file named__init.py
7) `echo 'from django.conf import settings' > mycommandname.py`: create a
file named with the command you want within that directory.
8) You need to have something in that file that looks like:

from django.core.management.base import BaseCommand
class Command(BaseCommand):
args = 'spam eggs'
help = 'makes an omelette to throw at a silly English knigget'
def handle(self, *args, **swargs):
print settings.STATIC_ROOT


On Wed, Aug 13, 2014 at 10:21 AM, Daniel Grace  wrote:

> I have a Python script as follows:
>
> from django.db import transaction
> from django.contrib.auth.models import User
> from flow.models import States, Types, Docs, Logs
>
> if __name__ == '__main__':
> with transaction.atomic():
> models.Logs.objects.all().delete()
> models.Docs.objects.all().delete()
> models.States.objects.all().delete()
> models.Types.objects.all().delete()
> models.User.objects.all().delete()
> user1 = User.objects.create_user('john', 'xxx...@gmail.com',
> 'johnpass')
> user1.save()
>
> When I run this in IDLE I get the following error:
>
> Traceback (most recent call last):
>   File "C:\Python34\lib\site-packages\django\conf\__init__.py", line 38,
> in _setup
> settings_module = os.environ[ENVIRONMENT_VARIABLE]
>   File "C:\Python34\lib\os.py", line 651, in __getitem__
> raise KeyError(key) from None
> KeyError: 'DJANGO_SETTINGS_MODULE'
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>   File "C:\Users\Daniel\Documents\Python\cresta\flow\test_data.py", line
> 7, in 
> from django.contrib.auth.models import User
>   File "C:\Python34\lib\site-packages\django\contrib\auth\__init__.py",
> line 6, in 
> from django.middleware.csrf import rotate_token
>   File "C:\Python34\lib\site-packages\django\middleware\csrf.py", line 14,
> in 
> from django.utils.cache import patch_vary_headers
>   File "C:\Python34\lib\site-packages\django\utils\cache.py", line 26, in
> 
> from django.core.cache import get_cache
>   File "C:\Python34\lib\site-packages\django\core\cache\__init__.py", line
> 69, in 
> if DEFAULT_CACHE_ALIAS not in settings.CACHES:
>   File "C:\Python34\lib\site-packages\django\conf\__init__.py", line 54,
> in __getattr__
> self._setup(name)
>   File "C:\Python34\lib\site-packages\django\conf\__init__.py", line 47,
> in _setup
> % (desc, ENVIRONMENT_VARIABLE))
> django.core.exceptions.ImproperlyConfigured: Requested setting CACHES, but
> settings are not configured. You must either define the environment
> variable DJANGO_SETTINGS_MODULE or call settings.configure() before
> accessing settings.
>
> How do I configure these settings?
>
> Thanks.
>
> --
> 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/9b3a4974-26fd-4229-a3bf-7d7ce28dbdfe%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CA%2By5TLagUx4xOUuQfANJ8sAcm5miaVYyv2cUzY4h8uQzGSPzwA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to run Python script? (configure settings error)

2014-08-13 Thread Collin Anderson
set: os.environ['DJANGO_SETTINGS_MODULE'] = 'yourproject.settings' (or see 
how it's done in manage.py)

On 1.7 call django.setup() first before using models.
On 1.6 or lower, you may need to call models.get_models() before using your 
models.

-- 
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/c86b5aca-e7a0-44e5-95f8-505d8e44c40a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to run Python script? (configure settings error)

2014-08-13 Thread Andrew Farrell
oh, and you should then be able to run the command by doing
python manage.py myapp mycommand
and see the 'mycommand' in the list of commands printed by `python
manage.py help`


On Wed, Aug 13, 2014 at 10:36 AM, Andrew Farrell 
wrote:

> Note: this is much better documented at
> https://docs.djangoproject.com/en/dev/howto/custom-management-commands/
>
> You want to move this file to the management.commands module. I don't know
> what the equivalent commands are on windows, but on linux this would be.
> 1) `cd myapp; mkdir management`: Within you app, in the same directory as
> views.py create a directory called 'management'
> 2) `cd management`: Go into that directory
> 3) `touch__init__.py`: create an empty file named __init__.py
> 4) `mkdir commands`: create a directory named "commands"
> 5) `cd commands`: go into that directory
> 6) `touch __init__.py`: create another empty file named__init.py
> 7) `echo 'from django.conf import settings' > mycommandname.py`: create a
> file named with the command you want within that directory.
> 8) You need to have something in that file that looks like:
>
> from django.core.management.base import BaseCommand
> class Command(BaseCommand):
> args = 'spam eggs'
> help = 'makes an omelette to throw at a silly English knigget'
> def handle(self, *args, **swargs):
> print settings.STATIC_ROOT
>
>
> On Wed, Aug 13, 2014 at 10:21 AM, Daniel Grace 
> wrote:
>
>> I have a Python script as follows:
>>
>> from django.db import transaction
>> from django.contrib.auth.models import User
>> from flow.models import States, Types, Docs, Logs
>>
>> if __name__ == '__main__':
>> with transaction.atomic():
>> models.Logs.objects.all().delete()
>> models.Docs.objects.all().delete()
>> models.States.objects.all().delete()
>> models.Types.objects.all().delete()
>> models.User.objects.all().delete()
>> user1 = User.objects.create_user('john', 'xxx...@gmail.com',
>> 'johnpass')
>> user1.save()
>>
>> When I run this in IDLE I get the following error:
>>
>> Traceback (most recent call last):
>>   File "C:\Python34\lib\site-packages\django\conf\__init__.py", line 38,
>> in _setup
>> settings_module = os.environ[ENVIRONMENT_VARIABLE]
>>   File "C:\Python34\lib\os.py", line 651, in __getitem__
>> raise KeyError(key) from None
>> KeyError: 'DJANGO_SETTINGS_MODULE'
>>
>> During handling of the above exception, another exception occurred:
>>
>> Traceback (most recent call last):
>>   File "C:\Users\Daniel\Documents\Python\cresta\flow\test_data.py", line
>> 7, in 
>> from django.contrib.auth.models import User
>>   File "C:\Python34\lib\site-packages\django\contrib\auth\__init__.py",
>> line 6, in 
>> from django.middleware.csrf import rotate_token
>>   File "C:\Python34\lib\site-packages\django\middleware\csrf.py", line
>> 14, in 
>> from django.utils.cache import patch_vary_headers
>>   File "C:\Python34\lib\site-packages\django\utils\cache.py", line 26, in
>> 
>> from django.core.cache import get_cache
>>   File "C:\Python34\lib\site-packages\django\core\cache\__init__.py",
>> line 69, in 
>> if DEFAULT_CACHE_ALIAS not in settings.CACHES:
>>   File "C:\Python34\lib\site-packages\django\conf\__init__.py", line 54,
>> in __getattr__
>> self._setup(name)
>>   File "C:\Python34\lib\site-packages\django\conf\__init__.py", line 47,
>> in _setup
>> % (desc, ENVIRONMENT_VARIABLE))
>> django.core.exceptions.ImproperlyConfigured: Requested setting CACHES,
>> but settings are not configured. You must either define the environment
>> variable DJANGO_SETTINGS_MODULE or call settings.configure() before
>> accessing settings.
>>
>> How do I configure these settings?
>>
>> Thanks.
>>
>> --
>> 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/9b3a4974-26fd-4229-a3bf-7d7ce28dbdfe%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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/CA%2By5TLZKx2wGgOwoyGxqzZ-hMxwpM-YiF8sN%3

Re: How to run Python script? (configure settings error)

2014-08-13 Thread Daniel Grace
I used this method and got my script working OK.

On Wednesday, 13 August 2014 15:37:30 UTC+1, Andrew Farrell wrote:
>
> Note: this is much better documented at 
> https://docs.djangoproject.com/en/dev/howto/custom-management-commands/
>
> You want to move this file to the management.commands module. I don't know 
> what the equivalent commands are on windows, but on linux this would be.
> 1) `cd myapp; mkdir management`: Within you app, in the same directory as 
> views.py create a directory called 'management'
> 2) `cd management`: Go into that directory
> 3) `touch__init__.py`: create an empty file named __init__.py
> 4) `mkdir commands`: create a directory named "commands"
> 5) `cd commands`: go into that directory
> 6) `touch __init__.py`: create another empty file named__init.py
> 7) `echo 'from django.conf import settings' > mycommandname.py`: create a 
> file named with the command you want within that directory.
> 8) You need to have something in that file that looks like:
>
> from django.core.management.base import BaseCommand
> class Command(BaseCommand):
> args = 'spam eggs'
> help = 'makes an omelette to throw at a silly English knigget'
> def handle(self, *args, **swargs):
> print settings.STATIC_ROOT
>
>

-- 
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/77fa1182-7ee1-48ef-bbe3-7b7235087307%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: My form filed values are not sent to server

2014-08-13 Thread Babatunde Akinyanmi
Also, if you are manually adding the form to your template you should make
sure you add a name attribute to all the input tags
On 13 Aug 2014 15:33, "Collin Anderson"  wrote:

> Are your form fields actually in the  tag? Is there any data at all
> in request.POST?
>
> --
> 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/ea89ba10-fe57-4ef0-965b-0475971fc34e%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CA%2BWjgXM9Etrw0EwFsZ6QHi_r%3D3YfxU4ky49LDUyCsT8%3D5gx5mQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django migrations and DateTimeField defaults

2014-08-13 Thread Andy Roxby
Thanks, that's what I did.  In my humble opinion, the ValueError should be 
removed and the timezone serialized in the form UTC offset (eg: -0400).

On Tuesday, August 12, 2014 9:43:11 PM UTC-4, Collin Anderson wrote:
>
> Wow. That almost sounds like a bug, though you can however use a callable. 
> As ridiculous as it looks, it should work :).
>
> INF_TIME = datetime.max.replace(tzinfo=timezone.utc)
>
> def get_inf_time():
> return INF_TIME
>
> death = models.DateTimeField(default=get_inf_time)
>
> What you are doing seems pretty rare, though it seems maybe that error 
> message should not be recommending a naive datetime.
>
>

-- 
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/5301ae6b-078b-41cb-9bda-9167b1928681%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Custom management commands provided as only .pyc files?

2014-08-13 Thread Javier Guerra Giraldez
On Wed, Aug 13, 2014 at 3:59 AM, Russell Keith-Magee
 wrote:
> As I see it, you have four options:


there's also option #2.5:

 * distribute .pyc files as required, but include a call to uncompyle2
(or any alternative .pyc to .py decoder) at setup time, so Django
finds the .py files as usual.


it not only follows the letter of the requirement ("thou shalt not
give your .py files unto others"), but highlights how inappropriate it
is.


-- 
Javier

-- 
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/CAFkDaoQrXybRDCLr05F-DsZ-wBrUzq2Zz6YnW6omUDegunJcmg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: school website

2014-08-13 Thread Scot Hacker
On Tuesday, August 12, 2014 6:46:40 AM UTC-7, ngangsia akumbo wrote:
>
> PLease i have a small question. I just need some guidance
>

Django is a great choice for school portals/intranets, and can accomplish 
everything you describe (I've built several of them, but can't make the 
source available, sorry). However, you have not asked any specific 
questions. You just need to start with the tutorials, read Django books, 
use StackOverflow and this list, etc... basically you need to learn how 
Django works, and the rest will fall into place naturally.  Maybe build a 
small sample/starter project first, then tackle this very large project. 
When you do, start with careful data modeling on paper, figuring out all of 
the intricate data relationships you'll need to describe the school's inner 
workings from an information architecture perspective. If your models are 
solidly defined, the rest will flow sanely from that. You have a big job in 
front of you.

./s 

-- 
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/f06a1405-59c6-4081-8fe2-fc192d274e51%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Custom management commands provided as only .pyc files?

2014-08-13 Thread Collin Anderson

>
>  * distribute .pyc files as required, but include a call to uncompyle2 
> (or any alternative .pyc to .py decoder) at setup time, so Django 
> finds the .py files as usual.
>
Brilliant! Or, even just have setup write out the stub .py files without 
needing another dependency.

-- 
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/af84780b-0e08-4ff0-8b4a-ea899ec5f443%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Trying to migrate data and not getting correct data out of a field 1.7c2

2014-08-13 Thread Matthew Meyer
I've attached an example project that recreated the error. Basically I 
created a profile and then setup some relations to it. When I change the 
relation from the profile to the User model and try to access the data 
after the models.py file has been changed but before the migration has been 
completed the members field returns only a single profile objects instead 
of the ones that were assigned.

Trying to determine if this is a bug I should submit or if I'm doing 
something wrong.

-- 
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/ae5c3668-b75f-4cbb-8099-fe79cd24aaa3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


migration_example.tgz
Description: GNU Unix tar archive


Re: multiple projects on same database

2014-08-13 Thread Camilo Torres
Hello Hector,

It seems that using 2 different databases will cause duplicate schema (tables) 
and duplicate data. So in your case I prefer to change my mind and recomend you 
to use a single database. In general I don't see any problem with that.

Regards,
Camilo.

-- 
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/ffb1875f-1200-4c9c-8cf0-f8946fd3dd2e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Tango with Django Tutorial

2014-08-13 Thread darkman237
This is one of the tutorials I'm going through. I checked everything and it 
all to have been entered properly. The initial populate database app didn't 
work, so I entered the items in manually. While it shows in recent activity 
that the categories were entered, I do not see the name of the category 
only the variable name(category). Can't seem to track down the problem. 
Also likes needs to be defined, but I can't find the part where it enters 
that in. It's not where I am currently, so I'm a little stumped there as 
well. Anyone out there that has completed this tutorial and can give me a 
hand with it would be appreciated.

Thanks!

-- 
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/3cab3e06-5afd-4fca-a4cc-63df5ae0713b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Django app deployment step-by-step

2014-08-13 Thread darkman237
I'm a newbie to the whole Python/Django world so I've been working my way 
through tutorials and trying to learn. What I have not yet encountered, not 
can I find anything with the searches I've made for the topic of 
deployment. I checked with my host and they do have python set up on the 
Apache server. I only have access via cpanel and ftp. When I get around to 
actually deploying an application:

1. Where do the files go? Supposed to be housed outside of the public 
directory, only that could get tricky with multiple apps on the same 
account.
2. How do I "run the server" without shell access?
3. Obviously a browser is defaulted to port 80 and not 3000, where and how 
do I change that so it points normally?

What do I need to tell the host to make sure everything is set up 
correctly. How do I talk to a hosting company about adding Python/Django if 
the client's host does not and I am creating a site for them?

Thanks for your help in advance. Please be patient with me.

-- 
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/6e790801-bcf7-42e2-9711-7c348202ee42%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django app deployment step-by-step

2014-08-13 Thread Andrew Farrell
I've tried to get django running without shell access and it was a
headache. You can get a good server with shell access for $10.

Unless you are far smarter than I, you will almost certainly waste more
than hours trying to get django to work without shell access. With two of
those hours, you would be better off working a minimum wage (in the US) job
and spending $10 to rent a Virtual Private Server from either Linode
 or Digital Ocean
 for a month. Others prefer Digital
Ocean, but I use Linode and was very happy with the speed it took me to go
from signing up to getting an SSH shell. I also really like the
documentation they have for setting up things like nginx.


On Wed, Aug 13, 2014 at 3:41 PM, darkman237  wrote:

> I'm a newbie to the whole Python/Django world so I've been working my way
> through tutorials and trying to learn. What I have not yet encountered, not
> can I find anything with the searches I've made for the topic of
> deployment. I checked with my host and they do have python set up on the
> Apache server. I only have access via cpanel and ftp. When I get around to
> actually deploying an application:
>
> 1. Where do the files go? Supposed to be housed outside of the public
> directory, only that could get tricky with multiple apps on the same
> account.
> 2. How do I "run the server" without shell access?
> 3. Obviously a browser is defaulted to port 80 and not 3000, where and how
> do I change that so it points normally?
>
> What do I need to tell the host to make sure everything is set up
> correctly. How do I talk to a hosting company about adding Python/Django if
> the client's host does not and I am creating a site for them?
>
> Thanks for your help in advance. Please be patient with me.
>
> --
> 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/6e790801-bcf7-42e2-9711-7c348202ee42%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CA%2By5TLbUJQ9pJF8urz7VR4GZafCk1yqkRqxiD7sQO16C5_GPAw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django app deployment step-by-step

2014-08-13 Thread Collin Anderson
digital ocean is probably the best, though linode has been around
longer. with ramnode.com you can get tiny servers for as low as
$15/year.

-- 
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/CAFO84S656XREVPaw0xTkvx2YENtsUitydzeOwmFxP-deAhYqyQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: school website

2014-08-13 Thread Lee Hinde
You might check out: https://github.com/burke-software




On Tue, Aug 12, 2014 at 7:24 AM, ngangsia akumbo  wrote:

> i have a website to build
>
> it will consist of 4 groups
> students, staff, parents and courses
>
> students will have the following
> profile
> update
> delete
> access courses
> student will only access the course they registered in
>
> staffs will be able to just update information
>
> parents
> will have profile, update, delete,  profile access information
>
> course \
> out line of all courses
> only courses registered can be access bu that student
>
> student should also be able to send messages to each other
>
> i have never done this kid of project, i some guideline on how to go about
> with this
>
> thanks for sincere response
>
>

-- 
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/CA%2BePoMx0LYObGA%2BrLqMJaaY6%3Dv0vTJbs_vRtzwr0c5ke9xDi3A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Python Brasil [10] - Call for papers

2014-08-13 Thread Renato Oliveira
Hi all! We postponed the call for papers to Friday, 15th

And the first batch of tickets is valid until Sunday, 17th!

See you in Porto de Galinhas!

Renato Oliveira
@_renatooliveira 
Labcodes - www.labcodes.com.br



On Sat, Aug 9, 2014 at 11:59 AM, Helton Alves 
wrote:

> This year the PYBR will be "FODA". \o
>
>
> 2014-08-09 15:30 GMT+01:00 Renato Oliveira :
>
>> Hi all,
>>
>> You have until tomorrow to submit your talk to Python Brasil [10].
>>
>> http://2014.pythonbrasil.org.br/dashboard/proposals/
>>
>> The conference will be amazing! See why:
>>
>> Our Keynotes -> http://2014.pythonbrasil.org.br/speakers/
>>
>> Our Venue -> http://2014.pythonbrasil.org.br/news/the-conference-venue/
>>
>> And on November 9th were going to have some activities (TBA) like scuba
>> diving, standup paddle
>> 
>>  and
>> others!
>>
>> Thanks and see you in Porto de Galinhas!
>>
>> Renato Oliveira
>> @_renatooliveira 
>> Labcodes - www.labcodes.com.br
>>
>>  --
>> 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/CAGPLouU_jBpejAhbwSZ3d_6FYWSJ5jFj5u8xW%3DgRjZXSEfz9jw%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
>
> Helton Alves 
> Desenvolvedor web
> Graduado em Sistemas de Informação - FACIMP
> Cursando Metodologia do Ensino Superior - INESPO
>
> --
> 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/CABcoSmA1oVqcyYrdr5vj-vNfOyXv1ZnWBvGnTvWPW2YNE4dr5w%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAGPLouVBvjmbSEpt3QYqMfmRR7Qomx_aW5WX964wtMeDa%2BSyoQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django app deployment step-by-step

2014-08-13 Thread Jorge Andrés Vergara Ebratt
Actually it's not that hard, I followed this tutorial from Digital Ocean to
set up most of my Rackspace Cloud Servers
https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-django-with-postgres-nginx-and-gunicorn



2014-08-13 14:41 GMT-05:00 darkman237 :

> I'm a newbie to the whole Python/Django world so I've been working my way
> through tutorials and trying to learn. What I have not yet encountered, not
> can I find anything with the searches I've made for the topic of
> deployment. I checked with my host and they do have python set up on the
> Apache server. I only have access via cpanel and ftp. When I get around to
> actually deploying an application:
>
> 1. Where do the files go? Supposed to be housed outside of the public
> directory, only that could get tricky with multiple apps on the same
> account.
> 2. How do I "run the server" without shell access?
> 3. Obviously a browser is defaulted to port 80 and not 3000, where and how
> do I change that so it points normally?
>
> What do I need to tell the host to make sure everything is set up
> correctly. How do I talk to a hosting company about adding Python/Django if
> the client's host does not and I am creating a site for them?
>
> Thanks for your help in advance. Please be patient with me.
>
> --
> 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/6e790801-bcf7-42e2-9711-7c348202ee42%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
*Jorge Andres Vergara Ebratt*
*#SoftwareDeveloper (Or at least trying to be)*
*@javebratt*
*facebook.com/javebratt *

-- 
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/CAAeX05FtaHxDyfQ5Q4jjWopTTiZE_ba9tOjEpQwNu8hpRb_98A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Question about post_save

2014-08-13 Thread Neto
I'm using post_save but he is in loop:

@receiver(models.signals.post_save, sender=Cars)
def auto_num_on_save(sender, instance, **kwargs):
my code
instance.save()


How do I save changes without calling post_save again?

-- 
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/91745299-16fe-477a-b532-f2580e806d91%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.