Search Results

Search found 5330 results on 214 pages for 'django auth'.

Page 76/214 | < Previous Page | 72 73 74 75 76 77 78 79 80 81 82 83  | Next Page >

  • Django - Weird behaviour of sessions variables with Apache

    - by Étienne Loks
    In a Menu class with Section children, each Section has an available attribute. This attribute is initialized during the instance creation. The process of getting the availability is not trivial, so I stock a Menu instance for each user in a session variable. With the Django embedded webserver this works well. But when I deploy the application on an Apache webserver I can observe a very weird behavior. Once authentified, a click on a link or a refreshment of the page and the availability of each Section seems to be forgotten (empty menu but in the log file I can see that all Sections are here) then a new refresh on the page the availability is back, a new refresh the menu disappears once again, etc. There is no cache activated on the web server. The menu is initialized in a context processor. def get_base_context(request): if 'MENU' not in request.session or \ not request.session['MENU'].childs or\ request.session['MENU'].user != request.user: _menu = Menu(request.user) _menu.init() request.session['MENU'] = _menu (...) I have no idea what could cause such a behavior. Any clue?

    Read the article

  • Adjacency List Tree Using Recursive WITH (Postgres 8.4) instead of Nested Set

    - by Koobz
    I'm looking for a Django tree library and doing my best to avoid Nested Sets (they're a nightmare to maintain). The cons of the adjacency list model have always been an inability to fetch descendants without resorting to multiple queries. The WITH clause in Postgres seems like a solid solution to this problem. Has anyone seen any performance reports regarding WITH vs. Nested Set? I assume the Nested set will still be faster but as long as they're in the same complexity class, I could swallow a 2x performance discrepancy. Django-Treebeard interests me. Does anyone know if they've implemented the WITH clause when running under Postgres? Has anyone here made the switch away from Nested Sets in light of the WITH clause?

    Read the article

  • How Can I Populate Default Form Data with a ManyToMany Field?

    - by b14ck
    Ok, I've been crawling google and Django documentation for over 2 hours now (as well as the IRC channel on freenode), and haven't been able to figure this one out. Basically, I have a model called Room, which is displayed below: class Room(models.Model): """ A `Partyline` room. Rooms on the `Partyline`s are like mini-chatrooms. Each room has a variable amount of `Caller`s, and usually a moderator of some sort. Each `Partyline` has many rooms, and it is common for `Caller`s to join multiple rooms over the duration of their call. """ LIVE = 0 PRIVATE = 1 ONE_ON_ONE = 2 UNCENSORED = 3 BULLETIN_BOARD = 4 CHILL = 5 PHONE_BOOTH = 6 TYPE_CHOICES = ( ('LR', 'Live Room'), ('PR', 'Private Room'), ('UR', 'Uncensored Room'), ) type = models.CharField('Room Type', max_length=2, choices=TYPE_CHOICES) number = models.IntegerField('Room Number') partyline = models.ForeignKey(Partyline) owner = models.ForeignKey(User, blank=True, null=True) bans = models.ManyToManyField(Caller, blank=True, null=True) def __unicode__(self): return "%s - %s %d" % (self.partyline.name, self.type, self.number) I've also got a forms.py which has the following ModelForm to represent my Room model: from django.forms import ModelForm from partyline_portal.rooms.models import Room class RoomForm(ModelForm): class Meta: model = Room I'm creating a view which allows administrators to edit a given Room object. Here's my view (so far): def edit_room(request, id=None): """ Edit various attributes of a specific `Room`. Room owners do not have access to this page. They cannot edit the attributes of the `Room`(s) that they control. """ room = get_object_or_404(Room, id=id) if not room.is_owner(request.user): return HttpResponseForbidden('Forbidden.') if is_user_type(request.user, ['admin']): form_type = RoomForm elif is_user_type(request.user, ['lm']): form_type = LineManagerEditRoomForm elif is_user_type(request.user, ['lo']): form_type = LineOwnerEditRoomForm if request.method == 'POST': form = form_type(request.POST, instance=room) if form.is_valid(): if 'owner' in form.cleaned_data: room.owner = form.cleaned_data['owner'] room.save() else: defaults = {'type': room.type, 'number': room.number, 'partyline': room.partyline.id} if room.owner: defaults['owner'] = room.owner.id if room.bans: defaults['bans'] = room.bans.all() ### this does not work properly! form = form_type(defaults, instance=room) variables = RequestContext(request, {'form': form, 'room': room}) return render_to_response('portal/rooms/edit.html', variables) Now, this view works fine when I view the page. It shows all of the form attributes, and all of the default values are filled in (when users do a GET)... EXCEPT for the default values for the ManyToMany field 'bans'. Basically, if an admins clicks on a Room object to edit, the page they go to will show all of the Rooms default values except for the 'bans'. No matter what I do, I can't find a way to get Django to display the currently 'banned users' for the Room object. Here is the line of code that needs to be changed (from the view): defaults = {'type': room.type, 'number': room.number, 'partyline': room.partyline.id} if room.owner: defaults['owner'] = room.owner.id if room.bans: defaults['bans'] = room.bans.all() ### this does not work properly! There must be some other syntax I have to use to specify the default value for the 'bans' field. I've really been pulling my hair out on this one, and would definitely appreciate some help. Thanks!

    Read the article

  • How do I mock a custom field that is deleted so that south migrations run?

    - by muhuk
    I have removed an app that contained a couple of custom fields from my project. Now when I try to run my migrations I get ImportError, naturally. These fields were very basic customizations like below: from django.db.models.fields import IntegerField class SomeField(IntegerField): def get_internal_type(self): return "SomeField" def db_type(self, connectio=None): return 'integer' def clean(self, value): # some custom cleanup pass So, none of them contain any database level customizations. When I removed this code, I've created migrations so the subsequent migration all ran fine. But when I try to run them on a pre-deletion database I realized my mistake. I can re-create a bare-bones app and make these imports work, but Ideally I would like to know if South has a mechanism to resolve these issues? Or is there any best practises? It would be cool if I could solve these issues just by modifying my migrations and not touching the codebase. (Django 1.3, South 0.7.3)

    Read the article

  • How to accept localized date format (e.g dd/mm/yy) in a DateField on an admin form ?

    - by tomjerry
    Is it possible to customize a django application to have accept localized date format (e.g dd/mm/yy) in a DateField on an admin form ? I have a model class : class MyModel(models.Model): date = models.DateField("Date") And associated admin class class MyModelAdmin(admin.ModelAdmin): pass On django administration interface, I would like to be able to input a date in following format : dd/mm/yyyy. However, the date field in the admin form expects yyyy-mm-dd. How can I customize things ? Nota bene : I have already specified my custom language code (fr-FR) in settings.py, but it seems to have no effect on this date input matter. Thanks in advance for your answer

    Read the article

  • how to get day name in datetime in python

    - by gadss
    how can I get the day name (such as : Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, and Sunday) in datetime in python?... here is my code in my handlers.py from django.utils.xmlutils import SimplerXMLGenerator from piston.handler import BaseHandler from booking.models import * from django.db.models import * from piston.utils import rc, require_mime, require_extended, validate import datetime class BookingHandler(BaseHandler): allowed_method = ('GET', 'POST', 'PUT', 'DELETE') fields = ('id', 'date_select', 'product_name', 'quantity', 'price','totalcost', 'first_name', 'last_name', 'contact', 'product') model = Booking def read(self, request, id, date_select): if not self.has_model(): return rc.NOT_IMPLEMENTED try: prod = Product.objects.get(id=id) prod_quantity = prod.quantity merge = [] checkDateExist = Booking.objects.filter(date_select=date_select) if checkDateExist.exists(): entered_date = Booking.objects.values('date_select').distinct('date_select').filter(date_select=date_select)[0]['date_select'] else: entered_date = datetime.datetime.strptime(date_select, '%Y-%m-%d') entered_date = entered_date.date() delta = datetime.timedelta(days=3) target_date = entered_date - delta day = 1 for x in range(0,7): delta = datetime.timedelta(days=x+day) new_date = target_date + delta maximumProdQuantity = prod.quantity quantityReserve = Booking.objects.filter(date_select=new_date, product=prod).aggregate(Sum('quantity'))['quantity__sum'] if quantityReserve == None: quantityReserve = 0 quantityAvailable = prod_quantity - quantityReserve data1 = {'maximum_guest': maximumProdQuantity, 'available': quantityAvailable, 'date': new_date} merge.append(data1) return merge except self.model.DoesNotExist: return rc.NOT_HERE in my code: this line sets the date: for x in range(0,7): delta = datetime.timedelta(days=x+day) new_date = target_date + delta

    Read the article

  • about the post_save signal and created argument

    - by panchicore
    the docs says: post_save django.db.models.signals.post_save created A boolean; True if a -new- record was create. and I have this: from django.db.models.signals import post_save def handle_new_user(sender, instance, created, **kwargs): print "--------> save() "+str(created) post_save.connect(handle_new_user, sender=User) when I do in shell: u = User(username="cat") u.save() >>> --------> save() True u.username = "dog" u.save() >>> --------> save() True I expect a -------- save() False when I save() the second time because is an update? not?

    Read the article

  • When a template is rendered in template tag code, MEDIA_URL is not in context

    - by culebrón
    I want to use a template for 2 template tags. In the template, I used {{ MEDIA_URL }} and discovered that MEDIA_URL is not in context as expected. Had to use get_config and pass it manually. Why is the setting not in context, how else can I put it there, or maybe there's a better way that a template tag? (include, etc?) from django.template import Library from apps.annoying.functions import get_config from django.template.loader import render_to_string register = Library() @register.simple_tag def next_in_gallery(photo, gallery): next = photo.get_next_in_gallery(gallery) return make_arrow('right', next) @register.simple_tag def previous_in_gallery(photo, gallery): prev = photo.get_previous_in_gallery(gallery) return make_arrow('left', prev) def make_arrow(direction, object): return render_to_string('myapp/arrow.html', {'direction': direction, 'object': object, 'MEDIA_URL': get_config('MEDIA_URL', '')})

    Read the article

  • How do I check for Existence of a Record in GAE

    - by VDev
    I am trying to create a simple view in Django & GAE, which will check if the user has a profile entity and prints a different message for each case. I have the program below, but somehow GAE always seem to return a object. My program is below import datetime from django.http import HttpResponse, HttpResponseRedirect from google.appengine.api import users from google.appengine.ext import db from models import Profile import logging #from accounts.views import profile # Create your views here. def login_view(request): user = users.get_current_user() profile = db.GqlQuery("SELECT * FROM Profile WHERE account = :1", users.get_current_user()) logging.info(profile) logging.info(user) if profile: return HttpResponse("Congratulations Your profile is already created.") else: return HttpResponse("Sorry Your profile is NOT created.") My model object is Profile defined as follows: class Profile(db.Model): first_name = db.StringProperty() last_name = db.StringProperty() gender = db.StringProperty(choices=set(["Male", "Female"])) account = db.UserProperty(required = True) friends = db.ListProperty(item_type=users.User) last_login = db.DateTimeProperty(required=True) Thanks for the help.

    Read the article

  • error in auth.log but can login; LDAP/PAM

    - by Peter
    I have a server running OpenLDAP. When I start a ssh-session I can log in without problems, but an error appears in the logs. This only happens when I log in with a LDAP account (so not with a system account such as root). Any help to eliminate these errors would be much appreciated. The relevant piece from /var/log/auth.log sshd[6235]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=example.com user=peter sshd[6235]: Accepted password for peter from 192.168.1.2 port 2441 ssh2 sshd[6235]: pam_unix(sshd:session): session opened for user peter by (uid=0) pam common-session session [default=1] pam_permit.so session required pam_unix.so session optional pam_ldap.so session required pam_mkhomedir.so skel=/etc/skel umask=0022 session required pam_limits.so session required pam_unix.so session optional pam_ldap.so pam common-auth auth [success=1 default=ignore] pam_ldap.so auth required pam_unix.so nullok_secure use_first_pass auth required pam_permit.so session required pam_mkhomedir.so skel=/etc/skel umask=0022 silent auth sufficient pam_unix.so nullok_secure use_first_pass auth requisite pam_succeed_if.so uid >= 1000 quiet auth sufficient pam_ldap.so use_first_pass auth required pam_deny.so pam common-account account [success=2 new_authtok_reqd=done default=ignore] pam_ldap.so account [success=1 default=ignore] pam_unix.so account required pam_unix.so account sufficient pam_succeed_if.so uid < 1000 quiet account [default=bad success=ok user_unknown=ignore] pam_ldap.so account required pam_permit.so account sufficient pam_ldap.so account sufficient pam_unix.so

    Read the article

  • Matching blank entries in django queryset for optional field with corresponding ones in a required

    - by gramware
    I have a django queryset in my views whose values I pack before passing to my template. There is a problem when the queryset returns none since associated values are not unpacked. the quersyet is called comments. Here is my views.py def forums(request ): post_list = list(forum.objects.filter(child='0')&forum.objects.filter(deleted='0').order_by('postDate')) user = UserProfile.objects.get(pk=request.session['_auth_user_id']) newpostform = PostForm(request.POST) deletepostform = PostDeleteForm(request.POST) DelPostFormSet = modelformset_factory(forum, exclude=('child','postSubject','postBody','postPoster','postDate','childParentId')) readform = ReadForumForm(request.POST) comments =list( forum.objects.filter(deleted='0').filter(child='1').order_by('childParentId').values('childParentId').annotate(y=Count('childParentId'))) if request.user.is_staff== True : staff = 1 else: staff = 0 staffis = 1 if newpostform.is_valid(): topic = request.POST['postSubject'] poster = request.POST['postPoster'] newpostform.save() return HttpResponseRedirect('/forums') else: newpostform = PostForm(initial = {'postPoster':user.id}) if request.GET: form = SearchForm(request.GET) if form.is_valid(): query = form.cleaned_data['query'] post_list = list((forum.objects.filter(child='0')&forum.objects.filter(deleted='0')&forum.objects.filter(Q(postSubject__icontains=query)|Q(postBody__icontains=query)|Q(postDate__icontains=query)))or(forum.objects.filter(deleted='0')&forum.objects.filter(Q(postSubject__icontains=query)|Q(postBody__icontains=query)|Q(postDate__icontains=query)).values('childParentId'))) if request.method == 'POST': delpostformset = DelPostFormSet(request.POST) if delpostformset.is_valid(): delpostformset.save() return HttpResponseRedirect('/forums') else: delpostformset = DelPostFormSet(queryset=forum.objects.filter(child='0', deleted='0')) """if readform.is_valid(): user=get_object_or_404(UserProfile.objects.all()) readform.save() else: readform = ReadForumForm()""" post= zip( post_list,comments, delpostformset.forms) paginator = Paginator(post, 10) # Show 10 contacts per page # Make sure page request is an int. If not, deliver first page. try: page = int(request.GET.get('page', '1')) except ValueError: page = 1 # If page request (9999) is out of range, deliver last page of results. try: post = paginator.page(page) except (EmptyPage, InvalidPage): post = paginator.page(paginator.num_pages) return render_to_response('forum.html', {'post':post, 'newpostform': newpostform,'delpost':delpostformset, 'username':user.username, 'comments':comments, 'user':user, },context_instance = RequestContext( request )) I realised that the issue was with the comments queryset comments =list( forum.objects.filter(deleted='0').filter(child='1').order_by('childParentId').values('childParentId').annotate(y=Count('childParentId'))) which will only returns values for posts that have comments. so i now need a way to return 0 comments when a value in post-list post_list = list(forum.objects.filter(child='0')&forum.objects.filter(deleted='0').order_by('postDate')) does not have any comments (optional field). Here is my models.py class forum(models.Model): postID = models.AutoField(primary_key=True) postSubject = models.CharField(max_length=100) postBody = models.TextField() postPoster = models.ForeignKey(UserProfile) postDate = models.DateTimeField(auto_now_add=True) child = models.BooleanField() childParentId = models.ForeignKey('self',blank=True, null=True) deleted = models.BooleanField() def __unicode__(self): return u' %d' % ( self.postID)

    Read the article

  • Django : presenting a form very different from the model and with multiple field values in a Django-

    - by sebpiq
    Hi ! I'm currently doing a firewall management application for Django, here's the (simplified) model : class Port(models.Model): number = models.PositiveIntegerField(primary_key=True) application = models.CharField(max_length=16, blank=True) class Rule(models.Model): port = models.ForeignKey(Port) ip_source = models.IPAddressField() ip_mask = models.IntegerField(validators=[MaxValueValidator(32)]) machine = models.ForeignKey("vmm.machine") What I would like to do, however, is to display to the user a form for entering rules, but with a very different organization than the model : Port 80 O Not open O Everywhere O Specific addresses : --------- delete field --------- delete field + add address field Port 443 ... etc Where Not open means that there is no rule for the given port, Everywhere means that there is only ONE rule (0.0.0.0/0) for the given port, and with specific addresses, you can add as many addresses as you want (I did this with JQuery), which will make as many rules. Now I did a version completely "handmade", meaning that I create the forms entirely in my templates, set input names with a prefix, and parse all the POSTed stuff in my view (which is quite painful, and means that there's no point in using a web framework). I also have a class which aggregates the rules together to easily pre-fill the forms with the informations "not open, everywhere, ...". I'm passing a list of those to the template, therefore it acts as an interface between my model and my "handmade" form : class MachinePort(object): def __init__(self, machine, port): self.machine = machine self.port = port @property def fully_open(self): for rule in self.port.rule_set.filter(machine=self.machine): if ipaddr.IPv4Network("%s/%s" % (rule.ip_source, rule.ip_mask)) == ipaddr.IPv4Network("0.0.0.0/0"): return True else : return False @property def partly_open(self): return bool(self.port.rule_set.filter(machine=self.machine)) and not self.fully_open @property def not_open(self): return not self.partly_open and not self.fully_open But all this is rather ugly ! Do anyone of you know if there is a classy way to do this ? In particular with the form... I don't know how to have a form that can have an undefined number of fields, neither how to transform these fields into Rule objects (because all the rule fields would have to be gathered from the form), neither how to save multiple objects... Well I could try to hack into the Form class, but seems like too much work for such a special case. Is there any nice feature I'm missing ?

    Read the article

  • Django: Grouping by Dates and Servers

    - by TheLizardKing
    So I am trying to emulate google app's status page: http://www.google.com/appsstatus#hl=en but for backups for our own servers. Instead of service names on the left it'll be server names but the dates and hopefully the pagination will be there too. My models look incredibly similar to this: from django.db import models STATUS_CHOICES = ( ('UN', 'Unknown'), ('NI', 'No Issue'), ('IS', 'Issue'), ('NR', 'Not Running'), ) class Server(models.Model): name = models.CharField(max_length=32) def __unicode__(self): return self.name class Backup(models.Model): server = models.ForeignKey(Server) created = models.DateField(auto_now_add=True) modified = models.DateTimeField(auto_now=True) status = models.CharField(max_length=2, choices=STATUS_CHOICES, default='UN') issue = models.TextField(blank=True) def __unicode__(self): return u'%s: %s' % (self.server, self.get_status_display()) My issue is that I am having a hell of a time displaying the information I need. Everyday a little after midnight a cron job will run and add a row for each server for that day, defaulting on status unknown (UN). My backups.html: {% extends "base.html" %} {% block content %} <table> <tr> <th>Name</th> {% for server in servers %} <th>{{ created }}</th> </tr> <tr> <td>{{ server.name }}</td> {% for backup in server.backup_set.all %} <td>{{ backup.get_status_display }}</td> {% endfor %} </tr> {% endfor %} </table> {% endblock content %} This actually works but I do not know how to get the dates to show. Obviously {{ created }} doesn't do anything but the servers don't have create dates. Backups do and because it's a cron job there should only be X number of rows with any particular date (depending on how many servers we are following for that day). Summary I want to create a table, X being server names, Y being dates starting at today while all the cells being the status of a backup. The above model and template should hopefully give you an idea what my thought process but I am willing to alter anything. Basically I am create a fancy excel spreadsheet.

    Read the article

  • 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

  • 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

  • How to prevent blocking http auth popups on firefox restart with many tabs open

    - by Glen S. Dalton
    I am using the latest firefox with tab mix plus and tabgoups manager. I have maybe 50 or 100 tabs oben in different tab groups. When I shutdown firefox and start it again all tabs and tab groups are perfectly rebuilt. But I have also many pages open that are behind a standard http auth, and these pages all request their usernames and passwords. So during startup firefox pops up all these pages' http auth windows. And they block everything else in firefox, they are like modal windows. (I am involved in website development and the beta versions are behind apache http auth.) I have to click many times the OK button in the popups, before I can do anything. All the usernames and passwords are already filled in. (And the firefox taskbar entry blinks and the firefox window heading also blinks, and focus switches back and foth, which also annoys me. And sometimes the popups do not react to my clicks, because firefox is maybe just switching focus somewhere else. This is the worst.) I want a plugin or some way to skip those popups. There are some plugins I tried some time ago, but they did not do what I need, because they require a mouse click for each login, which is no improvement over the situation like it already is. This is not about password storage (because firefox already stores them). But of course, if some password storing plugin could heal this it would be great.

    Read the article

  • Apache: redirect to https before AUTH for server-status

    - by Putnik
    I want to force https and basic auth for server-status output (mod_status). If I enable auth and user asks for http://site/server-status apache first asks for pass, then redirects to httpS, then asks for pass again. This question is similar to Apache - Redirect to https before AUTH and force https with apache before .htpasswd but I cannot get it work because we are speaking not about generic folder but Location structure. My config (shortly) is as follows: <Location /server-status> SSLRequireSSL <IfModule mod_rewrite.c> RewriteEngine on RewriteBase /server-status RewriteCond %{HTTPS} off RewriteCond %{SERVER_PORT} 80 RewriteRule ^ - [E=nossl] RewriteRule (.*) https://site/server-status} [R=301,L] </IfModule> SetHandler server-status Order deny,allow Deny from all Allow from localhost ip6-localhost Allow from 1.2.3.0/24 Allow from env=nossl AuthUserFile /etc/httpd/status-htpasswd AuthName "Password protected" AuthType Basic Require valid-user Satisfy any </Location> I assume Allow from env=nossl should allow everyone with RewriteCond %{HTTPS} off and server port 80, then force it to redirect but it does not work. Please note, I do not want force to SSL the whole site but /server-status only. If it matters the server has several sites. What am I doing wrong? Thank you.

    Read the article

  • Problem with Outlook 2010 (SMTP AUTH LOGIN)

    - by Filipe YaBa Polido
    **IGNORE THIS QUESTION - SOLVED WITH A PYTHON SCRIPT available at: http://yabahaus.blogspot.com I have to connect one customer Outlook 2010 to a remote server on which I have either no right, neither way to talk to the sysadmin. This is the thing, after installing and reviewing the logs on Wireshark: Outlook Express: HELO machine AUTH LOGIN username base64 encoded password base64 encoded mails go through. Outlook 2010: HELO machine AUTH DIGEST-MD5 response from server Outlook sends just a * AUTH LOGIN password base64 encoded So... I can send mails in the same domain, but can't send outside, it gives me a relay denied message. My point is... Why the h**l Outlook 2010 doesn't send the username AND the password?! It can never login the right way :| With other versions of Outlook it works fine, and with OE works great, it auths and allows to send mail to a different domain. I've googled and nothing worked. I'm pretty sure that I'm not alone with this one. My last resort will be to configure a local proxy/server that relays to the original one :| Any help would be appreciated. Sorry my bad english as is not my natural language. Thanks.

    Read the article

  • Problem with Outlook 2010 (SMTP AUTH LOGIN)

    - by Filipe YaBa Polido
    I have to connect one customer Outlook 2010 to a remote server on which I have either no right, neither way to talk to the sysadmin. This is the thing, after installing and reviewing the logs on Wireshark: Outlook Express: HELO machine AUTH LOGIN username base64 encoded password base64 encoded mails go through. Outlook 2010: HELO machine AUTH DIGEST-MD5 response from server Outlook sends just a * AUTH LOGIN password base64 encoded So... I can send mails in the same domain, but can't send outside, it gives me a relay denied message. My point is... Why the h**l Outlook 2010 doesn't send the username AND the password?! It can never login the right way :| With other versions of Outlook it works fine, and with OE works great, it auths and allows to send mail to a different domain. I've googled and nothing worked. I'm pretty sure that I'm not alone with this one. My last resort will be to configure a local proxy/server that relays to the original one :| Any help would be appreciated. Sorry my bad english as is not my natural language. Thanks.

    Read the article

  • Finding the current user authenticated by basic auth (Apache)

    - by jtd
    When you log in through a basic auth page, is the username you authenticated as stored anywhere (on the server or client machine), maybe in an environment variable? Background: I have a common web administration page for an e-mail server and I'd like to know who is doing what. When a user successfully logs in via basic auth, I somehow want to be able to identify them and log their actions. So each time a request is submitted, I can write to a log file. The basic format would be: $username ran a $function against $useraccount so if a user changed someone's permissions, eg: Admin-Bob ran a permission change against User-Scott So if errors occur, I can easily trace back in the log file what actions lead to the cause. I tried checking the %ENV hash to no avail, any Ideas? I don't really want to get into PHP-like sessions, because that would mean scrapping my basic auth, which gives me a fine degree of control already. If I have to code something with sessions, I'd need to implement a system to block users after maximum tries and so on, which I don't really want to code. I think this is better geared towards serverfault because it pertains to Apache moreso than the programming language. Sessions can be done in a myriad of languages.

    Read the article

  • SVN very slow over HTTP (seems auth related)

    - by Sydius
    I'm using SVN version 1.6.6 (r40053) via the command-line in Ubuntu 10.04 and connecting to a remote repository over HTTP that is in the local network. For a while, it worked fine, but has recently become very slow for any operation that requires communication with the repository, however it does eventually work after several minutes (~3m for svn up). Looking at Wireshark, it appears to be taking a full minute between the HTTP auth denied and the subsequent request containing credentials. The issue is local to my machine because other coworkers running Ubuntu are not having the issue and I've tried using my credentials from another machine and it was very fast. I tried deleting the .subversion folder in my home directory and checking everything out fresh, but it didn't help. Update: I think it's auth related. When I check out SVN repositories off of the Internet over HTTP (from Google Code, for example), everything is very fast until I do something that requires a password. Before prompting for the password for the first time, it stalls for at least a minute. Update 2: I set the neon-debug-mask in the SVN settings (in /etc/subversion/servers under [Global]) to 138 and it seems to spending a lot of time on 'auth: Trying Basic challenge...'

    Read the article

  • What causes the Openid error: Received "invalidate_handle" from server

    - by BryanWheelock
    I'm new to openid, and I am getting an "invalidate_handle" and I have no idea what to do to fix it. I'm using django_authopenid [Thu Apr 29 14:13:28 2010] [error] Generated checkid_setup request to https://www.google.com/accounts/o8/ud with assocication AOxxxxxxxxOX5-V9oDc3-btHhFxzAcccccccccc2RTHgh [Thu Apr 29 14:13:29 2010] [error] Error attempting to use stored discovery information: <openid.consumer.consumer.TypeURIMismatch: Required type http://specs.openid.net/auth/2.0/signon not found in ['http://specs.openid.net/auth/2.0/server', 'http://openid.net/srv/ax/1.0', 'http://specs.openid.net/extensions/ui/1.0/mode/popup', 'http://specs.openid.net/extensions/ui/1.0/icon', 'http://specs.openid.net/extensions/pape/1.0'] for endpoint <openid.consumer.discover.OpenIDServiceEndpoint server_url='https://www.google.com/accounts/o8/ud' claimed_id=None local_id=None canonicalID=None used_yadis=True >> [Thu Apr 29 14:13:29 2010] [error] Attempting discovery to verify endpoint [Thu Apr 29 14:13:29 2010] [error] Performing discovery on https://www.google.com/accounts/o8/id?id=AOxxxxxxxxOX5-V9oDc3-btHhFxzAcccccccccc2RTHgh [Thu Apr 29 14:13:29 2010] [error] Received id_res response from https://www.google.com/accounts/o8/ud using association AOxxxxxxxxOX5-V9oDc3-btHhFxzAcccccccccc2RTHgh [Thu Apr 29 14:13:29 2010] [error] Using OpenID check_authentication [Thu Apr 29 14:13:29 2010] [error] op_endpoint [Thu Apr 29 14:13:29 2010] [error] claimed_id [Thu Apr 29 14:13:29 2010] [error] identity [Thu Apr 29 14:13:29 2010] [error] return_to [Thu Apr 29 14:13:29 2010] [error] response_nonce [Thu Apr 29 14:13:29 2010] [error] assoc_handle [Thu Apr 29 14:13:29 2010] [error] Received "invalidate_handle" from server https://www.google.com/accounts/o8/ud

    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

< Previous Page | 72 73 74 75 76 77 78 79 80 81 82 83  | Next Page >