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 :

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

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 >

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

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

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

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

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

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

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

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

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

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.

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? > > -- >

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

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

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

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`:

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

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

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()

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

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

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

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

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

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

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

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

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

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

Re: Model not appearing in django admin

2014-08-13 Thread Thomas Brightwell
Chedi, I commented out the other lines leaving this: urlpatterns = patterns('', # ## # DJANGO ADMIN # ## url(r'^admin/django_admin/', include(admin.site.urls)), # ## # STYLE TEST # ## url(r'^style/',

Re: Model not appearing in django admin

2014-08-13 Thread chedi toueiti
I see that you have other routes beginning with ^admin/, this can some time cause the non inclusion of certain urls depending on the order in which they appear in the urls.py file. Can you comment the other ones and just keep url(r'^admin/django_admin/', include(admin.site.urls)) to eliminate

Re: Model not appearing in django admin

2014-08-13 Thread Thomas Brightwell
Collin, I'm running django v1.7c1 On Wednesday, 13 August 2014 02:50:14 UTC+1, Collin Anderson wrote: > > Do you have admin.autodiscover() in your urls.py? (assuming you're not > using version 1.7) > -- You received this message because you are subscribed to the Google Groups "Django users"

Re: Model not appearing in django admin

2014-08-13 Thread Thomas Brightwell
Chedi, Thanks for the quick response. http://localhost:8000/admin/django_admin/webapp/retailer Page not found (404) Request Method: GET Request URL: http://localhost:8000/admin/django_admin/webapp/retailer Using the URLconf defined in webappconf.urls, Django tried these URL patterns, in this