Re: Serving static files (admin panel and others)

2014-12-13 Thread Muhammed Tüfekyapan
I find the problem. Problem was the file dir nginx looking for static file is different than I used for static file. I changed the files location and it solved. Thanks for response. On Sunday, December 14, 2014 4:31:49 AM UTC+2, Florian Schweikert wrote: > > On 14/12/14 00:55, Muhammed Tüfe

django template auto format tool?

2014-12-13 Thread Abraham Varricatt
Hello, Is there any command-line based tool which would let one auto-format Django template files? Ideally, the tool should also be used to format HTML, CSS and .JS files too. I've recently inherited a bad-looking code base and want to clean it up. Have heard of the PEP8 autoformatter, but th

Re: Serving static files (admin panel and others)

2014-12-13 Thread Florian Schweikert
On 14/12/14 00:55, Muhammed Tüfekyapan wrote: > I try many things to serve .css files but I can't do that. How can i > serve .css and .js files in Django 1.7? > > > I typed django manage.py collectstatic but still my admin panel don't > load css. > > What can i do? did you follow the howto in t

Serving static files (admin panel and others)

2014-12-13 Thread Muhammed Tüfekyapan
Hello everyone, I try many things to serve .css files but I can't do that. How can i serve .css and .js files in Django 1.7? I typed django manage.py collectstatic but still my admin panel don't load css. What can i do? Best. -- You received this message because you are subscribed to th

Re: How to toggle/set boolean-values of multiple records in the Admin?

2014-12-13 Thread inoyon artlover KLANGRAUSCH
Tried something like this, but it doesn't work... class ZipCodeAdmin(admin.ModelAdmin): list_display = ['zipcode', 'city', 'active'] ordering = ['zipcode'] def toggle_status(self, request, queryset): for item in queryset: item.active = True item.save()

Re: Need to search through several tables using one model

2014-12-13 Thread Damjan Dimitrioski
The search filter above the change list view template, there is a button named search I think, I think it's need to overriden in order to implement custom model or something. On Sat, Dec 13, 2014 at 11:06 PM, Vijay Khemlani wrote: > > What search button are you talking about? > > On Sat, Dec 13,

Re: Need to search through several tables using one model

2014-12-13 Thread Vijay Khemlani
What search button are you talking about? On Sat, Dec 13, 2014 at 2:23 PM, Alon Nisser wrote: > > You could also create a model that foreign keys to all the relevant > models, and filter on that.. > Buy first you need to clarify (for your self..) The exact use case: is it > search? if so better u

How to toggle/set boolean-values of multiple records in the Admin?

2014-12-13 Thread inoyon artlover KLANGRAUSCH
Hi there, my model is: class ZipCode(models.Model): zipcode = models.CharField(max_length=5) city = models.CharField(max_length=255) active = models.BooleanField(default=False) I would like to mange the 'active' status of some entries in the admin by selecting multiple. For example

Re: Django + Raspberry PI

2014-12-13 Thread albrnick
A bit dated, but since this page came up when I ran into the same issue, thought I'd post my fix. Pretty much I turned off DEBUG in the settings.py file, and the performance is fine now = ) Best Wishes, -Nick On Friday, March 1, 2013 10:58:28 AM UTC-5, Nicolas Emiliani wrote: > > Hey guys! >

Django 1.7: How to migrate data between two external apps

2014-12-13 Thread John-Scott
Say I decided to switch from a third party app foo-tags to app bar-tags. Their Tag models are mostly identical so I just need to move the data from foo-tag to bar-tag. Since I don't control their migrations, I'd need to create a migration in one of my own apps: ./manage.py makemigrations my_app

Re: Need to search through several tables using one model

2014-12-13 Thread Alon Nisser
You could also create a model that foreign keys to all the relevant models, and filter on that.. Buy first you need to clarify (for your self..) The exact use case: is it search? if so better use haystack with some search backend (elasticsearch would be a great choice), Is it to choose somethin

Re: Django-compressor manifest.json problem on Heroku

2014-12-13 Thread Guy Tamir
I haven't configured django caching, how do I do that? Also - CachedS3BotoStorage is this: from django.core.files.storage import get_storage_class from storages.backends.s3boto import S3BotoStorage from django.core.files.base import File class CachedS3BotoStorage(S3BotoStorage): """ S

Re: Need to search through several tables using one model

2014-12-13 Thread Damjan Dimitrioski
Can I override the search button, so it will call the custom raw query ? And if yes, can you show me how to override it, please ? On Friday, December 12, 2014 5:41:08 PM UTC+1, Vijay Khemlani wrote: > > Just using the ORM I think not > > You could > > 1. Make a raw sql query using UNIONs for each

Re: Seeking for advise on usage MySQL together with MongoDB

2014-12-13 Thread Tom Christie
Hi Cal, > DRF has it's own problems and (again imho) does not solve the problems it was originally designed to fix. Attempting to build anything beyond "out of the box CRUD" requires hacky/unclean workarounds, with most of your time spent fighting against the shortcomings of DRF rather than wor