Search Results

Search found 15813 results on 633 pages for 'django settings'.

Page 83/633 | < Previous Page | 79 80 81 82 83 84 85 86 87 88 89 90  | Next Page >

  • getting Cannot identify image file when trying to create thumbnail in django

    - by Mo J. Mughrabi
    Am trying to create a thumbnail in django, am trying to build a custom class specifically to be used for generating thumbnails. As following from StringIO import StringIO from PIL import Image class Thumbnail(object): source = '' size = (50, 50) output = '' def __init__(self): pass @staticmethod def load(src): self = Thumbnail() self.source = src return self def generate(self, size=(50, 50)): if not isinstance(size, tuple): raise Exception('Thumbnail class: The size parameter must be an instance of a tuple.') self.size = size # resize properties box = self.size factor = 1 fit = True image = Image.open(self.source) # Convert to RGB if necessary if image.mode not in ('L', 'RGB'): image = image.convert('RGB') while image.size[0]/factor > 2*box[0] and image.size[1]*2/factor > 2*box[1]: factor *=2 if factor > 1: image.thumbnail((image.size[0]/factor, image.size[1]/factor), Image.NEAREST) #calculate the cropping box and get the cropped part if fit: x1 = y1 = 0 x2, y2 = image.size wRatio = 1.0 * x2/box[0] hRatio = 1.0 * y2/box[1] if hRatio > wRatio: y1 = int(y2/2-box[1]*wRatio/2) y2 = int(y2/2+box[1]*wRatio/2) else: x1 = int(x2/2-box[0]*hRatio/2) x2 = int(x2/2+box[0]*hRatio/2) image = image.crop((x1,y1,x2,y2)) #Resize the image with best quality algorithm ANTI-ALIAS image.thumbnail(box, Image.ANTIALIAS) # save image to memory temp_handle = StringIO() image.save(temp_handle, 'png') temp_handle.seek(0) self.output = temp_handle return self def get_output(self): return self.output.read() the purpose of the class is so i can use it inside different locations to generate thumbnails on the fly. The class works perfectly, I've tested it directly under a view.. I've implemented the thumbnail class inside the save method of the forms to resize the original images on saving. in my design, I have two fields for thumbnails. I was able to generate one thumbnail, if I try to generate two it crashes and I've been stuck for hours not sure whats the problem. Here is my model class Image(models.Model): article = models.ForeignKey(Article) title = models.CharField(max_length=100, null=True, blank=True) src = models.ImageField(upload_to='publication/image/') r128 = models.ImageField(upload_to='publication/image/128/', blank=True, null=True) r200 = models.ImageField(upload_to='publication/image/200/', blank=True, null=True) uploaded_at = models.DateTimeField(auto_now=True) Here is my forms class ImageForm(models.ModelForm): """ """ class Meta: model = Image fields = ('src',) def save(self, commit=True): instance = super(ImageForm, self).save(commit=True) file = Thumbnail.load(instance.src) instance.r128 = SimpleUploadedFile( instance.src.name, file.generate((128, 128)).get_output(), content_type='image/png' ) instance.r200 = SimpleUploadedFile( instance.src.name, file.generate((200, 200)).get_output(), content_type='image/png' ) if commit: instance.save() return instance the strange part is, when i remove the line which contains instance.r200 in the form save. It works fine, and it does the thumbnail and stores it successfully. Once I add the second thumbnail it fails.. Any ideas what am doing wrong here? Thanks Update: I tried earlier doing the following but I still got the same error class ImageForm(models.ModelForm): """ """ class Meta: model = Image fields = ('src',) def save(self, commit=True): instance = super(ImageForm, self).save(commit=True) instance.r128 = SimpleUploadedFile( instance.src.name, Thumbnail.load(instance.src).generate((128, 128)).get_output(), content_type='image/png' ) instance.r200 = SimpleUploadedFile( instance.src.name, Thumbnail.load(instance.src).generate((200, 200)).get_output(), content_type='image/png' ) if commit: instance.save() return instance

    Read the article

  • Hardware settings reviewing

    - by dino99
    Get some hardware related errors logged into dmesg: oem@dub:~$ dmesg | grep ata10 [ 1.007989] ata10: PATA max UDMA/133 cmd 0xa800 ctl 0xa480 bmdma 0xa408 irq 18 [ 1.691664] ata10: prereset failed (errno=-19) [ 1.691670] ata10: reset failed, giving up oem@dub:~$ dmesg | grep ata2 [ 0.990290] ata2: SATA max UDMA/133 abar m1024@0xfebfb800 port 0xfebfb980 irq 45 [ 1.688011] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300) [ 1.688055] ata2.00: unsupported device, disabling [ 1.688057] ata2.00: disabled As I understand, its related to my old Seagate SATA HDD, and the PATA CDROM. These errors are quite new, so I feel that their settings (dma, write-cache, ...) have been modified by some upgrades. I've already used hdparm to set write-cache off on the HDDs. But it seems like I need to review some other setting(s) too. With oldest distro it was easy to know about the hardware settings, but now on Quantal/Precise its deeply hidden for the average user. So i would like to know how to view/modify these settings. About the CDROM reader, the problem is different: - the system don't identify it with an UUID; but only with ATAPI or by-id oem@dub:~$ dmesg|grep 'ATAPI' [ 1.308611] ata3.00: ATAPI: TSSTcorp CDDVDW SH-S203D, SB00, max UDMA/100 oem@dub:~$ ls -l /dev/disk/by-id/ ...... lrwxrwxrwx 1 root root 9 oct. 1 06:42 ata-TSSTcorp_CDDVDW_SH-S203D -> ../../sr0 .....

    Read the article

  • 12.04, nvidia-settings makes one of my dual monitors grey and useless, disables network

    - by Kerrick
    I'm running Ubuntu 12.04 64-bit, Precise Pangolin, with a PNY GTS 250 1GB video card and a monitor plugged into each of the DVI ports. I'm using the proprietary drivers (post-release updates). If I set anything to do with Separate X Screens up in nvidia-settings (and write it to xorg.conf and reboot), my second monitor has a grey background, no menu bar, no ability to have a window on it, the second monitor doesn't get picked up in a screneshot, and if I move my mouse cursor to it it's an ugly black X. Plus, my network is unable to connect to anything. If I subsequently delete /etc/X11/xorg.conf and reboot, everything goes back to working, albeit with a single monitor activated. If I set anything to do with TwinView up in nvidia-settings, my second monitor starts working, but it isn't seen as a second monitor by Ubuntu, so I can't apply color calibration to it separately. Plus, my mouse gets "caught" between the monitors every time I try to move my cursor between the two. What gives? If it helps, this is the xorg.conf that nvidia-settings generates for Separate X Screens.

    Read the article

  • nvidia-settings makes one of my dual monitors grey and useless, disables network

    - by Kerrick
    I'm running Ubuntu 12.04 64-bit, Precise Pangolin, with a PNY GTS 250 1GB video card and a monitor plugged into each of the DVI ports. I'm using the proprietary drivers (post-release updates). If I set anything to do with Separate X Screens up in nvidia-settings (and write it to xorg.conf and reboot), my second monitor has a grey background, no menu bar, no ability to have a window on it, the second monitor doesn't get picked up in a screneshot, and if I move my mouse cursor to it it's an ugly black X. Plus, my network is unable to connect to anything. If I subsequently delete /etc/X11/xorg.conf and reboot, everything goes back to working, albeit with a single monitor activated. If I set anything to do with TwinView up in nvidia-settings, my second monitor starts working, but it isn't seen as a second monitor by Ubuntu, so I can't apply color calibration to it separately. Plus, my mouse gets "caught" between the monitors every time I try to move my cursor between the two. What gives? If it helps, this is the xorg.conf that nvidia-settings generates for Separate X Screens.

    Read the article

  • Change X settings to boot into laptop with non working screen using an external monitor

    - by dassouki
    My laptop committed suicide. Is there a way I can boot into my ubuntu using an external screen? Ubuntu 10.10 video: Nvidia 9500 gm i think I can get dual screen upto and until the ubuntu login screen at which point it goes back into laptop display only. Then I can just type and enter my password. The system (i assume boots into ubuntu) but I got no way of going onto the x or nvidia settings to change my display to external monitor EDIT well I booted into terminal using control shift F1 i think, and now I'm trying to reporgram x.org, but strangely it seems bland with not a lot of settings in it EDIT 2 xrandr returns "Can't open display" EDit 3 after some messing around with xrandr and xinit ... my x.org only displays one monitor instead of two in its settings although both, i.e. the laptop and external screens are both connected. EDIT 4 it seems that x.org now has a "screen" and "monitor" section, I can't seem to be able to boot linux into monitor. I get a "Monitor is not a valid keyword" in this subsection

    Read the article

  • Apache cannot find mysql database modules

    - by user809857
    I've created a simple django project and setup a mysql database. My simple project just creates an entry on the database. The project works fine when I use the built in development server provided by django (runserver) and it works well. But when I deployed the project on Apache and mod_Wsgi (Ubuntu server), django could not find 'books', which is in this case my table in the database. The mysql database that I use in runserver and apache are just the same. I also did rebuild the database using sqlall,validate and syncdb of django but still i get the error. What could be wrong with what I'm doing? Thanks

    Read the article

  • Apache cannot find mysql database modules

    - by user809857
    I've created a simple django project and setup a mysql database. My simple project just creates an entry on the database. The project works fine when I use the built in development server provided by django (runserver) and it works well. But when I deployed the project on Apache and mod_Wsgi (Ubuntu server), django could not find 'books', which is in this case my table in the database. The mysql database that I use in runserver and apache are just the same. I also did rebuild the database using sqlall,validate and syncdb of django but still i get the error. What could be wrong with what I'm doing? Thanks

    Read the article

  • Is Ubuntu recognizing and/or using my NVIDIA graphics card?

    - by user212860
    This is my first post here, and I'm pretty new to Ubuntu/Linux. I currently have no other OS except for Ubuntu 13.10. (I used to have Win7 until i got a new terabyte hard drive). My current PC build, if any of this helps: CPU: Intel i5 quad-core Graphics: NVIDIA GeForce GTX 650 RAM: 8 GB HDD: 1 TB SATA 3 Motherboard: MSi Z77 A-G41 OS Ubuntu 13.10 So I recently installed Ubuntu 13.10 and put Steam on it, and I'm seeing that my games run a lot slower than they did when I had Win7. I figured it was a graphics problem, so I checked System Settings Details Overview. It says in "Graphics" that I have "Gallium 0.4 on NVE7" (don't really know what that is). Does this mean that Ubuntu is not using my graphics card? In System Settings Software & Updates Additional Drivers, it clearly shows like this: NVIDIA Corporation: GK107 [GeForce GTX 650] -This device is using an alternative driver (And then it shows a list of drivers that I can switch back and forth to) So this is a bit confusing. In Software and Updates, it clearly shows that I have my NVIDIA card installed, and that I have a driver selected for it. But in System Settings, it shows I have some Gallium 0.4 thing. I had done a bit of research, and ended up typing command: "lspci|grep VGA" in the Terminal. It showed this in response: VGA compatible controller: NVIDIA Corporation GK107 [GeForce GTX 650] (rev a1) The Terminal seems to recognize my graphics card. What it looks like to me, is that I don't have the proper driver, and I might be using my CPU's integrated graphics. When I switch around which driver I am using in that list, it still does not see my card in System Settings. Some of the drivers in the list give me some sort of OpenGL error when I try to run a game. It might just be that my games are running slow because the game developers have not optimized it for Ubuntu that well. However, that still doesn't take away from the fact that System Settings is not showing my NVIDIA card. TL;DR Version: How do I know if my video card is being recognized/used? If my video card is not being used, what is the best way fix that? Please make your answers easy to understand. I do not mind wordy responses, as long as I can follow what you're saying. Any help would be greatly appreciated! Thanks, Jabber5

    Read the article

  • Django db encoding

    - by realshadow
    Hey, I have a little problem with encoding. The data in db is ok, when I select the data in php its ok. Problem comes when I get the data and try to print it in the template, I get - Å port instead of Šport, etc. Everything is set to utf-8 - in settings.py, meta tags in template, db table and I even have unicode method specified for the model, but nothing seems to work. I am getting pretty hopeless here... Here is some code: class Category_info(models.Model): objtree_label_id = models.AutoField(primary_key = True) node_id = models.IntegerField(unique = True) language_id = models.IntegerField() label = models.CharField(max_length = 255) type_id = models.IntegerField() class Meta: db_table = 'objtree_labels' def __unicode__(self): return self.label I have even tried with return u"%s" % self.label. Here is the view: def categories_list(request): categories_list = Category.objects.filter(parent_id = 1, status = 1) paginator = Paginator(categories_list, 10) try: page = int(request.GET.get('page', 1)) except ValueError: page = 1 try: categories = paginator.page(page) except (EmptyPage, InvalidPage): categories = paginator.page(paginator.num_pages) return render_to_response('categories_list.html', {'categories': categories}) Maybe I am just blind and/or stupid, but it just doesnt work. So any help is appreciated, thanks in advance. Regards

    Read the article

  • Django forms I cannot save picture file

    - by dana
    i have the model: class OpenCv(models.Model): created_by = models.ForeignKey(User, blank=True) first_name = models.CharField(('first name'), max_length=30, blank=True) last_name = models.CharField(('last name'), max_length=30, blank=True) url = models.URLField(verify_exists=True) picture = models.ImageField(help_text=('Upload an image (max %s kilobytes)' %settings.MAX_PHOTO_UPLOAD_SIZE),upload_to='jakido/avatar',blank=True, null= True) bio = models.CharField(('bio'), max_length=180, blank=True) date_birth = models.DateField(blank=True,null=True) domain = models.CharField(('domain'), max_length=30, blank=True, choices = domain_choices) specialisation = models.CharField(('specialization'), max_length=30, blank=True) degree = models.CharField(('degree'), max_length=30, choices = degree_choices) year_last_degree = models.CharField(('year last degree'), max_length=30, blank=True,choices = year_last_degree_choices) lyceum = models.CharField(('lyceum'), max_length=30, blank=True) faculty = models.ForeignKey(Faculty, blank=True,null=True) references = models.CharField(('references'), max_length=30, blank=True) workplace = models.ForeignKey(Workplace, blank=True,null=True) the form: class OpencvForm(ModelForm): class Meta: model = OpenCv fields = ['first_name','last_name','url','picture','bio','domain','specialisation','degree','year_last_degree','lyceum','references'] and the view: def save_opencv(request): if request.method == 'POST': form = OpencvForm(request.POST, request.FILES) # if 'picture' in request.FILES: file = request.FILES['picture'] filename = file['filename'] fd = open('%s/%s' % (MEDIA_ROOT, filename), 'wb') fd.write(file['content']) fd.close() if form.is_valid(): new_obj = form.save(commit=False) new_obj.picture = form.cleaned_data['picture'] new_obj.created_by = request.user new_obj.save() return HttpResponseRedirect('.') else: form = OpencvForm() return render_to_response('opencv/opencv_form.html', { 'form': form, }, context_instance=RequestContext(request)) but i don't seem to save the picture in my database... something is wrong, and i can't figure out what :(

    Read the article

  • Django forms I cannot save picture file

    - by dana
    i have the model: class OpenCv(models.Model): created_by = models.ForeignKey(User, blank=True) first_name = models.CharField(('first name'), max_length=30, blank=True) last_name = models.CharField(('last name'), max_length=30, blank=True) url = models.URLField(verify_exists=True) picture = models.ImageField(help_text=('Upload an image (max %s kilobytes)' %settings.MAX_PHOTO_UPLOAD_SIZE),upload_to='jakido/avatar',blank=True, null= True) bio = models.CharField(('bio'), max_length=180, blank=True) date_birth = models.DateField(blank=True,null=True) domain = models.CharField(('domain'), max_length=30, blank=True, choices = domain_choices) specialisation = models.CharField(('specialization'), max_length=30, blank=True) degree = models.CharField(('degree'), max_length=30, choices = degree_choices) year_last_degree = models.CharField(('year last degree'), max_length=30, blank=True,choices = year_last_degree_choices) lyceum = models.CharField(('lyceum'), max_length=30, blank=True) faculty = models.ForeignKey(Faculty, blank=True,null=True) references = models.CharField(('references'), max_length=30, blank=True) workplace = models.ForeignKey(Workplace, blank=True,null=True) objects = OpenCvManager() the form: class OpencvForm(ModelForm): class Meta: model = OpenCv fields = ['first_name','last_name','url','picture','bio','domain','specialisation','degree','year_last_degree','lyceum','references'] and the view: def save_opencv(request): if request.method == 'POST': form = OpencvForm(request.POST, request.FILES) # if 'picture' in request.FILES: file = request.FILES['picture'] filename = file['filename'] fd = open('%s/%s' % (MEDIA_ROOT, filename), 'wb') fd.write(file['content']) fd.close() if form.is_valid(): new_obj = form.save(commit=False) new_obj.picture = form.cleaned_data['picture'] new_obj.created_by = request.user new_obj.save() return HttpResponseRedirect('.') else: form = OpencvForm() return render_to_response('opencv/opencv_form.html', { 'form': form, }, context_instance=RequestContext(request)) but i don't seem to save the picture in my database... something is wrong, and i can't figure out what :(

    Read the article

  • Can't iterate over nestled dict in django

    - by fredrik
    Hi, Im trying to iterate over a nestled dict list. The first level works fine. But the second level is treated like a string not dict. In my template I have this: {% for product in Products %} <li> <p>{{ product }}</p> {% for partType in product.parts %} <p>{{ partType }}</p> {% for part in partType %} <p>{{ part }}</p> {% endfor %} {% endfor %} </li> {% endfor %} It's the {{ part }} that just list 1 char at the time based on partType. And it seams that it's treated like a string. I can however via dot notation reach all dict but not with a for loop. The current output looks like this: Color C o l o r Style S ..... The Products object looks like this in the log: [{'product': <models.Products.Product object at 0x1076ac9d0>, 'parts': {u'Color': {'default': u'Red', 'optional': [u'Red', u'Blue']}, u'Style': {'default': u'Nice', 'optional': [u'Nice']}, u'Size': {'default': u'8', 'optional': [u'8', u'8.5']}}}] What I trying to do is to pair together a dict/list for a product from a number of different SQL queries. The web handler looks like this: typeData = Products.ProductPartTypes.all() productData = Products.Product.all() langCode = 'en' productList = [] for product in productData: typeDict = {} productDict = {} for type in typeData: typeDict[type.typeId] = { 'default' : '', 'optional' : [] } productDict['product'] = product productDict['parts'] = typeDict defaultPartsData = Products.ProductParts.gql('WHERE __key__ IN :key', key = product.defaultParts) optionalPartsData = Products.ProductParts.gql('WHERE __key__ IN :key', key = product.optionalParts) for defaultPart in defaultPartsData: label = Products.ProductPartLabels.gql('WHERE __key__ IN :key AND partLangCode = :langCode', key = defaultPart.partLabelList, langCode = langCode).get() productDict['parts'][defaultPart.type.typeId]['default'] = label.partLangLabel for optionalPart in optionalPartsData: label = Products.ProductPartLabels.gql('WHERE __key__ IN :key AND partLangCode = :langCode', key = optionalPart.partLabelList, langCode = langCode).get() productDict['parts'][optionalPart.type.typeId]['optional'].append(label.partLangLabel) productList.append(productDict) logging.info(productList) templateData = { 'Languages' : Settings.Languges.all().order('langCode'), 'ProductPartTypes' : typeData, 'Products' : productList } I've tried making the dict in a number of different ways. Like first making a list, then a dict, used tulpes anything I could think of. Any help is welcome! Bouns: If someone have an other approach to the SQL quires, that is more then welcome. I feel that it kinda stupid to run that amount of quires. What is happening that each product part has a different label base on langCode. ..fredrik

    Read the article

  • MySQL efficiency as it relates to the database/table size

    - by mlissner
    I'm building a system using django, Sphinx and MySQL that's very quickly becoming quite large. The database currently has about 2000 rows, and I've written a program that's going to populate it with another 40,000 rows in a couple days. Since the database is live right now, and since I've never had a database with this much information in it, I'm worried about some things: Is adding all these rows going to seriously degrade the efficiency of my django app? Will I need to go back through it and optimize all my database calls so they're doing things more cleverly? Or will this make the database slow all around to the extent that I can't do anything about it at all? If you scoff at my 40k rows, then, my next question is, at what point SHOULD I be concerned? I will likely be adding another couple hundred thousand soon, so I worry, and I fret. How is sphinx going to feel about all this? Is it going to freak out when it realizes it has to index all this data? Or will it be fine? Is this normal for it? If it is, at what point should I be concerned that it's too much data for Sphinx? Thanks for any thoughts.

    Read the article

  • Select those objects whose related objects IDs are *all* in given string

    - by Jannis
    Hi Django people, I want to build a frontend to a recipe database which enables the user to search for a list of recipes which are cookable with the ingredients the user supplies. I have the following models class Ingredient(models.Model): name = models.CharField(max_length=100, unique=True) slug = models.SlugField(max_length=100, unique=True) importancy = models.PositiveSmallIntegerField(default=4) […] class Amount(models.Model): recipe = models.ForeignKey('Recipe') ingredient = models.ForeignKey(Ingredient) […] class Rezept(models.Model): name = models.CharField(max_length=100) slug = models.SlugField() instructions = models.TextField() ingredients = models.ManyToManyField(Ingredient, through=Amount) […] and a rawquery which does exactly what I want: It gets all the recipes whose required ingredients are all contained in the list of strings that the user supplies. If he supplies more than necessary, it's fine too. query = "SELECT *, COUNT(amount.zutat_id) AS selected_count_ingredients, (SELECT COUNT(*) FROM amount WHERE amount.recipe_id = amount.id) AS count_ingredients FROM amount LEFT OUTER JOIN amount ON (recipe.id = recipe.recipe_id) WHERE amount.ingredient_id IN (%s) GROUP BY amount.id HAVING count_ingredient=selected_count_ingredient" % ",".join([str(ingredient.id) for ingredient in ingredients]) rezepte = Rezept.objects.raw(query) Now, what I'm looking for is a way that does not rely on .raw() as I would like to do it purely with Django's queryset methods. Additionally, it would be awesome if you guys knew a way of including the ingredient's importancy in the lookup so that a recipe is still shown as a result even though one of its ingredients (that has an importancy of 0) is not supplied by the user.

    Read the article

  • Dynamically setting the queryset of a ModelMultipleChoiceField to a custom recordset

    - by Daniel Quinn
    I've seen all the howtos about how you can set a ModelMultipleChoiceField to use a custom queryset and I've tried them and they work. However, they all use the same paradigm: the queryset is just a filtered list of the same objects. In my case, I'm trying to get the admin to draw a multiselect form that instead of using usernames as the text portion of the , I'd like to use the name field from my account class. Here's a breakdown of what I've got: # models.py class Account(models.Model): name = models.CharField(max_length=128,help_text="A display name that people understand") user = models.ForeignKey(User, unique=True) # Tied to the User class in settings.py class Organisation(models.Model): administrators = models.ManyToManyField(User) # admin.py from django.forms import ModelMultipleChoiceField from django.contrib.auth.models import User class OrganisationAdminForm(forms.ModelForm): def __init__(self, *args, **kwargs): from ethico.accounts.models import Account self.base_fields["administrators"] = ModelMultipleChoiceField( queryset=User.objects.all(), required=False ) super(OrganisationAdminForm, self).__init__(*args, **kwargs) class Meta: model = Organisation This works, however, I want queryset above to draw a selectbox with the Account.name property and the User.id property. This didn't work: queryset=Account.objects.all().order_by("name").values_list("user","name") It failed with this error: 'tuple' object has no attribute 'pk' I figured that this would be easy, but it's turned into hours of dead-ends. Anyone care to shed some light?

    Read the article

  • Blocking error in celery

    - by dmitry
    I have no idea what's this. Python 2.7 + django-1.5.1 + httpd + rabbitmq + django-celery==3.0.17 Tasks are not executed because of some error. Below is celery's log. Maybe someone has faced it before. [2013-06-24 17:10:03,792: CRITICAL/MainProcess] Can't decode message body: AttributeError("'JoinInfo' object has no attribute '__dict__'",) (type:u'application/x-python-serialize' encoding:u'binary' raw:'\'\\x80\\x02}q\\x01(U\\x07expiresq\\x02NU\\x03utcq\\x03\\x88U\\x04argsq\\x04cdjango.contrib.auth.models\\nUser\\nq\\x05)\\x81q\\x06}q\\x07(U\\x08usernameq\\x08X\\x19\\x00\\x00\\[email protected]\\nfirst_nameq\\tX\\x05\\x00\\x00\\x00BibbyU\\tlast_nameq\\nX\\x08\\x00\\x00\\x00OffshoreU\\r_client_cacheq\\x0bccopy_reg\\n_reconstructor\\nq\\x0ccbongoregistration.models\\nClient\\nq\\rc__builtin__\\nobject\\nq\\x0eN\\x87Rq\\x0f}q\\x10(h\\nX\\x08\\x00\\x00\\x00OffshoreU\\x1bpurchase_confirmation_emailq\\x11X\\x1f\\x00\\x00\\[email protected]\\x1dpurchase_confirmation_email_1q\\x12X!\\x00\\x00\\[email protected]\\x06_stateq\\x13cdjango.db.models.base\\nModelState\\nq\\x14)\\x81q\\x15}q\\x16(U\\x06addingq\\x17\\x89U\\x02dbq\\x18U\\x07defaultq\\x19ubU\\x0buser_ptr_idq\\x1aJ\\xb4\\xa2\\x03\\x00U\\x08is_staffq\\x1b\\x89U\\x08postcodeq\\x1cX\\x08\\x00\\x00\\x00AB11 5BSU\\x0cdegree_limitq\\x1dK\\x06U\\x07messageq\\x1eX\\xd1E\\x00\\x00<table id="container" style="margin: 0px; padding: 0px; width: 100%; background-color: #ffffff;" cellspacing="0" cellpadding="0"... (22911b)'') Traceback (most recent call last): File "/opt/www/MyProject-main/eggs/kombu-2.5.10-py2.7.egg/kombu/messaging.py", line 556, in _receive_callback decoded = None if on_m else message.decode() File "/opt/www/MyProject-main/eggs/kombu-2.5.10-py2.7.egg/kombu/transport/base.py", line 147, in decode self.content_encoding, accept=self.accept) File "/opt/www/MyProject-main/eggs/kombu-2.5.10-py2.7.egg/kombu/serialization.py", line 187, in decode return decode(data) File "/opt/www/MyProject-main/eggs/kombu-2.5.10-py2.7.egg/kombu/serialization.py", line 74, in pickle_loads return load(BytesIO(s)) AttributeError: 'JoinInfo' object has no attribute '__dict__'

    Read the article

  • Firefox handles xxx.submit(), Safari doesn't ... what can be done?

    - by Prairiedogg
    I'm trying to make a pull down menu post a form when the user selects (releases the mouse) on one of the options from the menu. This code works fine in FF but Safari, for some reason, doesn't submit the form. I re-wrote the code using jquery to see if jquery's .submit() implementation handled the browser quirks better. Same result, works in FF doesn't work in safari. The following snippets are from the same page, which has some django template language mixed in. Here's the vanilla js attempt: function formSubmit(lang) { if (lang != '{{ LANGUAGE_CODE }}') { document.getElementById("setlang_form").submit(); } } Here's the jquery attempt: $(document).ready(function() { $('#lang_submit').hide() $('#setlang_form option').mouseup(function () { if ($(this).attr('value') != '{{ LANGUAGE_CODE }}') { $('#setlang_form').submit() } }); }); and here's the form: <form id="setlang_form" method="post" action="{% url django.views.i18n.set_language %}"> <fieldset> <select name="language"> {% for lang in interface_languages %} <option value="{{ lang.code }}" onmouseup="formSubmit('{{ lang.name }}')" {% ifequal lang.code LANGUAGE_CODE %}selected="selected"{% endifequal %}>{{ lang.name }}</option> {% endfor %} </select> </fieldset> </form> My question is, how can I get this working in Safari?

    Read the article

  • phpbb3 email settings for Zoho SMTP server

    - by SkylarMT
    I've spent a while guessing and googling, and haven't found an answer. In the past I setup my forums to send via my Gmail account, but spambots with fake emails have flooded my inbox, so I setup [email protected] with Zoho mail. Zoho works great, but I need to have my installation of phpbb3 send mass emails through the smtp.zoho.com mail server, and I can't figure out what settings I should use. The instructions on https://www.zoho.com/mail/help/pop-access.html are a little vague for anything that doesn't auto-detect the exact settings.

    Read the article

  • Display iphone application settings within your application

    - by Dougnukem
    The iphone supports a means of defining your application's settings such that it will automatically create a UI in the Settings app. I want to also allow the user to edit the application settings within the application but it'd be nice to reuse the same UI that is automatically created. See: Application Settings Is there a way to have your application display the settings using the same UI that the Settings application does?

    Read the article

  • Scale plugin keeps forgetting hot corner settings on restart

    - by Michael Butler
    I'm using Ubuntu 12.04 with Unity, which I suppose uses Compiz as well. I have Compiz Settings Manager, and make the top left and bottom left corners of my screen activate the "Scale" (like Exposé) function to scale and show all windows. The problem is that when I restart the computer, the hot corners no longer do anything. I have to go back into compiz settings manager, delete the hot corner option, and then set it again. Something seems to be overriding or deleting the compiz hot corner setting on restart. Update: Sometimes, the setting loses its footing even while the computer is running. I haven't figured out yet what triggers it.

    Read the article

  • How do I clear xmodmap settings?

    - by Wayne Werner
    Exactly what the title asks. How do I clear xmodmap settings? I have an IBM model M, and somehow xkeycaps got it into its head that my "End" key was not any key at all. xev reports keypresses when I use it, so I know the event is being generated by the keyboard. Also, xkeycaps thinks that my arrow keys are all wonky, and apparently the scrollbar is broken so it only scrolls down - so I can't scroll up to find an IBM keyboard that just maybe is close to my map so I can fix my keys. So I'm trying to reset my keyboard to the default settings, but the xmodmap manpage is woefully devoid of "reset all" or "clear all" or anything of that nature (that I was able to find). Help would be greatly appreciated!

    Read the article

  • sysctl.conf ignore net settings

    - by Steffen Unland
    I have a little problem with sysctl on a Ubuntu 10.04 LTS system. When I set the sysctl values with "sysctl -w " all work fine, but when I try to use the sysctl.conf file. the net settings will be ignored. For example my sysctl.conf # /etc/sysctl.conf - Configuration file for setting system variables kernel.domainname=findme.sysctl # Corefiles information fs.suid_dumpable=2 kernel.core_pattern=/cores/core-%e-%s-%u-%g-%p-%t ##############################################################3 # Functions previously found in netbase net.ipv4.netfilter.ip_conntrack_tcp_timeout_fin_wait=1 net.ipv4.netfilter.ip_conntrack_tcp_timeout_close_wait=1 when I grep to the values, I can see that the sysctl settings for net.ipv4.netfilter don't set. [host:~ ] $ sysctl -a | grep domainname kernel.domainname = findme.sysctl [host:~ ] $ sysctl -a | grep "core_pattern" kernel.core_pattern = /cores/core-%e-%s-%u-%g-%p-%t [host:~ ] $ sysctl -a | grep "timeout_fin_wait" net.netfilter.nf_conntrack_tcp_timeout_fin_wait = 120 net.ipv4.netfilter.ip_conntrack_tcp_timeout_fin_wait = 120 [host:~ ] $ sysctl -a | grep "timeout_close_wait" net.netfilter.nf_conntrack_tcp_timeout_close_wait = 60 net.ipv4.netfilter.ip_conntrack_tcp_timeout_close_wait = 60 can somebody help me to solve the problem? If you need more information I can post it. Cheers, Steffen

    Read the article

  • Display settings changes automatically with dual monitors in 12.04 and 12.10 AMD

    - by Johan Hovda
    Dual monitors works fine, except that the settings suddenly change. This happens very often, sometimes several times in a few minutes. It is very irritating having to set the settings again each time. Suddenly mirroring is set to on, sometimes the monitor switch places (from left to right and so on), and most of the times the screen resolutions are also changed. I use Gnome Shell. I have tried unity with the same result. I use an open driver. I have earlier used fglrx, with some better results (still happens, but not so often), but can't install it sucsessfully after upgrading to ubuntu 12.10. I know there is a similar question about this issue, but it's not answered. I hope someone can help me.

    Read the article

  • How to prevent thunderbird gmail/IMAP from marking deleted/archived emails as read

    - by Jesse
    I have thunderbird setup to use gmail IMAP. I followed the various guides that recommend setting Edit-Account Settings-Server Settings-When I delete a message-Remove it immediately. Unfortunately this didn't have quite the effect I wanted and after more digging I discovered here that: [Thunderbird] [Gmail] Mark Deleted = Archive Copy to [Gmail]/Trash = Delete Permanently Remove it immediately = Archive Unfortunately whenever I deleted (archived) a message it was also marked as read whether it had been or not. I didn't want this because I like to keep my inbox clean and archive anything that doesn't actually matter, such as funny emails, etc. and then go back and look through the archive later when I have time. What settings do I need to prevent messages from being marked read when I delete them? I'm using Thunderbird 17.0 on Ubuntu 12.04

    Read the article

  • locale: Reset lost settings

    - by Adam Matan
    Due to some strange reason, I've lost some of my locale settings. I've managed to restore most of them using sudo dpkg-reconfigure locales: perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). locale: Cannot set LC_MESSAGES to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory So I'm stuck with one missing value: $ locale locale: Cannot set LC_MESSAGES to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory LANG=en_US.UTF-8 LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL= Any idea how to restore them all? Thanks, Adam

    Read the article

< Previous Page | 79 80 81 82 83 84 85 86 87 88 89 90  | Next Page >