Re: Django 1.6 error at creating project

2013-11-12 Thread Ferdy Rodríguez
Hi, Yes, I always work with virtual environments, and I've checked that I did download django 1.6. However, I looks like is a problem with my Windows OS I fired up a Virtual Machine with Ubuntu and everything is working fine. So I'm testing my code in the Virtual box. Thanks for your tim

Widget isn't sticking?

2013-11-12 Thread Lachlan Musicman
Hola, I've set up a CalendarWidget as per the docs https://docs.djangoproject.com/en/1.6/topics/forms/media/ and can see correct results in the shell: forms.py - class CalendarWidget(forms.TextInput): class Media: css = { 'all': (settings.STATIC_URL + 'css/datepi

Re: How to run all tests in INSTALLED_APPS with the new test runner 1.6?

2013-11-12 Thread Russell Keith-Magee
On Sun, Nov 10, 2013 at 3:36 PM, Kyle MacFarlane wrote: > With the new test runner in 1.6 it only seems to be running tests under my > project and ignoring all tests in dependent apps listed in INSTALLED_APPS. > > If I try to specify another app to test by doing something like "django > test a_dep

How can I use {% for ROW in LIST %} within

2013-11-12 Thread Pepsodent Cola
How can I use *{% for ROW in LIST %}* within ** tag? The code I refer to are lines 21 to 25. http://dpaste.com/1458997/ 1 2 3 4 5 6 7 8 910 11 12 13 1415 16 17 18 1920*21* 22 23 2425 26 27 28 2930 31 32 33 3435 36 37 38 3940 41 42

Re: Admin stuck at login page

2013-11-12 Thread Keith Edmiston
Tom, First let me say "thanks!" for all the good info on session cookies. I must admit that I've had little reason to-date to learn much about them. This helped. It would appear that something is certainly amiss in this area, but I can't nail down what exactly. If you have additional time to inve

Re: Startproject failing on Django 1.6

2013-11-12 Thread Steve Sawyer
Sorry for the typeface - it was the default that the page gave me and didn't bother to change it (it also wouldn't word-wrap, so my apologies also for the ragged layout). In any case, 1.6 is out now, and I'm trying to get started with Django but can't get to 1st base here. I did use pip to inst

Re: wsgi vs. debug server URL's

2013-11-12 Thread Alex Mandel
Actually you could modify the project settings.py or urls.py to enforce that url on the debug servers. This means that the project files will be different but the app files will be the same between dev and production. But that's really odd way of doing it, normally on a production server you would

Re: wsgi vs. debug server URL's

2013-11-12 Thread Avraham Serour
it seems to me that this is on your apache configuration nothing to do with django or your application On Tue, Nov 12, 2013 at 7:42 PM, Sells, Fred wrote: > We deploy with Apache and it serves both django and generic html. We > are a small shop with internal applications and minimal server loa

Re: Startproject failing on Django 1.6

2013-11-12 Thread Avraham Serour
why are you using this font/size? it hurts my eyes trying to read and makes understanding difficult in any case, you didn't need to wait for 1.6 to be released, if your objective is to learn and you are not deploying production systems yet you could use the RC, or if before that you could use the

Startproject failing on Django 1.6

2013-11-12 Thread Steve Sawyer
Django 1.6 Python 3.3 Windows 7 pro I've been anxiously awaiting Django 1.6 as I've been learning Python 3 for the last year. I tried unsuccessfully to go through the tutorial using Django 1.5.5, and figured I should wait for 1.6 to be released so I could avoid having to research and resolv

wsgi vs. debug server URL's

2013-11-12 Thread Sells, Fred
We deploy with Apache and it serves both django and generic html. We are a small shop with internal applications and minimal server load and we are not ready to have a django server and an html server. I use the /wsgi prefix in my url's to identify what goes to django (via the httpd wsgi.conf

Re: Admin stuck at login page

2013-11-12 Thread Tom Evans
On Tue, Nov 12, 2013 at 4:50 PM, Keith Edmiston wrote: > Hi Tom, > > Thanks for responding. I'm not using Session Cookies, but instead am using > Session DB (SESSION_ENGINE = 'django.contrib.sessions.backends.db'). > I'm not talking about where the session data is stored. If you are using sessio

Re: Internationalization - top level locale .mo files generated but not recognised in Django 1.5

2013-11-12 Thread Mario J . Barchéin
I had the same problem. LOCALE_PATHS must be a tuple: *Wrong:* LOCALE_PATHS = ( '/path/to/toplevelfolder/locale' ) *Correct (look at the comma at he the end of the path):* LOCALE_PATHS = ( '/path/to/toplevelfolder/locale', ) Just spent 1 hour tying to figure out why it wasn't working. Bye. E

Re: Admin stuck at login page

2013-11-12 Thread Keith Edmiston
Hi Tom, Thanks for responding. I'm not using Session Cookies, but instead am using Session DB (SESSION_ENGINE = 'django.contrib.sessions.backends.db'). Not sure if that really answers your question though. Can you provide me with a best way to verify the session process is working correctly via

Re: django debugger

2013-11-12 Thread Harjot Mann
On Sun, Nov 10, 2013 at 12:27 PM, Harjot Mann wrote: > I succesfuly installed it on django's local server but what should I > need to do for those apps which are working on apache server. Even I > noticed that its not working on django' local server with my app which > is configured with apache. M

Re: Admin stuck at login page

2013-11-12 Thread Tom Evans
On Tue, Nov 12, 2013 at 2:23 PM, Keith Edmiston wrote: > PROBLEM: I am attempting to implement the Django Admin on a new project, but > when I log in the page simply reloads to the login screen as if nothing was > done. It should be noted that if I use incorrect credentials I get the error > messa

Re: Stroring images in the database

2013-11-12 Thread Avraham Serour
I believe 1.6 has a binary field, no need for an external solution, but again, do you really need to store the image in the DB? for most cases ImageField is enough, it stores the path so apache/nginx can serve the image directly On Tue, Nov 12, 2013 at 4:30 PM, Javier Guerra Giraldez wrote: > On

Re: presetting a field value with ModelForm

2013-11-12 Thread MikeKJ
Perfect, simple and blindingly obvious now it is pointed out, many thanks C.Kirby and thanks to Sergiy for replying. -- 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

Re: presetting a field value with ModelForm

2013-11-12 Thread MikeKJ
Perfect, simple and blindingly obvious. thanks C.Kirby On Tuesday, November 12, 2013 3:13:18 PM UTC, C. Kirby wrote: > > You don't show your view, which would be helpful but you process the form > with commit = false, then set the org, then save so something like: > > if adviceform.is_valid()

Re: presetting a field value with ModelForm

2013-11-12 Thread Sergiy Khohlov
I'm using class based view and have a simple example below. Not ideal but good for start: form.py class CreateGoodsForm(ModelForm): class Meta: model = Goods exclude = ('category',) view.py class GoodsCatalogCreateView( CreateView): """ View for creating new category it

Re: presetting a field value with ModelForm

2013-11-12 Thread C. Kirby
You don't show your view, which would be helpful but you process the form with commit = false, then set the org, then save so something like: if adviceform.is_valid(): af = adviceform(commit = false) af.organization = org_id#However you get this from the session af.save() On Tuesd

Re: presetting a field value with ModelForm

2013-11-12 Thread Sergiy Khohlov
It is easy to do. You should update object before executing save()... Many thanks, Serge +380 636150445 skype: skhohlov On Tue, Nov 12, 2013 at 5:02 PM, Timothy W. Cook wrote: > Thanks for posting this. I was just about to post a question with the > same exact scenario. > > Maybe we are miss

Re: presetting a field value with ModelForm

2013-11-12 Thread Timothy W. Cook
Thanks for posting this. I was just about to post a question with the same exact scenario. Maybe we are missing it in the docs somewhere??? On Tue, Nov 12, 2013 at 12:30 PM, MikeKJ wrote: > This is driving me nuts I do not want the user to be able to select > organisation I want to popul

Re: Stroring images in the database

2013-11-12 Thread Javier Guerra Giraldez
On Tue, Nov 12, 2013 at 8:57 AM, m1chael wrote: > People have always recommended to me that storing images directly in a > database is a bad idea. it IS a bad idea, but that doesn't mean it shouldn't be possible. there are several Storage subclasses that do that, and it's not hard to do another

presetting a field value with ModelForm

2013-11-12 Thread MikeKJ
This is driving me nuts I do not want the user to be able to select organisation I want to populate the form field with the known organisation organisation is a foreignkey to the model I am creating this form on so class AdviceLevel(models.Model): advice = models.ForeignKey(Advice

Admin stuck at login page

2013-11-12 Thread Keith Edmiston
PROBLEM: I am attempting to implement the Django Admin on a new project, but when I log in the page simply reloads to the login screen as if nothing was done. It should be noted that if I use incorrect credentials I get the error message as expected. URLS.py: from django.conf.urls import patterns,

Re: Stroring images in the database

2013-11-12 Thread Rafael E. Ferrero
Why you want to save your images directly on your database? +1 to m1chael say 2013/11/12 m1chael > People have always recommended to me that storing images directly in a > database is a bad idea. > > > > On Tue, Nov 12, 2013 at 8:47 AM, Leslie Jeffries > wrote: > > Have you looked at this dja

Re: Stroring images in the database

2013-11-12 Thread m1chael
People have always recommended to me that storing images directly in a database is a bad idea. On Tue, Nov 12, 2013 at 8:47 AM, Leslie Jeffries wrote: > Have you looked at this django add-on? > https://pypi.python.org/pypi/django-db-file-storage > > > On Tuesday, November 12, 2013 3:12:14 AM UT

Re: Stroring images in the database

2013-11-12 Thread Leslie Jeffries
Have you looked at this django add-on? https://pypi.python.org/pypi/django-db-file-storage On Tuesday, November 12, 2013 3:12:14 AM UTC-5, ckg...@gmail.com wrote: > > I would like to store images directly into the database i have been trying > this but does not seem to help or i may be doing it i

problem with custom Permission

2013-11-12 Thread Robert Jonathan Šimon
I have models, and now i add custom permission: class Menu(models.Model): name = models.CharField(max_length=30) podmenua = models.BooleanField() poradi = models.CharField(max_length=2) url = models.CharField(max_length=30) def __str__(self): return self.name def get_absolute_url(self): return "/%

ImportError: No module named filestorage

2013-11-12 Thread ckgathi
i was doing this on the python interactive from filestorage import DatabaseStorage what do i need to install so i dont get this error: ImportError: No module named filestorage -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscri

Stroring images in the database

2013-11-12 Thread ckgathi
I would like to store images directly into the database i have been trying this but does not seem to help or i may be doing it in the wrong way'' models.py from database_storage import DatabaseStorage DB_FILES = { 'table': 'files', 'base_url': '/blog/attach/', } class Img(

Re: django 1.5.1 / cache middleware and ajax functionality not working

2013-11-12 Thread Tom Evans
On Tue, Nov 12, 2013 at 9:35 AM, info rekal wrote: > Hello, > > We are running Django 1.5.1 with some ajax on the front end > (http://goo.gl/RuofnO) that allows visitors to add certain pages to their > favorites list (similar in functionality to a shopping cart). The 'Save to > Favorites' does not

Re: django 1.5.1 / cache middleware and ajax functionality not working

2013-11-12 Thread info rekal
Forgot to add that our settings.py includes the following: CACHE_BACKEND = 'memcached://unix:/path/to/memcached.sock' CACHE_MIDDLEWARE_SECONDS = 14400 CACHE_MIDDLEWARE_KEY_PREFIX = '' -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscri

django 1.5.1 / cache middleware and ajax functionality not working

2013-11-12 Thread info rekal
Hello, We are running Django 1.5.1 with some ajax on the front end (http://goo.gl/RuofnO) that allows visitors to add certain pages to their favorites list (similar in functionality to a shopping cart). The 'Save to Favorites' does not seem to function correctly when the cache middleware's are