Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
Django-select2 HeavySelect2MultipleWidget -> Dynamic Choices
What is the correct way to use HeavySelect2MultipleWidget with Dynamic choices ?? I am using Django-select2 HeavySelect2MultipleWidget to fetch and select data by using ajax search from table... I referred Django-select2 documentation and testapp in their github repo, their documentation is not much helpful but in their testapp, they have very basic example. they are feeding choices from custom static list, which is not from database and also not dynamic. it loads everything to choices. if I use combination of ModelMultipleChoiceField and HeavySelect2MultipleWidget and if I pass queryset of respective model then it loads entire table in choices... which I dont want... my existing code looks like this: class CustReqForm(forms.Form): customer = forms.ModelMultipleChoiceField(widget=HeavySelect2MultipleWidget(data_view='customer_search',), queryset=Customer.objects.filter(channel='34342').all() ) I have a huge data in my table. though I filtered in my query, still it loads 100K unique records... Please advice the right method to implement this... -
Django overriden model save method returning old data
I may be tired and I'm not seeing something, but I've tried too much. class Pizza(models.Model): portion_size = models.ForeignKey('PortionSize', on_delete=models.PROTECT) pizza_type = models.ForeignKey('PizzaType', on_delete=models.PROTECT) toppings = models.ManyToManyField('Topping', blank=True) special = models.BooleanField() price = models.DecimalField( max_digits=4, decimal_places=2, editable=False, default=0 ) def calculate_price(self, topping_amount): print(self.toppings.count()) topping_amount = self.toppings.count() base_pizza = PizzaBase.objects.get( portion_size=self.portion_size, pizza_type=self.pizza_type, special=self.special, topping_amount=topping_amount ) self.price = base_pizza.price def save(self, *args, **kwargs): super().save(*args, **kwargs) self.calculate_price() This is model I've defined for Django and I'm trying to set the the price of the pizza that is being created when the user saves form, but every time the code is run, the toppings.count value is always behind. For instance, if I pick three toppings, and before saving the form in the admin panel there were only two toppings selected, I'd get the calculated price for two toppings. I've tried changing the order of the save method but it didn't change anything. I've also used the shell to check if there was a problem, but while in Django shell everything was fine with the toppings count. I've also check the admin interface, refreshed it multiple times, cleared cache and everything seemed fine there too. I've started Signals to solve this. Creating a receiver for … -
Django how to print out a list in html page
I have a list of data that looks like this [['mvpd', 'asdf, wefef', 'Optimum'], ['app_name', 'd', 'austin.com']] In my template I have a table that I want to put everything in. <table class="table table-hover"> <thead> <tr> <th scope="col">Property</th> <th scope="col">Expected Value</th> <th scope="col">Actual Value</th> </tr> </thead> <tbody> <tr> <th scope="row">1</th> <td>Mark</td> <td>Otto</td> </tr> <tr> <th scope="row">2</th> <td>Jacob</td> <td>Thornton</td> </tr> <tr> <th scope="row">3</th> <td colspan="2">Larry the Bird</td> </tr> </tbody> </table> However I am not sure how to grab the first list in the list and print them out in each row. Or will I need to send a different data structure to my template? -
cant get image to display Angular, GET 404 (Not Found)
Angular8. I am trying to display images that I previously saved using Angular/Django. I upload the images to the src/assets/images/images_are_here folder. I get the error GET http://127.0.0.1:8000/media/images/photo1_7x0DKZh.png 404 (Not Found). I have tried several different variations: <img [src]="recipe.photo"> and i tried creating a variable path that I then inserted <img [src]="path", tried brackets, no brackets around src. If I directly put in the path however this works <img src="assets/images/ryanphoto1_7x0DKZh.png"> When I save the image it uploads it to the correct place in the asset folder which is src/assets/images/ but when it displays the image filepath (in the browser) it shows http://127.0.0.1:8000/media/images/ which is correct because thats how my Django is set up: settings.py MEDIA_ROOT = '/Users///frontend2/src/assets' MEDIA_URL = '/media/' I think it has something to do with angular running on http://localhost:4200/ and django running on http://127.0.0.1:8000?? -
How can a post have an author on django?
I have been trying to make a post have the username of the creator on it but when I run the code, whenever I change profile, the username that is on the post changes. It seems That something on the models.py file is not correct. Views.py def home(request): created_posts = Create.objects.all().order_by("-added_date") return render(request, 'base.html', {"created_posts": created_posts}) def create(request): if request.method == 'POST': created_date = timezone.now() header1 = request.POST['header'] content1 = request.POST['content'] created_obj = Create.objects.create(added_date=created_date, title=header1, content=content1) created_obj.save() print('create created') return redirect('home') else: print('create not created') return render(request, 'create.html') Models.py class Create(models.Model): added_date = models.DateTimeField() title = models.CharField(max_length=200) content = models.CharField(max_length=200) create.html (creates the post) {% extends 'home.html' %} {% block body %} <div style="margin-top: 200px; margin-left:200px;"> <form action="create" method="POST"> {% csrf_token %} <input type="text" name="header" placeholder="Add here..."> <input type="text" name="content" placeholder="Add here..."> <button type="submit"name="action" class="btn btn-primary mb-2">submit</button> </form> </div> {% endblock %} base.html (shows the created posts in lists) {% extends 'home.html' %} {% block body %} <ul action="{% url 'create' %}" class="container-sm list-group" style="margin-top: 200px;"> {% for created_post in created_posts %} <li class="list-group-item">{{ created_post.title }} <p>{{ user.username }}</p> <p>{{ created_post.content }}</p> <div class="float-right"> <form action="delete_create/{{ created_post.id }}/" action="post"> <button type="submit" class="btn btn-outline-danger btn-sm">Delete</button> </form> </div> <div class="float-right"> <a href="{% … -
Assign Change Function To Django Formset Fields
I have the following function: <script> $("#id_form-0-ProductCode").change(function() { var pId = $("#id_form-0-ProductCode").val(); console.log(pId) $.ajax({ url: "/ajax/product", data : {'product': pId}, success: function(data) { $("#id_form-0-DescriptionOfGoods").val(data.DescriptionOfGoods) $("#id_form-0-Type").val(data.UnitType) $("#id_form-0-Price").val(data.Price) } }); }); </script> This is working perfectly fine - but the problem is that I'm offering the user the ability to add additional forms to the formset dynamically. So when they click the 'Add' button they get a new form. In that case, I would need the same function to apply to that form as well, but all of the ids would change so that the function would effectively look like: <script> $("#id_form-1-ProductCode").change(function() { var pId = $("#id_form-1-ProductCode").val(); console.log(pId) $.ajax({ url: "/ajax/product", data : {'product': pId}, success: function(data) { $("#id_form-1-DescriptionOfGoods").val(data.DescriptionOfGoods) $("#id_form-1-Type").val(data.UnitType) $("#id_form-1-Price").val(data.Price) } }); }); </script> Could anyone recommend the smartest way to implement this kind of thing? I don't want to write the function out many times A) because that's cumbersome and B) because that would create an upper limit to how many forms within the formset this would work for. -
Django Queryset Occurences Counts
I have the following django model... class Entry(models.Model): entry_UUID = models.UUIDField() entry_description = models.TextField() numeric_value = models.FloatField(null=True, blank=True) entry_category = models.CharField() I am trying to query the database - I expect groups of entry_UUIDs and for each group some statistics for numeric_value (Min/Max/Avg) and counts for entry_category. I won't know the specific values for entry_category ahead, but I expect them to form a set (ex. {low, med, high}). I have tried the following query: Entry.objects.filter( entry_UUID__in = entry_UUIDs).values( 'entry_UUID').annotate( Avg('numeric_value'), Min('numeric_value'), Max('numeric_value'), Count('entry_category')) Which returns... <QuerySet [{'entry_UUID': UUID('9fcfea6d-9480-595f-1e1f-81130ddc0c99'), 'numeric_value__avg': 51.5089, 'numeric_value__min': 23.174, 'numeric_value__max': 76.421, 'entry_category__count': 4}, {'entry_UUID': UUID('9fcfea6d-9490-595f-1e1f-81130ddc0c99'), 'numeric_value__avg': 5.2882, 'numeric_value__min': 1.282, 'numeric_value__max': 9.7553, 'entry_category__count': 6}]> For entry_category I am looking to get counts of occurences for each value rather that a total count. Not sure how to got about this. Thanks. -
How do I configure my Apache VirtualHost to only pass certain paths to my Django application?
I'm using Apache 2 on Linux 18.04 with Python 3.6. I have the following virtual host set up ... <VirtualHost *:80> # The ServerName directive sets the request scheme, hostname and port that # the server uses to identify itself. This is used when creating # redirection URLs. In the context of virtual hosts, the ServerName # specifies what hostname must appear in the request's Host: header to # match this virtual host. For the default virtual host (this file) this # value is not decisive as it is used as a last resort host regardless. # However, you must set it for any further virtual host explicitly. ServerName lab.chicommons.com ServerAdmin webmaster@localhost DocumentRoot /var/www/html/web # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, # error, crit, alert, emerg. # It is also possible to configure the loglevel for particular # modules, e.g. LogLevel info ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined #Alias /static /srv/rdmo/rdmo-app/static_root/ #<Directory /srv/rdmo/rdmo-app/static_root/> # Require all granted #</Directory> # For most configuration files from conf-available/, which are # enabled or disabled at a global level, it is possible to # include a line for only one particular virtual host. For example the # following line enables the CGI … -
Having trouble using js_link to add dropdown selector in Bokeh
I'm trying to implement widgets into my Bokeh diagrams. The first I would like is a drop down menu allowing the selection of other option strategies. I can't seem to figure out the js_link function in order to have the selection make a change on the graph. I fear I may have set up the diagram wrong. Any help is greatly appreciated. from bokeh.plotting import figure, output_file, show from bokeh.models import ColumnDataSource, Div, Select, Slider, TextInput,CustomJSTransform from bokeh.io import curdoc from bokeh.transform import transform from bokeh.layouts import gridplot, column import matplotlib import matplotlib.pyplot as plt import numpy as np strike1 = 20 #Long Call strike2 = 33 #Short Call strike3 = 30 #Long Put strike4 = 60 #Short Put premium1 = 0.5 premium2 = 1.6 premium3 = 2.1 premium4 = 1.5 price = np.arange(15,25,0.01) contracts = 1 symbol = 'TSLA' option = ['Long Call', 'Long Put', 'Short Call', 'Short Put', 'Bull Call Spread', 'Bear Put Spread', 'Straddle', 'Butterfly Spread', 'Box Spread', 'Iron Condor'] def long_call(price, strike1, premium1, contracts): P = [] for i in price: P.append((max(i - strike1, 0) - premium1) * (contracts * 100)) return np.array(P) def long_put(price, strike1, premium1, contracts): P = [] for i in price: P.append((max(strike1 … -
Django's FILE_UPLOAD_PERMISSIONS not working for directories
I'm trying to use Django's FILE_UPLOAD_PERMISSIONS to set permissions when a user uploads a file. The file itself is created with the correct permissions (775), but any directories created seem to be stuck with the default (755). Example: If a file (foo.jpg) is uploaded for a user (id = 123), it should save to media/123/foo.jpg, creating the 123 directory if it does not already exist. foo.jpg has 775 but 123 has 755. How can I get directories saving with the correct permissions? I am using Apache with mod_wsgi in a httpd Docker container if it is relevant. -
API gives 200 Success but object does not change Python
I'm calling this api to cancel an order in my app. After I call the api, I get a success message, but, nothing changes. Here is the code I'm using: API @csrf_exempt def customer_reset_order(request): customer = get_user(request) if not customer: return JsonResponse({'invalid token'}) order = Order.objects.filter( id=request.POST["order_id"], status=Order.READY ) order.status = Order.CANCELED order.save() return JsonResponse({"status": "reset"}) Why can I call the api but, see no change? -
Getting the id of a model from a button in Django
I currently have a template set up so that it loops through all of my menu items with a button that correspond to a post request in my views.py <td> {% for menu_items in menu %} {{ menu_items.Menu_name }} {% endfor %} </td> <td> {% for menu_desc in menu %} {{ menu_desc.Menu_Desc }} {% endfor %} </td> <form method="post"> {% csrf_token %} <th><input class="btn btn-success" type="submit" value="Add To Cart" name="add">. </th> </form> In my views file I have a if statement that tries to get the id of the model that was clicked. However, i'm only able to get the Query Set and not the specific ID of the model. def ordering(request): latest_order = Order.objects.all() menu = Menu.objects.all() if 'add' in request.POST: user_order = Order.objects.get(name='') print(menu.id) return render(request, 'users/ordering.html', {'title':'Ordering', 'latest_order': latest_order, 'menu':menu}) -
Django: CSRF verification fail despite token being provided
I get 403 error due to csrf_token verification failure in spite of token explicit declaration in an ajax call. I for my data dictionary in the same manner in other functions and it works just great. Here is JS: $(document).on("click", ".update-cleaning", function(event){ event.preventDefault(); var input_field_name = $(this).attr('name') var obj_id = $(this).attr('value') var model_name = $(this).attr('data-model') var field_name = $(this).attr('data-field') var value = $("#" + input_field_name + obj_id).val(); if (!value) { alert('Fill the field!') } else { $.ajax({ url: "{% url 'ajax_update_cleaning' %}", type: "POST", data: {'object_id': obj_id, 'model_name': model_name, 'field_name': field_name, 'value': value, 'csrfmiddlewaretoken': '{{ csrf_token }}'}, dataType: 'json', }) .done(function(response){ console.log(response); }) } }); My html form is in a popover which is toggled by a click on <td> and looks like this: <td class="text-md-center with-popover" name="frequency" value="{{cleaning.id}}"> {{ cleaning.frequency }} <div id="frequency{{cleaning.id}}" style="display: none"> <form method="POST"> <label for="cleaning_frequency">Frequency: </label> <input id="cleaning_frequency{{cleaning.id}}" type="number" name="cleaning" value="{{cleaning.frequency}}"> <button type="submit" class="btn btn-success btn-sm update-cleaning" name="cleaning_frequency" data-model="Cleaning" data-field="frequency" value="{{cleaning.id}}"> Change </button> </form> </div> </td> Could you give me some ideas? Thank you. -
Filtering Blogs Posts in Django based on Admin Approved Posts
I have made a blog as a project and I have set users to submit posts for the blog directly but I want to direct this post to the admin first for approval before showing on the website. I have added a field to Post model, 'admin_approved = models.BooleanField(default=False)'. I also filtered by Post.objects.filter(admin_approved=True), but still nothing happens and posts are published class PostListView(ListView): model = Post template_name = "score.html" ordering = ['-date_posted'] context_object_name = 'posts' def score(request): context = { 'posts': Post.objects.filter(admin_approved=True) } return render(request, "score.html", context) class PostDetailView(DetailView): model = Post template_name = "post_detail.html" class PostCreateView(LoginRequiredMixin, CreateView): model = Post fields = ['caption', 'design'] template_name = "post_form.html" success_url = '/score' def form_valid(self, form): form.instance.author = self.request.user return super().form_valid(form) Here is the model: class Post(models.Model): author = models.ForeignKey(User, on_delete=models.CASCADE) design = models.ImageField( blank=False, null=True, upload_to='new designs') caption = models.TextField(max_length=100) date_posted = models.DateTimeField(default=timezone.now) admin_approved = models.BooleanField(default=False) def __str__(self): return self.caption def get_absolute_url(self): return reverse("core:post-detail", kwargs={"pk": self.pk}) Am I missing a step or is there something I should do? -
Show the authenticated user who is "online" (logged in) in Django
this is my first question here in stackoverflow, i apologize for any mistakes or bad explanation about my problem. (English is not my native language) I recently started studying web development using Django as framework, and i'm kinda lost in some topics, i'm working on a website, that have some options: Register a new user, and log in. When the user is successfully authenticated, he can acess the "profile" page, that is allowed only for authenticated users. In this page, i'm trying to implement a "webchat", like a group of WhatsApp, so the users can send messages, and the other users can see it and reply, and etc... But right know, i'm trying right to implement a list of "who is online" in this profile page to start this whole thing. The idea is simple, whatever person is logged in, it need to be shown in some list in the HTML, i'll send the code to demonstrate the idea. My views.py def sign_in(request): context = {} user = request.user if user.is_authenticated: return redirect("/profile") if request.POST: form = AccountAuthenticationForm(request.POST) if form.is_valid(): email = request.POST['email'] raw_password = request.POST['password'] user = authenticate(email=email, password=raw_password) if user: login(request, user) return redirect("/profile") else: form = AccountAuthenticationForm() … -
Djnago annotate if id is in subquery
I have employers = Employers.objects.all() employers_hired = employers.filter(person__in=get_valid_people()).distinct('id') employers_never_hired_anyone = Employers.objects.exclude(id__in=employers) employers.annotate(never_hired=Exists(employers_never_hired_anyone)) however my never_hired flag does not work as I intended. What am I missing? -
expected an element of ColumnData(String, Seq(Any))
im trying to print a data visualization using bokeh and django, the data that i want to print is int and string, but i got this error, i tried changing the data to string but i still cant get it to work, the data is being outputed from sqlite using filtering in django, here is what i already do views.py def datvis(request, id): usrn = request.user.username fruits = t_nilai.objects.filter(nama=usrn).values('nama_mapel')[0]; counts = t_nilai.objects.filter(nama=usrn).values('nilai')[0]; source = ColumnDataSource(data=dict(fruits=fruits, counts=counts)) p = figure(x_range=fruits, plot_height=350, toolbar_location=None, title="Fruit Counts") p.vbar(x='fruits', top='counts', width=0.9, source=source, legend_field="fruits", line_color='white', fill_color=factor_cmap('fruits', palette=Spectral6, factors=fruits)) p.xgrid.grid_line_color = None p.y_range.start = 0 p.y_range.end = 9 p.legend.orientation = "horizontal" p.legend.location = "top_center" script, div = components(p) return render(None, 'grader/dataVisualisasi.html', {'script' : script, 'div' : div} ) urls.py url(r'^dataVisualisasi(?P<id>\d+)$', datvis, name='datavis') the html file <html> <head> <link href="http://cdn.pydata.org/bokeh/release/bokeh-2.0.2.min.css" rel=”stylesheet” type=”text/css"> <link href="http://cdn.pydata.org/bokeh/release/bokeh-widgets-2.0.2.min.css" rel=”stylesheet” type=”text/css”> <script src="http://cdn.pydata.org/bokeh/release/bokeh-2.0.2.min.js"></script> <script src="http://cdn.pydata.org/bokeh/release/bokeh-widgets-2.0.2.min.js"></script> {{ script | safe }} <title>Data visualisasi</title> </head> <body> {{ div | safe}} </body> </html> -
Django code changes not reflected without restart
I used python manage.py runserver to start the django server locally. I noticed the change of HTML code is not reflected if I don't re-start the server. Is it normal? Is it possible to see the change without restarting the server? -
Object word is assign to models automatically in Django
How object word is added automatically? It makes difficulty in choosing. How to set different words to it? -
How to get the first child from a recursive relationship
I've been using def get_all_children(self, include_self=True): r = [] if include_self: r.append(self) for c in Cateogory.objects.filter(parent=self): _r = c.get_all_children(include_self=True) if 0 < len(_r): r.extend(_r) return r to get all the children of an object, however it returns all the children of its children as well. How can I can only the first, direct children? -
Django not rendering a template with a raw query
I'm trying to render a custom template with a custom SQL statement with the following code: def get_pms(): with connection.cursor() as cursor: cursor.execute('SELECT p.Id, f.Id, p.description as ProjectName, f.xPMNumber as xNumber from ' 'project_project p LEFT OUTER JOIN xpm_xpm f ON f.ProjectID = p.Id') result = cursor.fetchall() return result and I also tried with this one, which basically does the same thing, except this one is not raw: result = list(Project.objects.values(ProjectName=F('description'), xNumber=F('p_set__xPMNumber'))) Views.py class ListProjectsView(LoginRequiredMixin, ListView): #xpms = Project.objects.values(ProjectName=F('description'), xNumber=F('p_set__xPMNumber')) xpms = get_pms() template_name = 'project/feed.html' model = Project context_object_name = 'xpms' I commented out one variable here to test out if it worked This is the template where I'm trying to render {% extends "base.html" %} {% load bootstrap4 %} {% block head_content %} <title>Projects</title> {% endblock %} {% block container %} <div class="container"> <div class = "list-group"> {% for i in xpms %} <a href=""class="list-group-item list-group-item-action"> <p>{{ i.description }} </p> <p>{{ i.xPMNumber }}</p> </a> {% endfor %} </div> <div class="float-right mt-4"> <a class="btn btn-primary" href="{% url "project:create" %}" role="button">Create a new project</a> </div> </div> {% endblock %} It renders the project name with i.description but it doesn't render the xPMNumber I don't know if I'm accessing wrong into … -
Django REST: Why use LOGIN when you can AUTHENTICATE?
I'm wondering, why use Login when you have an Authentication Token? I mean I'm using Postman to test my urls, serializers and views. I can log in and I have to use a different urls to get my access token and my refresh token. Login: POSThttp://localhost:8000/login/ { "username":"Max", "password":"Yolo1234" } ----- { "id": 2, "username": "Max", "is_a": true, "is_e": false } Token: POSThttp://localhost:8000/api/token/ { "username":"Max", "password":"Yolo1234" } ----- { "refresh": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaCIsImV4cCI6MTU4Nzc1OTQ5NCwianRpIjoiOWUzNjg1OTZhZWViNDRiNWE2Nzg3Y2E0ZDhkODQ5OWQiLCJ1c2VyX2lkIjoyfQ.W9a2fCxUF9Hrf51l-Ecx7nt2tmt2QvLhr4pp2DBUuvE", "access": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNTg3NjgwMjk0LCJqdGkiOiIwNDI3MmJhMjljNmM0ODk3ODg4YTI5YTBkZjViZDljZCIsInVzZXJfaWQiOjJ9.0sid4rSbDUX3LHX7X74Cw1H9_lSlwD5ppfC3ctLGFSo" } And when I'm trying to POST an article, I need to authenticate with my access token. But when I log out, I can still POST an article by using my access token without being logged in. So I have some difficulty understanding the need to have the two in the project. Thanks for your answers! -
Djnago, is it possible to create hierarchical status choice with a model?
I would to create a form that give the possiblity to the users to select a choice from a multiple choices and based on your choice can select the second form. The latter changes based on the first choice. The structure of my dataset is the following: -ProductA: -->sub_product_a_1 -->sub_product_a_2 -->sub_product_a_3 -ProductB: -->sub_product_b_1 -->sub_product_b_2 -->sub_product_b_3 So if the client choose in the first box form Product A, in the second box can choose only sub_product_a_1, sub_product_a_2 sub_product_a_3. Finally I have the necessity to create this hierarchical status choice with models, to give the possibility to the user to customize the list. I only just managed to create the first level of choice (Product A and Product B), but I haven't been able to create the second level of hierarchy in the same form. I attached below my code: models.py class Product(models.Model): slug = models.SlugField() product_category = models.CharField() class Inventory(models.Model): category= models.ForeignKey(Product, blank=False, on_delete=models.CASCADE) -
How to debug Django Project inside Docker Compose project (Cannot retrieve debug connection: Debug mode is not supported for...)
I've installed a docker-compose project and I am running it from IntelliJ. docker-compose django project database project nginx project I achieved to run it succesfully, and I already can deploy from IntelliJ IDE. I configured a setting for debugging with docker-compose as in the following image. When I click the debug icon to start debugging, I am getting the following error: Deploying 'Compose: docker'... /usr/local/bin/docker-compose -f /home/someone/project/docker-compose.yml up -d django db nginx pr_django_1 is up-to-date pr_db_1 is up-to-date pr_nginx_1 is up-to-date 'Compose: docker' has been deployed successfully. Cannot retrieve debug connection: Debug mode is not supported for 'Docker-compose: docker' I can't find what I missed to configure it, the django webpage and whole project is visualized good, I just can't start debugging. -
How to customize django-rosetta admn page
Since when I open django-rosetta on the admin page by setting ROSETTA_SHOW_AT_ADMIN_PANEL = True in the settings file. I am able to open it on the admin page, but when it opens it takes full-page, and I am unable to go back to the homepage(as there is no button) except when I press the back button of the browser. Is there any solution for this, or do I have to override the rosetta home page?