Re: raise SuspiciousFileOperation("Could not derive file name from '%s'" % name) on Running collectstatic command
Please my reply below The error SuspiciousFileOperation: Could not derive file name from '' indicates that a file operation is being attempted without a valid file name. This can occur if a file is being saved or uploaded with an empty or invalid name. Regards, Amitesh On Tuesday, 23 July, 2024 at 08:59:59 pm IST, Maadis Ie wrote: Hi, I am trying to deploy my first Django app (5.0.7). When I run 'python mange.py collectstatic' it copies some of the admin and css files and exit with the following error message: "python manage.py collectstatic You have requested to collect static files at the destination location as specified in your settings: /webapps/dsite/dcork.ie/dproject/staticfiles This will overwrite existing files! Are you sure you want to do this? Type 'yes' to continue, or 'no' to cancel: yes Traceback (most recent call last): File "/webapps/dsite/dcork.ie/dproject/manage.py", line 22, in main() File "/webapps/dsite/dcork.ie/dproject/manage.py", line 18, in main execute_from_command_line(sys.argv) File "/webapps/dsite/dcork.ie/virt/lib/python3.12/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line utility.execute() File "/webapps/dsite/dcork.ie/virt/lib/python3.12/site-packages/django/core/management/__init__.py", line 436, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/webapps/dsite/dcork.ie/virt/lib/python3.12/site-packages/django/core/management/base.py", line 413, in run_from_argv self.execute(*args, **cmd_options) File "/webapps/dsite/dcork.ie/virt/lib/python3.12/site-packages/django/core/management/base.py", line 459, in execute output = self.handle(*args, **options) ^ File "/webapps/dsite/dcork.ie/virt/lib/python3.12/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 209, in handle collected = self.collect() ^^ File "/webapps/dsite/dcork.ie/virt/lib/python3.12/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 135, in collect handler(path, prefixed_path, storage) File "/webapps/dsite/dcork.ie/virt/lib/python3.12/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 378, in copy_file self.storage.save(prefixed_path, source_file) File "/webapps/dsite/dcork.ie/virt/lib/python3.12/site-packages/django/core/files/storage/base.py", line 44, in save name = self.get_available_name(name, max_length=max_length) File "/webapps/dsite/dcork.ie/virt/lib/python3.12/site-packages/django/core/files/storage/base.py", line 82, in get_available_name validate_file_name(file_name) File "/webapps/dsite/dcork.ie/virt/lib/python3.12/site-packages/django/core/files/utils.py", line 10, in validate_file_name raise SuspiciousFileOperation("Could not derive file name from '%s'" % name) django.core.exceptions.SuspiciousFileOperation: Could not derive file name from '' Has anybody entered this error? I am getting this error both on Nginx alone and Whitenoise. It copies some files in the destination directory before this error. Any pointers would be highly appreciated. Thanks, -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/65c45fc1-2bb8-4175-a796-05223023f28fn%40googlegroups.com. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/829620852.2939501.1721806067201%40mail.yahoo.com.
Contract Full Stack Django Engineer
About Project: I am bootstrapping a data-heavy AI-enabled system tailored for early adopters and looking for a seasoned Django Python Engineer with a strong background in full-stack software development to collaborate with. You will lead development efforts starting with: 1. Passwordless authentication using JWT 2. Onboarding app that’s dependent on Plaid and Stripe APIs 3. Company profile app 4. Proprietary app 1 and 2 Key Responsibilities: - Develop and maintain complex web applications using Django and Python. - Design and implement APIs, ensuring high performance and responsiveness. - Utilize JWT for secure authentication and authorization processes. - Employ Continuous Integration and Continuous Deployment (CI/CD) pipelines using tools such as Git and GitAction. - Design, develop, and optimize PostgreSQL databases, as well as work with SQL and NoSQL databases. - Conduct thorough unit and integration testing using Jest and other testing frameworks. - Implement responsive front-end applications using React, HTML5, CSS3, and Flowbite-React. - Deploy, manage, and monitor applications on AWS services - Utilize Docker for containerization and work with container orchestration tools. Required Skills and Experience: - Minimum 6 years of professional experience in full-stack software development. - Strong proficiency in Django, Python, and RESTful API development. - API development using Stripe, Plaid, Django Rest Framework, and Open API - In-depth knowledge of JWT, CI/CD pipelines, Git, and GitAction. - Extensive experience with PostgreSQL, SQL, and NoSQL databases. - Proven track record of developing and testing APIs using Postman and Jest. - Proficiency in front-end technologies, including React, HTML5, CSS3, TailWind, and Flowbite-React. - Significant experience with AWS services and cloud deployment. - Familiarity with Docker and container orchestration tools. - Strong written and verbal communication skills in English. Preferred Qualifications: - Experience working in a startup environment. - Strong problem-solving skills and a proactive attitude. - Ability to collaborate effectively in a remote team setting. - Knowledge of agile methodologies and practices. How to Apply: Please send me a message with your repo, resume, a cover letter detailing your relevant experience, and any relevant project links or portfolios . -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/9cff448a-0944-40ba-ad04-abd2b34a9829n%40googlegroups.com.
python/django/vs code
I have two html files 1. view_sales.html 2. total_sales.html I want to display output of total_sales.html within view_sales.html* just below * *view_sales.html output* Your help would be highly appreciated -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/30b6b324-22b2-44f1-b2dd-b0b034ac2f61n%40googlegroups.com.
Merging results of two .html files show up in one web page
I am working on an Inventory System ( just a trial - for learning purposes) platform - Python framework - Django VS Code/Sqlite3 Question: I have two html files 1. view_sales.html 2.total_sales.html view_sales.html Sales Product Total_price Sales Product Date Amount Quantity Sold Total Price {% for sale in sales %} {{ sale.product.product_name }} {{ sale.date }} {{ sale.amount }} {{ sale.quantity_sold}} {{ sale.total_price }} {% endfor %} Total Sales: {{ total_sales }} -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/56a9ff0a-62f2-4ec0-b8cd-5601174a862en%40googlegroups.com.
Weird issue with a form
I've been scratching my head over this one. I have a user registration form but when I submit data on it and it always returns a 404 (it wants to go to the /users/accounts/ URL) but there are no URLs there. It initially went to /user/ but I created the view it was looking for but it just then moved to /user/accounts/. I have added the get_success_url to point to the correct URL using reverse but even that doesn't work. Can someone help me out with this please? Thank you. Simon. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/DuQl41jFoSkfZGUn35r4DdcARH3iV1InUZ5sozg4Jg4EfJ1tQPYGcC7WVs0Pr8UzyLtYWDXp5TiS0rBzC2QCRjXbSoR3bWwLRIbnK7f8bqA%3D%40protonmail.com. signature.asc Description: OpenPGP digital signature
Unable to get a simple two level dependent dropdown working
Can someone help me understand what am I doing wrong in this django dependent dropdown code? My selection for the first dropdown menu is one of ("NetEng", "ITDE") and when I select, let's say "NetEng", an ajax call is made to the ajax function in the backend views.py code, but a [] response is received. Ideally, I am expecting the value associated with "NetEng" or "ITDE" to be a response. My forms.py: from django import forms from .models import TeamJira, TypeJira class DropdownForm(forms.Form): category = forms.ModelChoiceField(queryset=TeamJira.objects.all()) subcategory = forms.ModelChoiceField(queryset=TypeJira.objects.none()) def __init__(self, *args, **kwargs): super(DropdownForm, self).__init__(*args, **kwargs) self.fields['subcategory'].queryset = TypeJira.objects.none() if 'category' in self.data: try: category_id = int(self.data.get('category')) self.fields['subcategory'].queryset = TypeJira.objects.filter(category_id= category_id).order_by('name') except (ValueError, TypeError): pass elif self.pk: self.fields['subcategory'].queryset = self .instance.category.typejira_set.order_by('name') *My models.py* class TeamJira(models.Model): name = models.CharField(max_length=100) def __str__(self): return self.name class TypeJira(models.Model): category = models.ForeignKey(TeamJira, on_delete=models.CASCADE) name = models.CharField(max_length=100) def __str__(self): return self.name TEAM_CHOICE = ( ('NetEng', 'NetEng'), ('ITDE', 'ITDE'), ) class JiraAutomation(models.Model): name = models.CharField(max_length=255, null=True, blank=True, default=None) team_type = models.CharField(max_length=100, null=True, blank=True, default= None, choices=TEAM_CHOICE) # Change to CharField ticket_type = models.CharField(max_length=255, null=True, blank=True, default=None) url = models.CharField(max_length=255, null=True, blank=True, default=None) isbn_number = models.CharField(max_length=13) def __str__(self): return self.name My views.py function for the dependent dropdown ajax query: from .models import TypeJira from django.http import JsonResponse def load_subcategories(request): category_id = request.GET.get('category_id') subcategories = TypeJira.objects.filter(category_id=category_id).values('id', 'name') print("THIS IS SUBCATEG", subcategories) print(list(subcategories)) return JsonResponse(list(subcategories), safe=False) # return HttpResponse("hello") Javascript function for ajax in the template: {% csrf_token %} {{ form.as_p }} $(document).ready(function() { $('select[name^="form-0-team_type"]').change(function() { var categoryId = $(this).val(); $.ajax({ url: '/load_subcategories/', data: { 'category_id': categoryId }, dataType: 'json', success: function(data) { var subcategorySelect = $('select[name^="form-0-ticket_type"]'); subcategorySelect.empty(); $.each(data, function(index, subcategory) { subcategorySelect.append($('<option>', { value: subcategory.id, text: subcategory.name })); }); } }); }); }); -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/e3980053-5df1-414f-9024-87ccffe41b34n%40googlegroups.com.
Registration form in template
I have a register user template with a form which works well but I have a problem where there is lots of other text next to the form elements such as password length and what characters need to go in a password. Is their a reasonable way to hide that text or do I need to do it with JavaScript? Thank you. Simon. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/xepYvHchH7kpHYeaYe7ByePm8VQYSjgIEzyGjSKDhOcAOhbh7j1vLmwSgLEgC5kkq-wYMOHjPM7--mLSu9w22I_BT9A-sQjZgTxVi9RR8IM%3D%40protonmail.com. signature.asc Description: OpenPGP digital signature
Re: Slick Reporting Dashboard
ok Vào lúc 17:01:11 UTC-8 ngày Thứ Sáu, 16 tháng 2, 2024, Rupert Robin đã viết: > I am have a slick-reporting dashboard with 4 reports. > However, the filters and CSV export options do not appear in the dashboard > rendering of the ReportView(s). > When a single report view is called directly, now the Filter and Export > CSV options are shown. > How can I get the Filters and Export CSV to appear in the dashboard > renderings? > > Any insights appreciated! > Thanks - Rupert > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/9e8f9ddf-5890-48a8-b583-dd142e367c65n%40googlegroups.com.
Re: Working on a Django server Need Team to join me
Not working. On Thu, 15 Feb 2024, 6:13 pm Space1 Technology, wrote: > Join via the WhatsApp link > https://chat.whatsapp.com/Hlqd0qZJtQOEVfIpQSWHW8 > > On Thu, 15 Feb 2024 at 14:11, Tushar wrote: > >> Hi, I'm interested >> >> On Thu, Feb 15, 2024, 6:35 PM Space1 Technology >> wrote: >> >>> Anyone interested in working with me am working on a personal Django >>> server project for my flutter frontend app. It’s a project am working on to >>> boost my portfolio. Kindly send me hi. It’s a complex project with >>> different features. Am using Django as a security layer to secure the >>> frontend app which actually uses firebase as backend. >>> >>> You can join via the link: >>> >>> https://chat.whatsapp.com/Hlqd0qZJtQOEVfIpQSWHW8 >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Django users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to django-users+unsubscr...@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/django-users/CAPSG2fc8NaNLPwcOv3DKBehrK%3Dw5NnZmS5k1UXd_fSk25YcH3A%40mail.gmail.com >>> <https://groups.google.com/d/msgid/django-users/CAPSG2fc8NaNLPwcOv3DKBehrK%3Dw5NnZmS5k1UXd_fSk25YcH3A%40mail.gmail.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to django-users+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-users/CAMiLjhZHWhu%3D105%3DieFycwT-9TvxyC6K3H%3DTbRGiG4SZtFqxow%40mail.gmail.com >> <https://groups.google.com/d/msgid/django-users/CAMiLjhZHWhu%3D105%3DieFycwT-9TvxyC6K3H%3DTbRGiG4SZtFqxow%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/CAPSG2ffVGA4T%2Bb%3DhQVSmnNLEdrMdbVpFy_%2BZ%3DRH6vNmKqQ1jWQ%40mail.gmail.com > <https://groups.google.com/d/msgid/django-users/CAPSG2ffVGA4T%2Bb%3DhQVSmnNLEdrMdbVpFy_%2BZ%3DRH6vNmKqQ1jWQ%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAKPY9pkQ4SwF6P0vRi9L5ZqJNLA_DviLXVFoz9KzUrX41cc2Lg%40mail.gmail.com.
Re: Working on a Django server Need Team to join me
Hi. I am interested however your link is not working. On Thu, 15 Feb 2024, 6:04 pm Space1 Technology, wrote: > Anyone interested in working with me am working on a personal Django > server project for my flutter frontend app. It’s a project am working on to > boost my portfolio. Kindly send me hi. It’s a complex project with > different features. Am using Django as a security layer to secure the > frontend app which actually uses firebase as backend. > > You can join via the link: > > https://chat.whatsapp.com/Hlqd0qZJtQOEVfIpQSWHW8 > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/CAPSG2fc8NaNLPwcOv3DKBehrK%3Dw5NnZmS5k1UXd_fSk25YcH3A%40mail.gmail.com > <https://groups.google.com/d/msgid/django-users/CAPSG2fc8NaNLPwcOv3DKBehrK%3Dw5NnZmS5k1UXd_fSk25YcH3A%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAKPY9pndwdHGrUBgdo5gfGJg%3Dbo-r6oAN0HxWuWDt3%3D40zZRng%40mail.gmail.com.
Django project website UX: call for help!
Hello everyone, at 20tab we just finished collaborating with the Django Software Foundation to improve the Django project website's accessibility and usability. We now need you to help us understand how involved people are in the Django project and how much they care for good UX. Fill out this very short form and let us know! https://t.co/cWiMc6SJPB Thank you to all of you who will take the time to respond - your input is of immense value to us. Feel free to raise any questions here. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/e56f58cc-e56e-4183-98e2-06a01a9c1160n%40googlegroups.com.
Re: Django Channels and multi-tenant will this be a world of hurt?
Hi, I'm reviving this old thread... do you know of any other solution to the one proposed by @Ahmed Ishtiaque Thanks El domingo, 24 de febrero de 2019 a la(s) 9:13:30 p.m. UTC-3, Ahmed Ishtiaque escribió: > @N Muchai, > > I don't know if you've found a workaround to this, but here's mine if > people are interested in the future. > > I just made a custom ASGI application that adds the tenant schema name > (provided your URLs are in the form *.domain.com, where * represents the > schema name) and whether the project is multitenant or not. I haven't > thought much about whether the boolean for multitenancy identifier helps, > so feel free to remove it in your implementation. I just stacked this > application in my project's `routing.py` file. Here's the code I have at > the moment: > > My Middleware: > class MTSchemaMiddleware: > def __init__(self, inner): > self.inner = inner > > def __call__(self, scope): > if "headers" not in scope: > raise ValueError( > "MTSchemaMiddleware was passed a scope that did not have a > headers key " > + "(make sure it is only passed HTTP or WebSocket > connections)" > ) > > for key, value in scope.get('headers', []): > if key == b'host': > schema_name = value.decode('ascii').split('.')[0] > break > else: > raise ValueError( > "The headers key in the scope is invalid. " > + "(make sure it is passed valid HTTP or WebSocket > connections)" > ) > return self.inner( > dict(scope, schema_name=schema_name, multitenant=True) > ) > > My `routing.py`: > > import MTSchemaMiddleware # from wherever your Middleware class resides > application = ProtocolTypeRouter({ > 'websocket': ( > MTSchemaMiddleware( > URLRouter( > chat.routing.websocket_urlpatterns > ) > ) > ) > }) > > After you do this, you will be able to access the `schema_name` and > `multitenant` variables inside your consumer's `scope` like this: > `schema_name = scope['schema_name']` or `multitenant = > scope[`multitenant`]`. > > Hope this helps someone! > > Best, > Ahmed > > > > On Thursday, January 10, 2019 at 7:22:40 AM UTC-5, N Muchai wrote: >> >> @Filbert, >> >> Am in the same exact spot using Django Channels with django-tenants. Did >> you find a way to identify the tenant? >> >> Thanks. >> >> On Tuesday, November 28, 2017 at 4:22:10 AM UTC+3, Filbert wrote: >>> >>> Sorry, yeah dig before I post :-| Can create a class-based consumer and >>> use the message->headers->host. I'll get chest deep before ask another >>> question. >>> >>> On Monday, November 27, 2017 at 6:04:48 PM UTC-5, Andrew Godwin wrote: >>>> >>>> That would be correct (though please be aware Origin can be faked like >>>> host headers, so don't use it as the sole point of security). >>>> >>>> Is it not available via the headers list in the connect message? >>>> >>>> Andrew >>>> >>>> On Mon, Nov 27, 2017 at 2:58 PM, Filbert wrote: >>>> >>>>> Thanks again. One last question, in order to "multi-tenant-ify" >>>>> Channels I think the challenge will be trickle the websocket "orgin" into >>>>> the consumer from Daphne somehow as it seems there is no way to know in a >>>>> consumer which tenant (unique domain) the message originated from. >>>>> Without >>>>> the domain you can't establish the Postgres schema, without the schema >>>>> you >>>>> have no tenant :-) >>>>> >>>>> Please confirm this would be the approach or whether I am wrong-headed >>>>> here. >>>>> Thanks. >>>>> >>>>> On Sunday, November 26, 2017 at 9:58:58 AM UTC-5, Andrew Godwin wrote: >>>>>> >>>>>> I've never used attach-daemon so I can't help you there I'm afraid. >>>>>> As long as it does sensible process-management things it's probably >>>>>> alright? >>>>>> >>>>>> Andrew >>>>>> >>>>>> On Sat, Nov 25, 2017 at 5:17 PM, Filbert wrote: >>
reg: Django custom middleware
Hi All, I have written a custom Django middleware to do retries and catch exception if there is any connection related issues between two servers. Below is the code snippet. from requests.adapters import Retry, RetryError, HTTPAdapter, MaxRetryError, ConnectTimeoutError, ProtocolError, ResponseErrorfrom requests.sessions import Sessionfrom django.http import HttpResponseServerError class RetryCal: def __init__(self, get_response): self.get_response = get_response @staticmethod def process_request(request): try: session = Session() retries = Retry(total=5, backoff_factor=2, status_forcelist=[500, 502, 503, 504]) session.mount('https://', HTTPAdapter(max_retries=retries)) request.retry_session = session except Exception as e: raise e def __call__(self, request): RetryCal.process_request(request) try: response = self.get_response(request) return response except (ProtocolError, OSError) as err: raise ConnectionError(err, request) except MaxRetryError as e: if isinstance(e.reson, ConnectTimeoutError): return HttpResponseServerError("Connection timeout error...") if isinstance(e.reson, ResponseError): raise RetryError(e, request=request) raise ConnectionError(e, request) Below is the placement of the custom middleware 'django.middleware.security.SecurityMiddleware','django.contrib.sessions.middleware.SessionMiddleware', # custom retry middleware.'integ.api_retry_custom_middleware.RetryCal', below this custom middleware I do have other default one's as well. The problem is I am not sure if this is working. I have an access token, In that I added some garbage characters and tried to hit my endpoint. I did see an exception as seen below Internal Server Error: /api/acct/[24/Jan/2024 14:23:39] "GET /api/acct/ HTTP/1.1" 500 5348 But I can see this error even if I comment out my custom middleware. My purpose is to create the custom middleware and if there is any API request from any Django App the request should go first through the custom middleware. That is my thought. But I am not sure if the middleware is working. Or maybe the placement if the custom middleware is not proper. I have been working with Django for a while now but written the custom middleware for the first time. Please suggest. Regards, Amitesh -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/304829749.259529.1706099335383%40mail.yahoo.com.
Re: login with token instead of password
Isn't this pincode_auth_app just the same as the standard Django password authentication, only the password is stored in plain text and limited to four characters? Maybe I'm missing something? Kind regards, Kasper Laudrup -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/3e7ec0be-1c03-42e5-a1de-18bfbb1be9b4%40stacktrace.dk. OpenPGP_0xE5D9CAC64AAA55EB.asc Description: OpenPGP public key OpenPGP_signature.asc Description: OpenPGP digital signature
Disable the admin of "Site"
The admin console always displays the admin of "Site" page while this should be hidden for the people on a specific site (they should not be aware of the fact that there are multiple sites) ! When I add the admin.py the following line ``` admin.site.unregister(Site) ``` The (debug) server crashes with the following trace : ``` INFO autoreload P86005 T140161586511872 Watching for file changes with StatReloader Exception in thread django-main-thread: Traceback (most recent call last): File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/aazz/Documents/work/Projects/UseSiteAndHistoryFrameworkTogether/venv/lib/python3.10/site-packages/django/utils/autoreload.py", line 64, in wrapper fn(*args, **kwargs) File "/home/aazz/Documents/work/Projects/UseSiteAndHistoryFrameworkTogether/venv/lib/python3.10/site-packages/django/core/management/commands/runserver.py", line 125, in inner_run autoreload.raise_last_exception() File "/home/aazz/Documents/work/Projects/UseSiteAndHistoryFrameworkTogether/venv/lib/python3.10/site-packages/django/utils/autoreload.py", line 87, in raise_last_exception raise _exception[1] File "/home/aazz/Documents/work/Projects/UseSiteAndHistoryFrameworkTogether/venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 394, in execute autoreload.check_errors(django.setup)() File "/home/aazz/Documents/work/Projects/UseSiteAndHistoryFrameworkTogether/venv/lib/python3.10/site-packages/django/utils/autoreload.py", line 64, in wrapper fn(*args, **kwargs) File "/home/aazz/Documents/work/Projects/UseSiteAndHistoryFrameworkTogether/venv/lib/python3.10/site-packages/django/__init__.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "/home/aazz/Documents/work/Projects/UseSiteAndHistoryFrameworkTogether/venv/lib/python3.10/site-packages/django/apps/registry.py", line 124, in populate app_config.ready() File "/home/aazz/Documents/work/Projects/UseSiteAndHistoryFrameworkTogether/venv/lib/python3.10/site-packages/django/contrib/admin/apps.py", line 27, in ready self.module.autodiscover() File "/home/aazz/Documents/work/Projects/UseSiteAndHistoryFrameworkTogether/venv/lib/python3.10/site-packages/django/contrib/admin/__init__.py", line 50, in autodiscover autodiscover_modules("admin", register_to=site) File "/home/aazz/Documents/work/Projects/UseSiteAndHistoryFrameworkTogether/venv/lib/python3.10/site-packages/django/utils/module_loading.py", line 58, in autodiscover_modules import_module("%s.%s" % (app_config.name, module_to_search)) File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlocked File "", line 688, in _load_unlocked File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/home/aazz/Documents/work/Projects/UseSiteAndHistoryFrameworkTogether/UseSiteAndHistoryFrameworkTogether/UseSiteAndHistoryFrameworkTogether/ContactManagementUseSiteAndHistory/admin.py", line 71, in admin.site.unregister(Site) File "/home/aazz/Documents/work/Projects/UseSiteAndHistoryFrameworkTogether/venv/lib/python3.10/site-packages/django/contrib/admin/sites.py", line 161, in unregister raise NotRegistered("The model %s is not registered" % model.__name__) django.contrib.admin.sites.NotRegistered: The model Site is not registered ``` How can I fix this ? \T, -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/6685d1ea-fd69-4237-aeee-c7e6f98b2a83n%40googlegroups.com.
Re: activate source my_env/bin/activate
day la nhom https://groups.google.com/g/django-users/c/959lKG6Oreg Vào lúc 00:50:52 UTC+7 ngày Thứ Năm, 16 tháng 11, 2023, Lutaaya Jamil đã viết: > Do as Mr. Jung said, and ensure to be in the same folder where your > virtual env is > On Wednesday, 15 November 2023 at 18:34:04 UTC+3 Sebastian Jung wrote: > >> Linux is case sensitive... Try source >> >> william Kachuma schrieb am Mi., 15. Nov. 2023, 16:31: >> >>> good day >>> >>> i am experiencing problem when trying to activate my_env, can someone >>> please assit me >>> >>> Command 'Source' not found, did you mean: >>> command 'gource' from deb gource (0.54-1) >>> Try: sudo apt install >>> >>> kind regards >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Django users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to django-users...@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/django-users/f70ed7d8-01ba-4b8f-a8f0-5c409146b929n%40googlegroups.com >>> >>> <https://groups.google.com/d/msgid/django-users/f70ed7d8-01ba-4b8f-a8f0-5c409146b929n%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ae249f6b-b302-4c0d-92ce-7e6d2549d562n%40googlegroups.com.
Re: Microsoft Teams Free Download Mac
On 06/12/2023 19.29, Eliezer reuven Ramirez ruiz wrote: Why did you send that? , I've checked the URL and that has a virus. maybe you know that but I don't stupid my son, look for some other people. No reason to waste your time replying to things like this. It's most likely a bot. Just forward it to ab...@gmail.com (since it comes from a gmail account) and hope that the account will be closed. Kind regards, Kasper Laudrup -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/71f4d73a-0627-45d4-a281-b4cd75f95978%40stacktrace.dk. OpenPGP_0xE5D9CAC64AAA55EB.asc Description: OpenPGP public key OpenPGP_signature.asc Description: OpenPGP digital signature
Re: auth_user' doesn't exist
On 02/12/2023 07.56, Nurlanbek Musaev wrote: hello everyone I get an error when I do makemigrations. I tried many things. It didn't happen django.db.utils.ProgrammingError: (1146, "Table 'prodb1.auth_user' doesn't exist") If you've just tried many things you need to try more things. At some point you'll have tried really many things and then it will happen. In cases like these you have to try many, many things. Hope that helps. Kind regards, Kasper Laudrup -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ee020ab6-9daf-4df7-a907-7d3d25faabd4%40stacktrace.dk. OpenPGP_0xE5D9CAC64AAA55EB.asc Description: OpenPGP public key OpenPGP_signature.asc Description: OpenPGP digital signature
Re: Issue in Django-RIver workflow Package
On 30/11/2023 11.29, Akshay Prakash wrote: I have an issue in Django-River Package. My River version is 3.3.0(Django=3.2,python=3.9).i share the screenshot of the error. You can report issues to the Django-river project here: https://github.com/javrasya/django-river/issues but the maintainers would mostly likely not be willing to help you unless you actually describe your issue properly instead of just sending them a screenshot. Kind regards, Kasper Laudrup -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/9cbee7e9-2539-4ef3-92be-3d4c3e399b63%40stacktrace.dk. OpenPGP_0xE5D9CAC64AAA55EB.asc Description: OpenPGP public key OpenPGP_signature.asc Description: OpenPGP digital signature
Re: Encrypt entire Django project and decrypt it in ram when starting server
On 20/11/2023 12.02, Om Khade wrote: Hey Kasper, We have a method to securely distribute the key for decryption in a way that the client won't be able to use it for decryption on his own but to run the Django project we will have to decrypt the code at some location, I want to make it hard for anyone to access it during this transition. In the end, I want to make it hard for anyone to bypass the licensing mechanism by making changes to the code or to understand the validation logic in place to detect code changes. Sure, you can make it "hard" with different kinds of obfuscation but in the end the client will still have access to the key since the client has full control over the machine including reading whatever is stored in memory. You can make the validation logic so complicated that it's harder to reverse engineer but that will without doubt introduce a lot of bugs and annoyances for your paying customers while you haven't effectively stopped anyone from accessing your keys anyway. Security by obscurity and DRM doesn't work and it's not worth trying to implement. That's just my (and many others) opinion of course. If you want to try to implement something that is logically impossible to do then by all means go ahead. Kind regards, Kasper Laudrup -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/75be0980-c31b-b458-a416-b7056f4a1fc3%40stacktrace.dk.
Re: Encrypt entire Django project and decrypt it in ram when starting server
On 20/11/2023 07.25, Om Khade wrote: Is there a way to decrypt the code in memory or run the Django project from the encrypted code without exposing the decrypted code to the client? No, of course there isn't. In order to decrypt the data the client needs the key. You can try to obscure it in various ways but in the end the client will still need the key so that's fairly pointless. Even if you were to be able to hide the key somehow, eg. providing some TPM like hardware where only you know the key, the data would still be available unencrypted in memory which sort of defeats the purpose. Think about how huge companies with almost unlimited resources and control of the hardware (eg. Sony Playstation) have tried something similar without success. Spend your energy on providing software your customers will be happy to use instead and ignore that someone might be violating whatever terms you distribute it under or let your lawyers deal with that. Kind regards, Kasper Laudrup -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/224b9b0b-c957-0450-38ff-5c17e1dd5f7d%40stacktrace.dk.
Re: GeoDjango Hosting
Sorry but this sounds like a problem with the user. DO has dedicated node types if you look through the catalog. On Thursday, 16 November 2023 at 07:39:18 UTC-8 Sebastian Jung wrote: > No no please don't go to digital ocean.. > I know many people how have much problems... No dedicated cpu.. no fix > ressources... No go... > > IKT Service schrieb am Do., 16. Nov. 2023, 16:35: > >> Try digital Ocean >> >> tor. 16. nov. 2023 kl. 15:17 skrev Ernest Okiya : >> >>> Hello. GCP will work best for you. Try it out >>> >>> On Thu, 16 Nov 2023, 02:46 lone...@gmail.com, wrote: >>> >>>> Hello all, >>>> >>>> I am looking for a webhosting service that allows me to install >>>> qgis software packages on the webhost. My preferred hosts are either >>>> Ubuntu or Debian. Anyone know of any good solutions? >>>> >>>> Thank you. >>>> >>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Django users" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to django-users...@googlegroups.com. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/django-users/e106b78b-847a-451c-87d2-33bb246185f8n%40googlegroups.com >>>> >>>> <https://groups.google.com/d/msgid/django-users/e106b78b-847a-451c-87d2-33bb246185f8n%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Django users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to django-users...@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/django-users/CAM2QfqoPbSUHxtcXQVBjM0-_RffOe2agzb2iY465W0%3DFnQ%3DYPg%40mail.gmail.com >>> >>> <https://groups.google.com/d/msgid/django-users/CAM2QfqoPbSUHxtcXQVBjM0-_RffOe2agzb2iY465W0%3DFnQ%3DYPg%40mail.gmail.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to django-users...@googlegroups.com. >> > To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-users/CAA7BsYgs%3DZk8PfXmwtt0u2mhi7GJ72rztXqH-rHV5rfOP6jP_w%40mail.gmail.com >> >> <https://groups.google.com/d/msgid/django-users/CAA7BsYgs%3DZk8PfXmwtt0u2mhi7GJ72rztXqH-rHV5rfOP6jP_w%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/482c84d9-ae3a-4a15-8ca4-81bbc8235a69n%40googlegroups.com.
Re: GeoDjango Hosting
Linode or Digital Ocean or Vultr Deploy vanilla linux and get your hands dirty, or use a one click deploy of a familiar stack like Cpanel and then modify the host as you like. And once you're on one of these providers if you want to move to containers or leverage object storage or managed databases, it's all there. Cheers, Chris Routh On Wednesday, 15 November 2023 at 15:45:30 UTC-8 lone...@gmail.com wrote: > Hello all, > > I am looking for a webhosting service that allows me to install qgis > software packages on the webhost. My preferred hosts are either Ubuntu or > Debian. Anyone know of any good solutions? > > Thank you. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/26a9fb6d-e37e-4316-85b7-ecd9c86f5493n%40googlegroups.com.
Re: New User of Django
On 15/11/2023 13.57, Yonis Abdulkadir wrote: I need you to give me an explanation about how i can install and use it thank you so much https://docs.djangoproject.com/en/4.2/intro/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ced00921-c486-4421-870b-8eda6a3f757a%40stacktrace.dk. OpenPGP_0xE5D9CAC64AAA55EB.asc Description: OpenPGP public key OpenPGP_signature.asc Description: OpenPGP digital signature
Re: Encrypt entire Django project and decrypt in ram to start server.
On 13/11/2023 06.15, Om Khade wrote: I want to save my Django project on a shared server in encrypted format and build a script that decrypts the Django project files in ram and start the server so that code is not leaked or anyone is not able to tamper with it. Is there a way to do this? No, you cannot do that. This is a task for your legal team not something you can handle technically. Kind regards, Kasper Laudrup -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ce3be7d9-2424-479e-8f4e-05e48bd51462%40stacktrace.dk. OpenPGP_0xE5D9CAC64AAA55EB.asc Description: OpenPGP public key OpenPGP_signature.asc Description: OpenPGP digital signature
question-test
Hi group I am reaching out to try and ask for django common issues. Can't see your comments on the group. can you help me? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAKhDVWy2f03h_xPtH3EMGZsY73LQXv6d-MK5HHCyTJT4Knp9mA%40mail.gmail.com.
Re: JOB
On 15/10/2023 21.55, Adesewa Lola wrote: Hi currently i'm having issues with my django. We can all have issues with our django from time to time and it's nothing to be embarrassed about. Good that you are being honest about it. Hope you'll get better soon. Best regards, Kasper Laudrup -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ed7bcce3-bc1e-46ef-a921-1803e5ea3a6f%40stacktrace.dk. OpenPGP_0xE5D9CAC64AAA55EB.asc Description: OpenPGP public key OpenPGP_signature.asc Description: OpenPGP digital signature
Strange bug with Firefox
Hi, I have a strange issue that affects the latest stable version of Firefox and the latest Firefox Developer Edition as well. I'm making a custom user and am just setting all the forms up. I can login with the user and when I go to the password change form it is displayed correctly in Firefox but if I right click and click view source it shows a completely different form. On the other hand when I use Chrome and Chrome Developer Edition it shows the correct form and works exactly as intended. I've never seen anything like this before. I thought it was a problem with a browser extension so I removed them all (apart from Bitwarden) and completely cleared the history but none of that seems to have fixed the issue. I'm at a loss. Can someone suggest what might be going on here? As I said it works fine in Chrome. Simon. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/zT7ozAu9QZo4FQ9XwBRiSTIc2ZwYA3eknb3Z-NJpibp6KIw3I9HmI0vOjhwtoyUux2qIu_Zqa3dI3ecbdkQKWdHmT86PsXQ378hsYbrp3gw%3D%40protonmail.com. signature.asc Description: OpenPGP digital signature
Re: Unit test to make sure correct template is returned from a specific URL?
Thank you very much! --- Original Message --- On Monday, September 25th, 2023 at 14:07, Muhammad Juwaini Abdul Rahman wrote: > Use assertTemplateUsed. > https://docs.djangoproject.com/en/dev/topics/testing/tools/#django.test.SimpleTestCase.assertTemplateUsed > > On Sun, 24 Sept 2023 at 22:37, 'Simon Connah' via Django users > wrote: > > > I can write a unit test which checks say the title on a page and compares > > it to a string but that is really prone to breakage. What I want to do > > instead is to check that the template that is returned by the URL is the > > same one that is expected in the unit test. Is there an easy way to do this? > > > > -- > > You received this message because you are subscribed to the Google Groups > > "Django users" group. > > To unsubscribe from this group and stop receiving emails from it, send an > > email to django-users+unsubscr...@googlegroups.com. > > To view this discussion on the web visit > > https://groups.google.com/d/msgid/django-users/MnCVU2YvJzLiFdMPPAVBwMY7SMosqS5wvqopbySnD05i7BTc375v_Bo5GB4VlUQSd5K2OwsiblAbxsfsz7in96L4_Ou4RTRm0jwVN3aMp54%3D%40protonmail.com. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/CAFKhtoRiz4mr69ZLu7_wCxVFXgjnvmAW3JCoYdcDrx%2Bwu94vrw%40mail.gmail.com. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/O_3E4w3kT2FE_XgQrWGfQFM_DcKq_syuWJ0eEuZ0zJfIPnZ6rzbF80z28SORLG9r7rik-evYNQhGnchpIcEDOP9zqIX9n_xOntOTHDAbv4M%3D%40protonmail.com. signature.asc Description: OpenPGP digital signature
Unit test to make sure correct template is returned from a specific URL?
I can write a unit test which checks say the title on a page and compares it to a string but that is really prone to breakage. What I want to do instead is to check that the template that is returned by the URL is the same one that is expected in the unit test. Is there an easy way to do this? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/MnCVU2YvJzLiFdMPPAVBwMY7SMosqS5wvqopbySnD05i7BTc375v_Bo5GB4VlUQSd5K2OwsiblAbxsfsz7in96L4_Ou4RTRm0jwVN3aMp54%3D%40protonmail.com. signature.asc Description: OpenPGP digital signature
Re: Splitting views.py and urls.py into a directory rather than single files
Thank you! That got it working! --- Original Message --- On Monday, September 18th, 2023 at 13:34, Asim Sulehria wrote: > You can just directly declare an array of URL Patterns in a separate file and > then import that file in the url files you want to make the main urls file > > On Mon, Sep 18, 2023 at 5:28 PM 'Simon Connah' via Django users > wrote: > > > Hi, > > > > I have an app which has a lot of views and URLs and keeping them in just > > one file makes it really hard to manage because it is so long. I'd like to > > make a views and URLs folder which will allow me to break up views and URLs > > into different categories but I'm not sure what the best way to go about > > doing that is. > > > > Can someone point me in the right direction please? > > > > Thank you! > > > > Simon. > > > > -- > > You received this message because you are subscribed to the Google Groups > > "Django users" group. > > To unsubscribe from this group and stop receiving emails from it, send an > > email to django-users+unsubscr...@googlegroups.com. > > To view this discussion on the web visit > > https://groups.google.com/d/msgid/django-users/4svI0xN0uu53BvHzhG9Aa1qvI61v1qPlQOhkOLpaJPRXX1Jysfu-BOmrFlBsDOfHfKRHwTaXJNmKFApZ1W13jQLdpVvXQDEPdWq87T-ILR8%3D%40protonmail.com. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/CAPz57eGK6EXPGObGH5-ej3OPGvEmox%2BkR34xW3Eg1weWQug%3Dcw%40mail.gmail.com. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/d3_jwrhlaNWhn-_QfIOhopznbSi5o3e5tF5p-pF34iqaGFRRBVFScOg6PL95XWeJIBV6JpmQpXg0L0FcGNH9fjM5CItLGCZ8mIoJqNxEohU%3D%40protonmail.com. signature.asc Description: OpenPGP digital signature
Splitting views.py and urls.py into a directory rather than single files
Hi, I have an app which has a lot of views and URLs and keeping them in just one file makes it really hard to manage because it is so long. I'd like to make a views and URLs folder which will allow me to break up views and URLs into different categories but I'm not sure what the best way to go about doing that is. Can someone point me in the right direction please? Thank you! Simon. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/4svI0xN0uu53BvHzhG9Aa1qvI61v1qPlQOhkOLpaJPRXX1Jysfu-BOmrFlBsDOfHfKRHwTaXJNmKFApZ1W13jQLdpVvXQDEPdWq87T-ILR8%3D%40protonmail.com. signature.asc Description: OpenPGP digital signature
Re: My first Django project
On 29/08/2023 10.52, Noah Dara wrote: hi I'm new in Django I need your help my project is retirning the following in theterminal PS C:\Users\user\projects> & C:/Users/user/.virtualenvs/projects-O4ZjmZLG/Scripts/Activate.ps1 & : File C:\Users\user\.virtualenvs\projects-O4ZjmZLG\Scripts\Activate.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170. This is not related to Django but related to Powershell on Windows. Have you tried reading the information in the link above where it says "for more information"? That would probably be a good start. Also don't hijack other threads but start your own instead. Thanks and kind regards, Kasper Laudrup -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f8f3b7bd-1dd9-4c91-9170-ff5283e1d60b%40stacktrace.dk. OpenPGP_0xE5D9CAC64AAA55EB.asc Description: OpenPGP public key OpenPGP_signature.asc Description: OpenPGP digital signature
Re: How to create an individual instagram message into threads?
I've not used that app but creating email of messaging chains is quite easy. How I normally do it is to generate a unique identifier by using a uuid4 plus some custom values when a new thread/conversation is created and then this is passed and maintained during replies. There's probably something similar in that app. Emails tend to call it a Conversation ID On Sunday, 27 August 2023 at 22:19:46 UTC+1 Ram wrote: > Hi, > > We are using Instagram clone messaging in our ecommerce application where > users contact each other about market place item (sell/buy items). Once the > messaging started between two users on an item > 1. we want to keep the further messaging regarding that item to be > continued like an email thread so that all the messaging about that item > will be in one thread. > 2. New messaging on new market place item will be again new thread. > 3. It would be nice each thread has a title of the market place item so > that same users can go back to previous history of messages on that > particular item whenever they want. > > I'm wondering whether anyone has implemented the above features using > instagram clone in your Django application? > > Best regards, > ~Ram > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/099349c1-bfc4-42e8-8178-50141c7640d0n%40googlegroups.com.
Re: How to access gmail
On 26/08/2023 13.59, TASLIMA S wrote: Dear friends, I am developing an email signature web application. How to access gmail mails to my application. https://developers.google.com/gmail/api/guides Kind regards, Kasper Laudrup -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/2e0feaab-2b9d-4901-9546-299a81e5ac3e%40stacktrace.dk. OpenPGP_0xE5D9CAC64AAA55EB.asc Description: OpenPGP public key OpenPGP_signature.asc Description: OpenPGP digital signature
Re: UpdateView and DeleteView
Will do! Thank you for your help. --- Original Message --- On Saturday, August 26th, 2023 at 19:30, Ruby wrote: > I'm glad it worked out,Consider using LoginRequiredMixin to ensure that > current user is authenticated before accessing the view. > > > On Sat, Aug 26, 2023, 16:23 'Simon Connah' via Django users > wrote: > > > Thank you! That is very helpful. > > > > > > --- Original Message --- > > On Saturday, August 26th, 2023 at 14:07, Ruby > > wrote: > > > > > > > You can simply set a test case using the built-in user passes test > > > (https://docs.djangoproject.com/en/4.2/topics/auth/default/#django.contrib.auth.decorators.user_passes_test) > > > > > > On Sat, Aug 26, 2023, 11:20 'Simon Connah' via Django users > > > wrote: > > > > > > > I want to make sure that the only people who can update and delete an > > > > object are either superusers or the person that originally created them > > > > but I'm not sure how to go about doing it. Can someone point me in the > > > > right direction? > > > > > > > > I'm not sure which method(s) to override. > > > > > > > > Thank you. > > > > > > > > > > > > -- > > You received this message because you are subscribed to the Google Groups > > "Django users" group. > > To unsubscribe from this group and stop receiving emails from it, send an > > email to django-users+unsubscr...@googlegroups.com. > > To view this discussion on the web visit > > https://groups.google.com/d/msgid/django-users/iT1fh6Btk96LInLjgvQNNIOeqZTL6TMcV5IbsAmfVdnR1ujaNPCbV_zhJeXr5o7emCHzK_BHnYDtyxQ1ZJVu7oDGqyDRkJirWsaGto-5bbA%3D%40protonmail.com. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/CAPUD46vM6PEJK4btLa-DCF8-VvExdnJ2OpzB0-Z6h03CVWvzOg%40mail.gmail.com. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/nMbslf1DnsTi42UmcaQZjvuHxoVVxPQapPAABp-aN5zswI1iBp61YS-J9IwUsRPyTb_87IJsY5rMktNRS9h6rY57zUjT_4fJzdSU8Dxuiec%3D%40protonmail.com. signature.asc Description: OpenPGP digital signature
Re: UpdateView and DeleteView
Thank you! That is very helpful. --- Original Message --- On Saturday, August 26th, 2023 at 14:07, Ruby wrote: > You can simply set a test case using the built-in user passes test > (https://docs.djangoproject.com/en/4.2/topics/auth/default/#django.contrib.auth.decorators.user_passes_test) > > On Sat, Aug 26, 2023, 11:20 'Simon Connah' via Django users > wrote: > > > I want to make sure that the only people who can update and delete an > > object are either superusers or the person that originally created them but > > I'm not sure how to go about doing it. Can someone point me in the right > > direction? > > > > I'm not sure which method(s) to override. > > > > Thank you. > > > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/iT1fh6Btk96LInLjgvQNNIOeqZTL6TMcV5IbsAmfVdnR1ujaNPCbV_zhJeXr5o7emCHzK_BHnYDtyxQ1ZJVu7oDGqyDRkJirWsaGto-5bbA%3D%40protonmail.com. signature.asc Description: OpenPGP digital signature
UpdateView and DeleteView
I want to make sure that the only people who can update and delete an object are either superusers or the person that originally created them but I'm not sure how to go about doing it. Can someone point me in the right direction? I'm not sure which method(s) to override. Thank you. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/RC50Lr8yv1j7M_cjvPHLpvLJ1RzHJP3QQaF5oQu4vAmfeijfMbprfVyyHGTIvg9udwKhe_-XcM9tYH9tRyaX-MDQauXKf3PiJbMOq2hEfj4%3D%40protonmail.com. signature.asc Description: OpenPGP digital signature
Re: Connect::: frontend react and backend django
On 23/08/2023 11.57, Kani Sbt wrote: HI sir , Please Help me to how to solve this problem , You forgot to mention what the problem is. That makes it very hard for anyone to help you solve it. Kind regards, Kasper Laudrup -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/09e8df4d-9d4a-dbf1-4574-47ec9ddfb08e%40stacktrace.dk.
Re: hello i have made my crud and it works well. but when i add fields in the class. the crud does not work
On 10/08/2023 23.07, Abdoulaye SENE wrote: i have to add fields to my class. because i have other fields.normal this problem has a solution If this problem has a normal solution, have you considered using that solution? I don't understand why you're looking for an abnormal solution if the normal solution will work just fine. That is, of course, assuming that you want things to work. Maybe that's not the case? Kind regards, Kasper Laudrup -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/0606ac32-60d0-4a17-94ba-deb44138c3a6%40stacktrace.dk. OpenPGP_0xE5D9CAC64AAA55EB.asc Description: OpenPGP public key OpenPGP_signature.asc Description: OpenPGP digital signature
Re: hello i have made my crud and it works well. but when i add fields in the class. the crud does not work
On 10/08/2023 19.11, Abdoulaye SENE wrote: class Administratif(models.Model): nom = models.CharField(max_length=250) prenom = models.CharField(max_length=250) email = models.EmailField(max_length=250) tel = models.IntegerField() annEmploi = models.IntegerField(null=True,) def __str__(self): return self.nom If it works when you don't add fields to the class, then don't add fields to the class. That way it will continue to work and will not stop to work. I assume you prefer it work instead of not working? Kind regards, Kasper Laudrup -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/4179188c-96c0-4725-906c-01112c3ecf57%40stacktrace.dk. OpenPGP_0xE5D9CAC64AAA55EB.asc Description: OpenPGP public key OpenPGP_signature.asc Description: OpenPGP digital signature
Re: Emali Response From the Django server.
On 11/07/2023 12.54, Prateek Lodhi wrote: I am using the app password for the email, as I said it's working on a local server. but it's not working on hosting server. Never used CPanel but this should tell you everything you need to know to get it working: https://support.cpanel.net/hc/en-us/articles/156454042-How-to-configure-an-SMTP-connection-for-PHP-and-other-scripts-and-websites Kind regards, Kasper Laudrup -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b11863d9-542a-1f35-3523-0ff231c13ffc%40stacktrace.dk. OpenPGP_0xE5D9CAC64AAA55EB.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature
Re: job openings module lead 2+ years exp and product manager
On Mon, Jul 3, 2023 at 9:33 PM Benjamin Telford < benjamintelford0...@gmail.com> wrote: > Hello, Sakshi. > With over 7+ years of experience in web/app designing and development and > with the ability of writing clean code, bug-free and manageable coding,I > assure that my clients are 100% satisfied with work. > I have just attached my resume. If I can have a chance to have a meeting > with you, it will be very happy. > > Looking forward to hearing back from you. > Benjamin Telford > > On Mon, Jul 3, 2023 at 11:22 AM Sakshi wrote: > >> Hi my company is looking for below positions >> >> >> 1. module lead position with 2 or more years of experience in python >>> stack >> >> >> 2. product manager >> >> >> Pls email your resume if interested with the job you are applying for at >> @avichal.mis...@adcuratio.com >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to django-users+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-users/CADJuPLWCDTCx6aLB7uamCkY2EycvS_0pBVeyzjNDOtHsxrY-ug%40mail.gmail.com >> <https://groups.google.com/d/msgid/django-users/CADJuPLWCDTCx6aLB7uamCkY2EycvS_0pBVeyzjNDOtHsxrY-ug%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/CAKnkAkmrnAEvTUMtCLym2f0Krb24xZxwJuBa5NampTaK4MYM9A%40mail.gmail.com > <https://groups.google.com/d/msgid/django-users/CAKnkAkmrnAEvTUMtCLym2f0Krb24xZxwJuBa5NampTaK4MYM9A%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAGpwq2p%3Ddysgudb-%3DhYU%3Dd-UBbp1o%3D2dbGySoYZWo0hpxgP1Xw%40mail.gmail.com. Abulkashimcvforsoftwareengineerlatestfordjango.pdf Description: Adobe PDF document
Django Async support
Hi, We have been trying to use Django with Uvicorn via ASGI interface. As our use case is that our service acts as a wrapper for a 3rd party API service so using ASGI was a better choice because most of the time our service will be waiting on 3rd party service. Now the problem, I was assuming that if all middlewares are async and the view is async then uvicorn will have one thread to handle multiple requests. But when I simulate the traffic by a script, about 200 requests then uvicorn starts creating new threads. So it seems that django is using one request per thread. BTW To see the number of active thread I'm tracking them via the Activity monitor in Mac. To debug this I've started a new projects with empty list of middlewares and a view of 2 lines which just defines the function in one and sleeps in second. Sleep function is imported from asyncio. Isn't Uvicorn supposed to use one tread for all the requests. Regards -- The content of this email and attachment(s) are confidential and intended solely for the recipient(s) specified in the message. If you received this email by error, please alert the sender by replying to this email and follow with its deletion, so that we can ensure such an error does not occur in future. If you are not the intended recipient, you are strictly prohibited to use, copy, disseminate or store this email or its attachment(s). -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/1c57aad5-21c6-40b3-962a-876a05320118n%40googlegroups.com.
Re: Hello everyone,happy to be here.
On 29/06/2023 09.23, Apili Vicky wrote: am failing to get apython path on the cmd interface..what could be wrong Pretty much everything could be wrong, so I suggest you start by fixing that. If that doesn't work, try doing nothing. Sometimes that's the best option in cases like this. Hope that helps. Kind regards, Kasper Laudrup -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/389b8f58-ab86-f8c6-ddc5-772a3b35663d%40stacktrace.dk. OpenPGP_0xE5D9CAC64AAA55EB.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature
Re: Freelance Django and Python work
I am available On Fri, 30 Jun 2023, 19:45 Asim Sulehria, wrote: > I am available full time > > On Fri, Jun 30, 2023 at 4:43 PM Carlos Romero Martin < > carlosromeromartin1...@gmail.com> wrote: > >> I'm interested >> >> Le jeu. 29 juin 2023 à 23:56, M. Guy Sylvestre >> a écrit : >> >>> Je suis intéressé . >>> >>> >>> Le mar. 13 juin 2023, 11:30, אורי a écrit : >>> >>>> Hi, >>>> >>>> I'm looking for a programmer to hire as a freelancer for Django and >>>> Python work. >>>> >>>> - Experience with Python and Django >>>> - Experience with open source >>>> - Committed to the Django repository on GitHub - an advantage >>>> - Committed to other open-source projects in Python - an advantage >>>> - Experience with Stack Overflow - an advantage >>>> - BSc or BA in computers or science (math, physics) - an advantage >>>> - Knowledge of HTML, CSS, and JavaScript - an advantage >>>> - Can issue receipts >>>> >>>> I need about 5 hours per month on average. Some months I might need up >>>> to 15 hours per month. Some months I might not need anything. The work is >>>> remote. My project is open source. I can give you a free license to >>>> PyCharm. My website is at https://en.speedy.net/ and >>>> https://github.com/speedy-net/speedy-net >>>> >>>> To apply please send one email to jobs+jango-freelan...@speedy.net, >>>> with your name, your email address, where you live, your experience, how >>>> many commits you committed to Django, how many commits you committed to >>>> other open source projects, a link to your profile on LinkedIn, a link to >>>> your profile on GitHub, a link to your profile on Stack Overflow, your >>>> diploma if you have any, how much you charge per hour and in which currency >>>> (I prefer USD or Euro), and if you can issue receipts. If you don't have a >>>> profile on one of the above websites please mention this too. >>>> >>>> Thanks, >>>> Uri Rodberg, Speedy Net. >>>> אורי >>>> u...@speedy.net >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Django users" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to django-users+unsubscr...@googlegroups.com. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/django-users/CABD5YeHjQyFa75Mgq7nzcJ6AoX-WDeu75OOPfa2OngG2VTMaDQ%40mail.gmail.com >>>> <https://groups.google.com/d/msgid/django-users/CABD5YeHjQyFa75Mgq7nzcJ6AoX-WDeu75OOPfa2OngG2VTMaDQ%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Django users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to django-users+unsubscr...@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/django-users/CAEsEyq8uA%2BJEOabMdNV4XA8jsOmgeGo%3DJ4RgRD%3DAf%2B3gNSNyfA%40mail.gmail.com >>> <https://groups.google.com/d/msgid/django-users/CAEsEyq8uA%2BJEOabMdNV4XA8jsOmgeGo%3DJ4RgRD%3DAf%2B3gNSNyfA%40mail.gmail.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to django-users+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-users/CACc4Y%2BdN_Y15Bx-XdCra_u5gJqv3cf%3DRJdnscDucm--_eypdtA%40mail.gmail.com >> <https://groups.google.com/d/msgid/django-users/CACc4Y%2BdN_Y15Bx-XdCra_u5gJqv3cf%3DRJdnscDucm--_eypdtA%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/CAPz57eHGpMmWaEA9J5i5MMHeOG9ZMcgiQq4cgtfO8t-m2KJCKQ%40mail.gmail.com > <https://groups.google.com/d/msgid/django-users/CAPz57eHGpMmWaEA9J5i5MMHeOG9ZMcgiQq4cgtfO8t-m2KJCKQ%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAGpwq2p_8gEYrs9gHdN14W%2Bg3gvvqWUfSqj66yZf-pRri1-DPA%40mail.gmail.com. AbulKashim-Junior_software_engineer_resume (3)-1 (2)-8.pdf Description: Adobe PDF document
Re: In Need of Collaboration With a Django Dev in Europe
Weldone Sebastian. On Tue, 20 Jun 2023, 5:31 pm Sebastian Jung, wrote: > Hello Ome, > > I open zerotenweb.com.ng and no https security. When i force https > connection then i get security risk error. All .js,.jpg etc.pp. are not > loading. I am sorry but i think when you are not able to implement your own > website then you couldn't make a website for european customer. > > Sorry but first try to make a very good own website... Then writes again. > > Regards > > > ome chukwuemeka schrieb am Di., 20. Juni 2023, > 11:22: > >> Hello Everyone, >> >> I'm the lead developer at ZeroTen Technologies and we are looking at >> expanding our business to the European Market. >> >> We build Software, Mobile Apps and Websites. Most of our website products >> are built with Django. >> >> We are looking for a business partnership and collaboration with a Django >> Developer that is resident in Austria or Europe. But we prefer Austria. >> >> If you are available, kindly reply to this conversation or send me an >> email at ad...@zerotenweb.com.ng >> >> Thanks >> >> Ome Chukwuemeka >> Lead Developer ZeroTen Technologies >> +2348064515245(WhatsApp only) >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to django-users+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-users/0473ac50-37ff-4aa7-bf02-20d2892fb945n%40googlegroups.com >> <https://groups.google.com/d/msgid/django-users/0473ac50-37ff-4aa7-bf02-20d2892fb945n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/CAKGT9mxn%2BR33UUF9OWL0pMOyYw_w-d-2cfFFHK2sG%2BiB4czMJQ%40mail.gmail.com > <https://groups.google.com/d/msgid/django-users/CAKGT9mxn%2BR33UUF9OWL0pMOyYw_w-d-2cfFFHK2sG%2BiB4czMJQ%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAKPY9p%3DB60NErQY5iwL9uZ8hnq%2BDejvxbi1TDczRCe9e8PYkpw%40mail.gmail.com.
Re: Freelance Django and Python work
Hi, you can hire me, easily, i provided a e-commerce website or other many system using django as a freelancer. I am also doing a remote job. On Thu, Jun 15, 2023 at 12:29 AM Shams Ulhaq wrote: > Hi > I am shamasulhaq > From Pakistan > I am working on python > Django Django rest framework celery fastapi flask redis Django channels > I have 3 years of experience in python > My cv is attached with this mail > Kindly find the attachment > > On Tue, 13 Jun 2023, 16:30 אורי, wrote: > >> Hi, >> >> I'm looking for a programmer to hire as a freelancer for Django and >> Python work. >> >> - Experience with Python and Django >> - Experience with open source >> - Committed to the Django repository on GitHub - an advantage >> - Committed to other open-source projects in Python - an advantage >> - Experience with Stack Overflow - an advantage >> - BSc or BA in computers or science (math, physics) - an advantage >> - Knowledge of HTML, CSS, and JavaScript - an advantage >> - Can issue receipts >> >> I need about 5 hours per month on average. Some months I might need up to >> 15 hours per month. Some months I might not need anything. The work is >> remote. My project is open source. I can give you a free license to >> PyCharm. My website is at https://en.speedy.net/ and >> https://github.com/speedy-net/speedy-net >> >> To apply please send one email to jobs+jango-freelan...@speedy.net, with >> your name, your email address, where you live, your experience, how many >> commits you committed to Django, how many commits you committed to other >> open source projects, a link to your profile on LinkedIn, a link to your >> profile on GitHub, a link to your profile on Stack Overflow, your diploma >> if you have any, how much you charge per hour and in which currency (I >> prefer USD or Euro), and if you can issue receipts. If you don't have a >> profile on one of the above websites please mention this too. >> >> Thanks, >> Uri Rodberg, Speedy Net. >> אורי >> u...@speedy.net >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to django-users+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-users/CABD5YeHjQyFa75Mgq7nzcJ6AoX-WDeu75OOPfa2OngG2VTMaDQ%40mail.gmail.com >> <https://groups.google.com/d/msgid/django-users/CABD5YeHjQyFa75Mgq7nzcJ6AoX-WDeu75OOPfa2OngG2VTMaDQ%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/CACbcXAV87Bx6Narq3v3GrSG1cJ5fnr%2BMX8ysbB5o3HKL6%2BOsEQ%40mail.gmail.com > <https://groups.google.com/d/msgid/django-users/CACbcXAV87Bx6Narq3v3GrSG1cJ5fnr%2BMX8ysbB5o3HKL6%2BOsEQ%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAGpwq2rCxEtO1DZkmyeXHYAJMPn7dfLWP-c5_RF3S4CpLMRqDw%40mail.gmail.com. AbulKashim-Junior_software_engineer_resume_django.pdf Description: Adobe PDF document
Re: Slow Performance of Django Web App
To start with I'd look at upgrading the project to the latest version of Django and Python as Python 3.10 and 3.11 have some performance improvements and you'll need to be on a Django 4 version to support them. That aside it sounds like you've got good caching architecture setup since it's working well when cached but that the architecture without the caching is not up to the job. You need to investigate where the performance hit is coming in, most likely it'll be database performance. Once thing to check would be whether you are using things like like prefetch_related, select_related, and defer with any queryset or are you always returning the whole object. If you are returning the whole object do you need to? After that it depends on how you are using and exposing Django as to what I'd suggest you check next. Are you using DRF as API backend to the pages in S3 or are you serving pages via Django and then caching those? If it's the latter, run it locally with caching turned off and debug toolbar installed and look at each pages output to see how many queries you are hitting per page and the performance of each. Since you are using a lot of caching how are you maintaining the cache? Are you letting it expire and then self populate or are you using warm-ups to fetch the update information and then update the cache prior to it expiring? If you're doing the former but the latter fits your setup look to switch to that. In those instances you can update the fetch the results to update the cache outside of a user transaction On Monday, 12 June 2023 at 06:23:06 UTC+1 Kunal Mittal wrote: > Hi, we are using Django 1.8.5 > Architecture is like - Nginx side car -> wsgi server (gunicorn) -> > application > On Monday, June 12, 2023 at 1:06:18 AM UTC+5:30 Mz Gz wrote: > >> What server do you use ? >> >> On Sun, 11 Jun 2023, 10:00 pm Kunal Mittal, wrote: >> >>> I've a django application serving 10k+ users daily, that application has >>> everything to be on the top of performance metrics but still some API's >>> have high latencies, application serves lots of pages with nice css and >>> various images, on most the pages they are being served by s3 while on some >>> it's via django static files. We have implemented caching on akamai for >>> every static file that application serves, whenever that cache disappears >>> latency of each and every API spikes exponentially, at that time even >>> loading metrics becomes a pain, server does not pick those requests. Can >>> anyone suggest what's going on here. >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Django users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to django-users...@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/django-users/d32868ba-a2df-41e3-8f41-3ecc3c1b3471n%40googlegroups.com >>> >>> <https://groups.google.com/d/msgid/django-users/d32868ba-a2df-41e3-8f41-3ecc3c1b3471n%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/c5e4d83c-1891-4005-939e-8c0f3f074cf2n%40googlegroups.com.
Re: how to convert to Django 3 or 4
Ah Python 2.7, you'll need to upgrade through to at least 3.8 so unless it's a huge project where you have time to upgrade through the Django Versions and different versions of Python as you go, you may just want to create a new project and lift the code as you go. On Friday, 9 June 2023 at 15:29:47 UTC+1 Rogerio Carrasqueira wrote: > I'm using python 2.7, wich your suggestion? > > Thanks > > > Rogério Carrasqueira > > > > > > Em sex., 9 de jun. de 2023 às 03:37, 'Steven Mapes' via Django users < > django...@googlegroups.com> escreveu: > >> If you want to go directly then start a new project and "lift and shift" >> code fixing and updating as you go. Depending on the size of the project >> and the complexity of the processes it may be the fastest way to do it. >> >> If you want to keep the same project then upgrade in stages. The fact >> you're in 1.4 will make it hard and you'll need to do a lot of manual >> changes to get into 1.8 so starting new may well be quicker. If you did >> upgrade then I'd go 1.8 to 1.11, 2.2, 3.2 and finally 4.2. >> >> Branch the code using version control and see how bad it is but it'll >> depend on the project. >> I went from 1.11 to 3.2 in a day for one but most of the code was bespoke >> without may external packages to worry about. Those could also cause you >> issues. >> >> Since the code is Django 1.4 what version of python is it also using? >> >> >> On Thu, Jun 8, 2023, 21:31 Rogerio Carrasqueira >> wrote: >> >>> So just to undersand, I cannot move directly from 1.4 to 4 I have to do >>> it in steps, right? >>> >>> Thanks >>> Rogério Carrasqueira >>> >>> >>> >>> >>> >>> Em qui., 8 de jun. de 2023 às 17:01, 'Steven Mapes' via Django users < >>> django...@googlegroups.com> escreveu: >>> >>>> I've used it to go from Django 3 to 4 and to move a project from 1.11 >>>> to 2.2. >>>> >>>> It doesn't do everything for you but it's a great start. I've >>>> personally moved from 1.8 through to 4.2.2 but that was during their >>>> development lifecycle. Moving up to 1.7 and then 1.7 to 1.8 and 1.8 to >>>> 1.11 >>>> and 1.11 to 2 will be the hardest parts but it'll get easier once you're >>>> on >>>> 1.11 >>>> >>>> On Thu, Jun 8, 2023, 19:58 Rogério Carrasqueira < >>>> rogerio.ca...@gmail.com> wrote: >>>> >>>>> Hey Steven! >>>>> >>>>> Thanks for this information, do you have tried it before? I would like >>>>> to move from 1.4 to lastest, do you think that is it possible? >>>>> >>>>> Thanks >>>>> >>>>> Em quarta-feira, 7 de junho de 2023 às 11:52:35 UTC-3, Steven Mapes >>>>> escreveu: >>>>> >>>>>> I'd suggest looking into using Adam Johnson's Django-Upgrade told - >>>>>> https://github.com/adamchainz/django-upgrade it will help you move >>>>>> between versions >>>>>> >>>>>> On Tuesday, 6 June 2023 at 15:24:36 UTC+1 Paul Haguet wrote: >>>>>> >>>>>>> There is a lot of function who can change. >>>>>>> >>>>>>> https://docs.djangoproject.com/en/4.2/releases/4.0/ >>>>>>> >>>>>>> All the function declared as deprecated into Django 3 has been >>>>>>> removed into Django 4. In the deprecated section of django 3 new >>>>>>> functions >>>>>>> names are systematically indicated. So just search the function under >>>>>>> their >>>>>>> old name and replace them with their new name. The 2 links below give >>>>>>> the >>>>>>> list. >>>>>>> >>>>>>> >>>>>>> https://docs.djangoproject.com/en/4.2/releases/3.0/#deprecated-features-3-0 >>>>>>> >>>>>>> https://docs.djangoproject.com/en/4.2/releases/3.1/#deprecated-features-3-1 >>>>>>> >>>>>>> Le samedi 3 juin 2023 à 10:10:31 UTC+2, Shams Ulhaq a écrit : >>>>>>> >>>>>>>> Just need to change url import >>>>>>>> >>>
Re: how to convert to Django 3 or 4
If you want to go directly then start a new project and "lift and shift" code fixing and updating as you go. Depending on the size of the project and the complexity of the processes it may be the fastest way to do it. If you want to keep the same project then upgrade in stages. The fact you're in 1.4 will make it hard and you'll need to do a lot of manual changes to get into 1.8 so starting new may well be quicker. If you did upgrade then I'd go 1.8 to 1.11, 2.2, 3.2 and finally 4.2. Branch the code using version control and see how bad it is but it'll depend on the project. I went from 1.11 to 3.2 in a day for one but most of the code was bespoke without may external packages to worry about. Those could also cause you issues. Since the code is Django 1.4 what version of python is it also using? On Thu, Jun 8, 2023, 21:31 Rogerio Carrasqueira < rogerio.carrasque...@gmail.com> wrote: > So just to undersand, I cannot move directly from 1.4 to 4 I have to do it > in steps, right? > > Thanks > Rogério Carrasqueira > > > > > > Em qui., 8 de jun. de 2023 às 17:01, 'Steven Mapes' via Django users < > django-users@googlegroups.com> escreveu: > >> I've used it to go from Django 3 to 4 and to move a project from 1.11 to >> 2.2. >> >> It doesn't do everything for you but it's a great start. I've personally >> moved from 1.8 through to 4.2.2 but that was during their development >> lifecycle. Moving up to 1.7 and then 1.7 to 1.8 and 1.8 to 1.11 and 1.11 to >> 2 will be the hardest parts but it'll get easier once you're on 1.11 >> >> On Thu, Jun 8, 2023, 19:58 Rogério Carrasqueira < >> rogerio.carrasque...@gmail.com> wrote: >> >>> Hey Steven! >>> >>> Thanks for this information, do you have tried it before? I would like >>> to move from 1.4 to lastest, do you think that is it possible? >>> >>> Thanks >>> >>> Em quarta-feira, 7 de junho de 2023 às 11:52:35 UTC-3, Steven Mapes >>> escreveu: >>> >>>> I'd suggest looking into using Adam Johnson's Django-Upgrade told - >>>> https://github.com/adamchainz/django-upgrade it will help you move >>>> between versions >>>> >>>> On Tuesday, 6 June 2023 at 15:24:36 UTC+1 Paul Haguet wrote: >>>> >>>>> There is a lot of function who can change. >>>>> >>>>> https://docs.djangoproject.com/en/4.2/releases/4.0/ >>>>> >>>>> All the function declared as deprecated into Django 3 has been removed >>>>> into Django 4. In the deprecated section of django 3 new functions names >>>>> are systematically indicated. So just search the function under their old >>>>> name and replace them with their new name. The 2 links below give the >>>>> list. >>>>> >>>>> >>>>> https://docs.djangoproject.com/en/4.2/releases/3.0/#deprecated-features-3-0 >>>>> >>>>> https://docs.djangoproject.com/en/4.2/releases/3.1/#deprecated-features-3-1 >>>>> >>>>> Le samedi 3 juin 2023 à 10:10:31 UTC+2, Shams Ulhaq a écrit : >>>>> >>>>>> Just need to change url import >>>>>> >>>>>> from django.urls import include, re_path as url >>>>>> >>>>>> >>>>>> On Sat, 3 Jun 2023, 12:32 David Nugent, wrote: >>>>>> >>>>>>> nppe url is obsolete and removed in 4.x. >>>>>>> >>>>>>> You can use re_path, which is a kind of replacement but even then >>>>>>> you will need to adjust the regex in many cases. >>>>>>> >>>>>>> The best approach is to understand what the url() is doing, and >>>>>>> replicate the same using path(). Once you do, the conversions should be >>>>>>> more or less straight-forward. Instead of regex you use labelled >>>>>>> patterns >>>>>>> making for more comprehensible path lines. For complex regex expressions >>>>>>> you may need to define custom matches - or "converters" - that enforce >>>>>>> specific patterns allowing you to restrict input and improve matching. >>>>>>> This >>>>>>> is one area that Django has improved really well over time. >>>>>>> >>>>>>> But, like I said, don't try to replace this file wholesale. Instead >>>
Re: how to convert to Django 3 or 4
I've used it to go from Django 3 to 4 and to move a project from 1.11 to 2.2. It doesn't do everything for you but it's a great start. I've personally moved from 1.8 through to 4.2.2 but that was during their development lifecycle. Moving up to 1.7 and then 1.7 to 1.8 and 1.8 to 1.11 and 1.11 to 2 will be the hardest parts but it'll get easier once you're on 1.11 On Thu, Jun 8, 2023, 19:58 Rogério Carrasqueira < rogerio.carrasque...@gmail.com> wrote: > Hey Steven! > > Thanks for this information, do you have tried it before? I would like to > move from 1.4 to lastest, do you think that is it possible? > > Thanks > > Em quarta-feira, 7 de junho de 2023 às 11:52:35 UTC-3, Steven Mapes > escreveu: > >> I'd suggest looking into using Adam Johnson's Django-Upgrade told - >> https://github.com/adamchainz/django-upgrade it will help you move >> between versions >> >> On Tuesday, 6 June 2023 at 15:24:36 UTC+1 Paul Haguet wrote: >> >>> There is a lot of function who can change. >>> >>> https://docs.djangoproject.com/en/4.2/releases/4.0/ >>> >>> All the function declared as deprecated into Django 3 has been removed >>> into Django 4. In the deprecated section of django 3 new functions names >>> are systematically indicated. So just search the function under their old >>> name and replace them with their new name. The 2 links below give the list. >>> >>> >>> https://docs.djangoproject.com/en/4.2/releases/3.0/#deprecated-features-3-0 >>> >>> https://docs.djangoproject.com/en/4.2/releases/3.1/#deprecated-features-3-1 >>> >>> Le samedi 3 juin 2023 à 10:10:31 UTC+2, Shams Ulhaq a écrit : >>> >>>> Just need to change url import >>>> >>>> from django.urls import include, re_path as url >>>> >>>> >>>> On Sat, 3 Jun 2023, 12:32 David Nugent, wrote: >>>> >>>>> nppe url is obsolete and removed in 4.x. >>>>> >>>>> You can use re_path, which is a kind of replacement but even then you >>>>> will need to adjust the regex in many cases. >>>>> >>>>> The best approach is to understand what the url() is doing, and >>>>> replicate the same using path(). Once you do, the conversions should be >>>>> more or less straight-forward. Instead of regex you use labelled patterns >>>>> making for more comprehensible path lines. For complex regex expressions >>>>> you may need to define custom matches - or "converters" - that enforce >>>>> specific patterns allowing you to restrict input and improve matching. >>>>> This >>>>> is one area that Django has improved really well over time. >>>>> >>>>> But, like I said, don't try to replace this file wholesale. Instead of >>>>> converting it and doing error-fix-error-fix ad infinitun, re-implement >>>>> things as you enable parts of the app you have successfully ported. While >>>>> re_path may be a fallback, try to re-implement as path() expressions and >>>>> you'll be better in the long run. >>>>> >>>>> >>>>> On Sat, Jun 3, 2023 at 11:59 AM Muhammad Juwaini Abdul Rahman < >>>>> juw...@gmail.com> wrote: >>>>> >>>>>> I think Django 4 still have backward compatibility with `url` >>>>>> although `path` is preferable. >>>>>> >>>>>> You can try to `runserver` in your local, upgrade your django version >>>>>> in your virtualenv to version 4 and troubleshoot the error messages (if >>>>>> any) one by one. >>>>>> >>>>>> On Sat, 3 Jun 2023 at 05:20, john fabiani >>>>>> wrote: >>>>>> >>>>>>> Hi everyone, >>>>>>> >>>>>>> I am tasked with updating/upgrading a very old Django web site - I >>>>>>> believe it is 1.7. I need convert and need what is required. >>>>>>> Thanks in advance. >>>>>>> >>>>>>> >>>>>>> I need to convert the following: >>>>>>> >>>>>>> from django.conf.urls import patterns, include, url >>>>>>> from django.contrib import admin >>>>>>> from django.conf import settings >>>>>>> from django.conf.urls.static import static >>&
Re: how to convert to Django 3 or 4
I'd suggest looking into using Adam Johnson's Django-Upgrade told -https://github.com/adamchainz/django-upgrade it will help you move between versions On Tuesday, 6 June 2023 at 15:24:36 UTC+1 Paul Haguet wrote: > There is a lot of function who can change. > > https://docs.djangoproject.com/en/4.2/releases/4.0/ > > All the function declared as deprecated into Django 3 has been removed > into Django 4. In the deprecated section of django 3 new functions names > are systematically indicated. So just search the function under their old > name and replace them with their new name. The 2 links below give the list. > > https://docs.djangoproject.com/en/4.2/releases/3.0/#deprecated-features-3-0 > https://docs.djangoproject.com/en/4.2/releases/3.1/#deprecated-features-3-1 > > Le samedi 3 juin 2023 à 10:10:31 UTC+2, Shams Ulhaq a écrit : > >> Just need to change url import >> >> from django.urls import include, re_path as url >> >> >> On Sat, 3 Jun 2023, 12:32 David Nugent, wrote: >> >>> nppe url is obsolete and removed in 4.x. >>> >>> You can use re_path, which is a kind of replacement but even then you >>> will need to adjust the regex in many cases. >>> >>> The best approach is to understand what the url() is doing, and >>> replicate the same using path(). Once you do, the conversions should be >>> more or less straight-forward. Instead of regex you use labelled patterns >>> making for more comprehensible path lines. For complex regex expressions >>> you may need to define custom matches - or "converters" - that enforce >>> specific patterns allowing you to restrict input and improve matching. This >>> is one area that Django has improved really well over time. >>> >>> But, like I said, don't try to replace this file wholesale. Instead of >>> converting it and doing error-fix-error-fix ad infinitun, re-implement >>> things as you enable parts of the app you have successfully ported. While >>> re_path may be a fallback, try to re-implement as path() expressions and >>> you'll be better in the long run. >>> >>> >>> On Sat, Jun 3, 2023 at 11:59 AM Muhammad Juwaini Abdul Rahman < >>> juw...@gmail.com> wrote: >>> >>>> I think Django 4 still have backward compatibility with `url` >>>> although `path` is preferable. >>>> >>>> You can try to `runserver` in your local, upgrade your django version >>>> in your virtualenv to version 4 and troubleshoot the error messages (if >>>> any) one by one. >>>> >>>> On Sat, 3 Jun 2023 at 05:20, john fabiani wrote: >>>> >>>>> Hi everyone, >>>>> >>>>> I am tasked with updating/upgrading a very old Django web site - I >>>>> believe it is 1.7. I need convert and need what is required. >>>>> Thanks in advance. >>>>> >>>>> >>>>> I need to convert the following: >>>>> >>>>> from django.conf.urls import patterns, include, url >>>>> from django.contrib import admin >>>>> from django.conf import settings >>>>> from django.conf.urls.static import static >>>>> >>>>> urlpatterns = patterns('', >>>>> # Examples: >>>>> url(r'reg4/$', 'register.views.reg4', name='reg4'), >>>>> url(r'reg3/$', 'register.views.reg3', name='reg3'), >>>>> url(r'reg2/$', 'register.views.reg2', name='reg2'), >>>>> #url(r'reg1/$', 'register.views.reg1', name='reg1'), >>>>> url(r'reg1/$', 'register.views.reg1', name='reg1'), >>>>> #url(r'^$', 'register.views.home', name='home'), >>>>> url(r'reg/$', 'register.views.home', name='home'), >>>>> url(r'get_courts/(\d+)$', 'register.views.get_courts', >>>>> name='get_courts'), >>>>> url(r'get_courses/(\d+)$', 'register.views.get_courses', >>>>> name='get_courses'), >>>>> url(r'autoschedule/', 'register.views.autoschedule', >>>>> name='autoschedule'), >>>>> url(r'get_cities/(\d+)$', 'register.views.get_cities',
Re: Template doesn't run in browser
If you want someone to spend their time writing a proper answer, start by writing a proper question. Kind regards, Kasper Laudrup -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/a4a8a796-a7de-6f85-1dc4-81909e8211ba%40stacktrace.dk. OpenPGP_0xE5D9CAC64AAA55EB.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature
Re: UPLOAD STATIC FILES
On 29/05/2023 04.24, Obiorah Callistus wrote: please how can i display .css and .js files in my template Have you considered reading the documentation? Kind regards, Kasper Laudrup -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ce267e59-2518-f897-d1b4-be148feaef98%40stacktrace.dk. OpenPGP_0xE5D9CAC64AAA55EB.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature
Re: group by "project"
[ { "project": 1, "date": "2023-05-22", "count": 1 }, { "project": 1, "date": "2023-05-27", "count": 1 } ] throws this response. i want group by project def list(self, request, *args, **kwargs): project_id = self.request.query_params.get('project_id') if project_id: queryset = RegistrationDatesSlots.objects.values('project', 'date').annotate(count=Count('project')).filter(project=project_id) else: queryset = RegistrationDatesSlots.objects.all().values('project', 'date') return Response(queryset) this is the code On Thu, May 25, 2023 at 11:41 AM Helly Modi wrote: > TRY THIS > from django.db.models import Count > > def list(self, request, *args, **kwargs): > project_id = self.request.query_params.get('project_id') > if project_id: > queryset = RegistrationDatesSlots.objects.values('project', > 'date').annotate(count=Count('project')).filter(project=project_id) > else: > queryset = RegistrationDatesSlots.objects.values('project', 'date') > > serialized_data = [] > for item in queryset: > serialized_item = { > 'date': item['date'], > 'project': item['project'] > } > serialized_data.append(serialized_item) > return Response(serialized_data) > > On Thursday, May 25, 2023 at 7:05:38 AM UTC+5:30 Muhammad Juwaini Abdul > Rahman wrote: > >> Do you realize what 'Count' do? >> >> On Thu, 25 May 2023 at 09:20, 'Mohamed Yahiya Shajahan' via Django users < >> django...@googlegroups.com> wrote: >> >>> def list(self, request, *args, **kwargs): >>> project_id = self.request.query_params.get('project_id') >>> if project_id: >>> queryset = RegistrationDatesSlots.objects.values('date'). >>> annotate(project=Count('project')).filter(project=project_id) >>> # queryset = >>> RegistrationDatesSlots.objects.filter(project=project_id).query.group_by=['project'] >>> else: >>> queryset = RegistrationDatesSlots.objects.all().values( >>> 'project', 'date') >>> >>> serialized_data = [] >>> for item in queryset: >>> serialized_item = { >>> 'date': item['date'], >>> 'project': item['project'] >>> } >>> serialized_data.append(serialized_item) >>> return Response(serialized_data) >>> >>> >>> this is my views i want to group by "project" but shows only one record, >>> i know there are multiple records there >>> >>> >>> >>> The content of this email is confidential and intended for the >>> recipient specified in message only. It is strictly forbidden to share any >>> part of this message with any third party, without a written consent of the >>> sender. If you received this message by mistake, please reply to this >>> message and follow with its deletion, so that we can ensure such a mistake >>> does not occur in the future. >>> >>> SAVE PAPER | Good for your planet | Good for your Business >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Django users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to django-users...@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/django-users/016aad73-74fc-49c3-80e7-c8d68ea0a6ddn%40googlegroups.com >>> <https://groups.google.com/d/msgid/django-users/016aad73-74fc-49c3-80e7-c8d68ea0a6ddn%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/28b321b8-4e3b-4fee-a94b-177ab1ba76f0n%40googlegroups.com > <https://groups.google.com/d/msgid/djang
group by "project"
def list(self, request, *args, **kwargs): project_id = self.request.query_params.get('project_id') if project_id: queryset = RegistrationDatesSlots.objects.values('date'). annotate(project=Count('project')).filter(project=project_id) # queryset = RegistrationDatesSlots.objects.filter(project=project_id).query.group_by=['project'] else: queryset = RegistrationDatesSlots.objects.all().values('project', 'date') serialized_data = [] for item in queryset: serialized_item = { 'date': item['date'], 'project': item['project'] } serialized_data.append(serialized_item) return Response(serialized_data) this is my views i want to group by "project" but shows only one record, i know there are multiple records there -- The content of this email is confidential and intended for the recipient specified in message only. It is strictly forbidden to share any part of this message with any third party, without a written consent of the sender. If you received this message by mistake, please reply to this message and follow with its deletion, so that we can ensure such a mistake does not occur in the future. SAVE PAPER | Good for your planet | Good for your Business -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/016aad73-74fc-49c3-80e7-c8d68ea0a6ddn%40googlegroups.com.
Re: I new to Django
On 21/05/2023 16.26, khaled alshadbi wrote: Hello friends please help me to start from scratch... I want to build sales program using Python and Django https://docs.djangoproject.com/en/4.2/intro/ Kind regards, Kasper Laudrup -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/18ff3218-30a3-1b88-3553-2f5cefec5310%40stacktrace.dk. OpenPGP_0xE5D9CAC64AAA55EB.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature
Re: testing newbie - help requested: app works, tests give errors
Hmm, when I remove the raise CommandError statement and replace it with self.stdout.write, everything works well. This helps me to point further studies. Thx! On Wednesday, May 10, 2023 at 2:33:18 PM UTC+2 Bob Aalsma wrote: > Ah, yes, thanks. > > I hesitate to comment on "If I understood the error right." ;) > > Umm, my problem here is that I think I'm using the exact same *code* > "manually" without errors. > I think I'm also using the same *values* for the manual and test runs. > So I don't understand the reason for the differences in output. > > On Wednesday, May 10, 2023 at 2:18:33 PM UTC+2 Vishesh Mangla wrote: > >> If I understood the error right. >> >> On Wed, May 10, 2023 at 5:47 PM Vishesh Mangla >> wrote: >> >>> Probably this would help: >>> https://stackoverflow.com/questions/8609192/what-is-the-difference-between-null-true-and-blank-true-in-django >>> >>> On Wed, May 10, 2023 at 5:45 PM 'Bob Aalsma' via Django users < >>> django...@googlegroups.com> wrote: >>> >>>> Sorry Vishesh, thanks for the quick answer but I have no idea what you >>>> mean. >>>> >>>> On Wednesday, May 10, 2023 at 2:00:51 PM UTC+2 Vishesh Mangla wrote: >>>> >>>>> False or True check for yourself. >>>>> >>>>> On Wed, 10 May, 2023, 17:29 Vishesh Mangla, >>>>> wrote: >>>>> >>>>>> It looks like you are passing a null but null=False is not set >>>>>> >>>>>> On Wed, 10 May, 2023, 17:27 'Bob Aalsma' via Django users, < >>>>>> django...@googlegroups.com> wrote: >>>>>> >>>>>>> I'm trying to test a django-admin command and don't understand why >>>>>>> the tests give errors on the code while the code works as expected. >>>>>>> >>>>>>> I'm under the impression that the *raise CommandError* is ignored >>>>>>> by the test, but don't understand why this would be. >>>>>>> >>>>>>> Please help. >>>>>>> >>>>>>> Running the code shows: >>>>>>> >>>>>>> (.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py >>>>>>> populate_source 0 >>>>>>> >>>>>>> *CommandError: Alleen hele getallen > 0 toegestaan* >>>>>>> >>>>>>> (.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py >>>>>>> populate_source 1 >>>>>>> >>>>>>> *Teksten zijn gegenereerd voor tekstlengte 1* >>>>>>> >>>>>>> (.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py >>>>>>> populate_source 1 >>>>>>> >>>>>>> *CommandError: Teksten voor nummer 1 zijn al eerder gegenereerd* >>>>>>> >>>>>>> (.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py >>>>>>> populate_source 7 >>>>>>> >>>>>>> *CommandError: Opgegeven sleutel 7 niet gevonden* >>>>>>> >>>>>>> Running the tests shows >>>>>>> >>>>>>> (.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py >>>>>>> test tests.test_sources_app_command_populate >>>>>>> >>>>>>> Found 3 test(s). >>>>>>> >>>>>>> Creating test database for alias 'default'... >>>>>>> >>>>>>> System check identified no issues (0 silenced). >>>>>>> >>>>>>> EEE >>>>>>> >>>>>>> >>>>>>> == >>>>>>> >>>>>>> ERROR: test_command_output_been_there >>>>>>> (tests.test_sources_app_command_populate.PopulateSourceTests.test_command_output_been_there) >>>>>>> >>>>>>> Test for failure: in_use = True. >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> >>>>>>> Traceback (most recent call last): >>>>>>> >>>&g
Re: testing newbie - help requested: app works, tests give errors
Ah, yes, thanks. I hesitate to comment on "If I understood the error right." ;) Umm, my problem here is that I think I'm using the exact same *code* "manually" without errors. I think I'm also using the same *values* for the manual and test runs. So I don't understand the reason for the differences in output. On Wednesday, May 10, 2023 at 2:18:33 PM UTC+2 Vishesh Mangla wrote: > If I understood the error right. > > On Wed, May 10, 2023 at 5:47 PM Vishesh Mangla > wrote: > >> Probably this would help: >> https://stackoverflow.com/questions/8609192/what-is-the-difference-between-null-true-and-blank-true-in-django >> >> On Wed, May 10, 2023 at 5:45 PM 'Bob Aalsma' via Django users < >> django...@googlegroups.com> wrote: >> >>> Sorry Vishesh, thanks for the quick answer but I have no idea what you >>> mean. >>> >>> On Wednesday, May 10, 2023 at 2:00:51 PM UTC+2 Vishesh Mangla wrote: >>> >>>> False or True check for yourself. >>>> >>>> On Wed, 10 May, 2023, 17:29 Vishesh Mangla, >>>> wrote: >>>> >>>>> It looks like you are passing a null but null=False is not set >>>>> >>>>> On Wed, 10 May, 2023, 17:27 'Bob Aalsma' via Django users, < >>>>> django...@googlegroups.com> wrote: >>>>> >>>>>> I'm trying to test a django-admin command and don't understand why >>>>>> the tests give errors on the code while the code works as expected. >>>>>> >>>>>> I'm under the impression that the *raise CommandError* is ignored by >>>>>> the test, but don't understand why this would be. >>>>>> >>>>>> Please help. >>>>>> >>>>>> Running the code shows: >>>>>> >>>>>> (.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py >>>>>> populate_source 0 >>>>>> >>>>>> *CommandError: Alleen hele getallen > 0 toegestaan* >>>>>> >>>>>> (.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py >>>>>> populate_source 1 >>>>>> >>>>>> *Teksten zijn gegenereerd voor tekstlengte 1* >>>>>> >>>>>> (.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py >>>>>> populate_source 1 >>>>>> >>>>>> *CommandError: Teksten voor nummer 1 zijn al eerder gegenereerd* >>>>>> >>>>>> (.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py >>>>>> populate_source 7 >>>>>> >>>>>> *CommandError: Opgegeven sleutel 7 niet gevonden* >>>>>> >>>>>> Running the tests shows >>>>>> >>>>>> (.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py >>>>>> test tests.test_sources_app_command_populate >>>>>> >>>>>> Found 3 test(s). >>>>>> >>>>>> Creating test database for alias 'default'... >>>>>> >>>>>> System check identified no issues (0 silenced). >>>>>> >>>>>> EEE >>>>>> >>>>>> == >>>>>> >>>>>> ERROR: test_command_output_been_there >>>>>> (tests.test_sources_app_command_populate.PopulateSourceTests.test_command_output_been_there) >>>>>> >>>>>> Test for failure: in_use = True. >>>>>> >>>>>> ------ >>>>>> >>>>>> Traceback (most recent call last): >>>>>> >>>>>> File >>>>>> "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/backends/utils.py", >>>>>> >>>>>> line 89, in _execute >>>>>> >>>>>> return self.cursor.execute(sql, params) >>>>>> >>>>>> >>>>>> >>>>>> File >>>>>> "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/backends/sqlite3/base.py", >>>>>> &g
Re: testing newbie - help requested: app works, tests give errors
Sorry Vishesh, thanks for the quick answer but I have no idea what you mean. On Wednesday, May 10, 2023 at 2:00:51 PM UTC+2 Vishesh Mangla wrote: > False or True check for yourself. > > On Wed, 10 May, 2023, 17:29 Vishesh Mangla, wrote: > >> It looks like you are passing a null but null=False is not set >> >> On Wed, 10 May, 2023, 17:27 'Bob Aalsma' via Django users, < >> django...@googlegroups.com> wrote: >> >>> I'm trying to test a django-admin command and don't understand why the >>> tests give errors on the code while the code works as expected. >>> >>> I'm under the impression that the *raise CommandError* is ignored by >>> the test, but don't understand why this would be. >>> >>> Please help. >>> >>> Running the code shows: >>> >>> (.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py >>> populate_source 0 >>> >>> *CommandError: Alleen hele getallen > 0 toegestaan* >>> >>> (.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py >>> populate_source 1 >>> >>> *Teksten zijn gegenereerd voor tekstlengte 1* >>> >>> (.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py >>> populate_source 1 >>> >>> *CommandError: Teksten voor nummer 1 zijn al eerder gegenereerd* >>> >>> (.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py >>> populate_source 7 >>> >>> *CommandError: Opgegeven sleutel 7 niet gevonden* >>> >>> Running the tests shows >>> >>> (.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py test >>> tests.test_sources_app_command_populate >>> >>> Found 3 test(s). >>> >>> Creating test database for alias 'default'... >>> >>> System check identified no issues (0 silenced). >>> >>> EEE >>> >>> == >>> >>> ERROR: test_command_output_been_there >>> (tests.test_sources_app_command_populate.PopulateSourceTests.test_command_output_been_there) >>> >>> Test for failure: in_use = True. >>> >>> -- >>> >>> Traceback (most recent call last): >>> >>> File >>> "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/backends/utils.py", >>> >>> line 89, in _execute >>> >>> return self.cursor.execute(sql, params) >>> >>> >>> >>> File >>> "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/backends/sqlite3/base.py", >>> >>> line 328, in execute >>> >>> return super().execute(query, params) >>> >>> ^^ >>> >>> sqlite3.IntegrityError: NOT NULL constraint failed: >>> domain_sources_app_characternumber.number_of_combinations >>> >>> >>> The above exception was the direct cause of the following exception: >>> >>> >>> Traceback (most recent call last): >>> >>> File >>> "/Users/werker/Projects/domain_reader/tests/test_sources_app_command_populate.py", >>> >>> line 30, in test_command_output_been_there >>> >>> thingy.save() >>> >>> File >>> "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/models/base.py", >>> >>> line 814, in save >>> >>> self.save_base( >>> >>> File >>> "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/models/base.py", >>> >>> line 877, in save_base >>> >>> updated = self._save_table( >>> >>> ^ >>> >>> File >>> "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/models/base.py", >>> >>> line 1020, in _save_table >>> >>> results = self._do_insert( >>> >>> ^^^^ >>> >>> File >>> "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/models/base.py", >>>
testing newbie - help requested: app works, tests give errors
I'm trying to test a django-admin command and don't understand why the tests give errors on the code while the code works as expected. I'm under the impression that the *raise CommandError* is ignored by the test, but don't understand why this would be. Please help. Running the code shows: (.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py populate_source 0 *CommandError: Alleen hele getallen > 0 toegestaan* (.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py populate_source 1 *Teksten zijn gegenereerd voor tekstlengte 1* (.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py populate_source 1 *CommandError: Teksten voor nummer 1 zijn al eerder gegenereerd* (.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py populate_source 7 *CommandError: Opgegeven sleutel 7 niet gevonden* Running the tests shows (.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py test tests.test_sources_app_command_populate Found 3 test(s). Creating test database for alias 'default'... System check identified no issues (0 silenced). EEE == ERROR: test_command_output_been_there (tests.test_sources_app_command_populate.PopulateSourceTests.test_command_output_been_there) Test for failure: in_use = True. -- Traceback (most recent call last): File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/backends/utils.py", line 89, in _execute return self.cursor.execute(sql, params) File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/backends/sqlite3/base.py", line 328, in execute return super().execute(query, params) ^^ sqlite3.IntegrityError: NOT NULL constraint failed: domain_sources_app_characternumber.number_of_combinations The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/Users/werker/Projects/domain_reader/tests/test_sources_app_command_populate.py", line 30, in test_command_output_been_there thingy.save() File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/models/base.py", line 814, in save self.save_base( File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/models/base.py", line 877, in save_base updated = self._save_table( ^ File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/models/base.py", line 1020, in _save_table results = self._do_insert( ^^^^ File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/models/base.py", line 1061, in _do_insert return manager._insert( ^^^^ File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/models/manager.py", line 87, in manager_method return getattr(self.get_queryset(), name)(*args, **kwargs) ^^^ File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/models/query.py", line 1805, in _insert return query.get_compiler(using=using).execute_sql(returning_fields) ^^^^^ File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/models/sql/compiler.py", line 1820, in execute_sql cursor.execute(sql, params) File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/backends/utils.py", line 67, in execute return self._execute_with_wrappers( File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/backends/utils.py", line 80, in _execute_with_wrappers return executor(sql, params, many, context) File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/backends/utils.py", line 84, in _execute with self.db.wrap_database_errors: File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/utils.py", line 91, in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value File "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/backends/utils.py", line 89, in _execute return self.cursor.execute(sql, params) ^
Re: I need to create account using sso Google in Django rest framework Amy suggestions?
On 04/05/2023 16.33, carlos wrote: Try this tuto https://episyche.com/blog/how-to-configure-google-sso-in-django-rest-framework-with-react <https://episyche.com/blog/how-to-configure-google-sso-in-django-rest-framework-with-react> I'm not the one having problems finding tutorials on the internet but thanks anyway. Kind regards, Kasper Laudrup -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f207938c-3899-3be7-dc9e-18a2a5e3bbcc%40stacktrace.dk. OpenPGP_0xE5D9CAC64AAA55EB.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature
Re: I need to create account using sso Google in Django rest framework Amy suggestions?
Maybe this would be a start: https://googlethatforyou.com?q=create%20account%20using%20sso%20Google%20in%20Django%20rest%20framework -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/e1fb705e-759b-126a-152c-cc5625d31e50%40stacktrace.dk. OpenPGP_0xE5D9CAC64AAA55EB.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature
Re: I have a problem with visual studio code
On 02/05/2023 16.56, Stan Hiebah wrote: Can i have a solution for this? If you want someone to take the time to write a proper answer, take the time to write a proper question. Posting a screenshot is not a proper question. No one is able to guess what you're trying to do, what your setup is etc. This is meant to help you. Kind regards, Kasper Laudrup -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/a1762195-8a97-4a6d-3b8e-a2a720234de8%40stacktrace.dk.
Re: Django forms data save using ajax
On 15/04/2023 12.31, Prashanth Patelc wrote: Hi all, How to save employees information using ajax with django form , id should automatic generation ? Try this helpful link: https://googlethatforyou.com?q=django%20ajax%20form Kind regards, Kasper Laudrup -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b804c267-01fe-4d49-297e-842ff215f564%40stacktrace.dk. OpenPGP_0xE5D9CAC64AAA55EB.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature
Re: Django urls error
On 14/04/2023 21.48, lalit upadhyay wrote: * I have copied my code here. The code is from a project called "myproject" Plz fix this error: The error is from a project called "Tesing". You can ignore all other answers you've been given so far until you figure out how that could be. Kind regards, Kasper Laudrup -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5844b278-648a-794d-55b2-45bf980c8948%40stacktrace.dk. OpenPGP_0xE5D9CAC64AAA55EB.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature
Re: Report a Django bug how
On 14/04/2023 10.17, WILSON TALENGA wrote: Hey guys, i need help, i have created my django project, added students to the system as admin but they don't reflect when i run the server. what could the issue be. below is views.py and index.html Start a new thread instead of replying to a totally unrelated thread. Kind regards, Kasper Laudrup -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/9f20b0bd-b364-46a7-52bc-c1459fc2f566%40stacktrace.dk. OpenPGP_0xE5D9CAC64AAA55EB.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature
Re: Report a Django bug how
On 14/04/2023 01.06, Michael Starr wrote: Hi, I double checked my code and Django is not displaying images. I'd like to report the bug but I need to be a django employee to do that. So, if anyone knows anyone on linkedin that works for django, tell them images don't display (on an operating system). It is extremely unlikely that the reason you cannot get your code to work is caused by a bug in Django. But anyone can open a bug report here: https://docs.djangoproject.com/en/dev/internals/contributing/bugs-and-features/ I don't know what makes you think you have to be a "Django employee" (whatever that is). Be prepared to create a proper bug report with a minimal example showing what you assume to be a bug in Django. Doing so will hopefully make you realize it's a bug in your code and not Django. Good luck and king regards, Kasper Laudrup -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/56b206a9-a244-e524-ac32-f3ccb79a4a91%40stacktrace.dk. OpenPGP_0xE5D9CAC64AAA55EB.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature
Re: Migration running in shell, but no change in DB
So, I put this at the start of my router.py: import logging logger = logging.getLogger(__name__) I have never used that, but I hope it is right. Then below at the app's router and the allow_migrate def I did this: def allow_migrate(self, db, app_label, model_name=None, **hints): if app_label == 'app_name': logger.info("case A") return db == 'db_app_name' else: logger.info("case B") return None Then I returned to the shell and I also reverted to the previous migration. Then I entered python3 manage.py migrate app_name Operations to perform: Apply all migrations: app_name Running migrations: Applying app_name.0037_auto_20230406_1837... OK Again I turned to phpymadmin and saw that neither the apps db had changed or that there was an entry in app's db table for django_migrations. On the contrary there was a new entry in the django_migrations table of the default db. Does this help? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/a61b16c8-c9c9-42fb-94be-bb1d9be06ebfn%40googlegroups.com.
Re: Migration running in shell, but no change in DB
Yes I will do that. In the meantime I tried this and that and saw that the migrations do not lead to new tables in the database, but the entries appear in the default db's django_migrations table and not in the one of this app. On Thursday, April 6, 2023 at 6:13:01 PM UTC+2 Jason wrote: > you said you have a router.py file in your project? put it in there. > > On Thursday, April 6, 2023 at 10:50:15 AM UTC-4 Martin Heitmann wrote: > >> Dear Jason >> >> db per project/app: Okay, I will keep that in mind for the future. I just >> thought that it would be a cleaner way when each db and app would serve a >> single purpose >> >> logging: I am sorry, but I have to ask again, where do I put that what >> you wrote ( logger.info("db does not match db app name"), or raise >> Exception("db does not match app name"))? Does this belong in the router.py >> or migration file or another place? >> Best regards >> Martin >> >> On Wednesday, April 5, 2023 at 9:40:27 PM UTC+2 Jason wrote: >> >>> ahhh, no not at all. One db per project, yes. Application, no. That's >>> really expanding complexity. If you need that requirement, that's one >>> thing, but its something you really should have an explicit requirement for >>> before designing. >>> >>> As far as the second question, no not at all. Just add logging there, >>> or raise an exception >>> >>> ie, logger.info("db does not match db app name"), or raise >>> Exception("db does not match app name") >>> >>> On Wednesday, April 5, 2023 at 12:45:01 PM UTC-4 Martin Heitmann wrote: >>> >>>> Dear Jason >>>> >>>> Thanks for all your effort. >>>> >>>> Yes, I have one db per application. Isn't that a way to keep the >>>> databases clean and strictly focused on one purpose? Thought that that >>>> would be a good idea. Regarding the router.py: It worked for quite a >>>> while, >>>> but I am not sure if I made changes to it previous to the first occurence >>>> of the problem. But should it not work when every router has an entry like >>>> this: >>>> >>>> def allow_migrate(self, db, app_label, model_name=None, **hints): >>>> if app_label == 'app_name': >>>> return db == 'db_app_name' >>>> return None >>>> >>>> You wrote "What happens when you put some logging there, or raise an >>>> exception on None/False? ". I would love to do that but I do not know, >>>> where I must put that. I guess I must find some place in the code that >>>> calls allow_migrate and check what the return value is, right? >>>> >>>> On Wednesday, April 5, 2023 at 12:54:58 PM UTC+2 Jason wrote: >>>> >>>>> so, for your original boolean migration, >>>>> >>>>> https://code.djangoproject.com/ticket/470 >>>>> >>>>> https://stackoverflow.com/questions/32280343/default-value-of-djangos-model-doesnt-appear-in-sql >>>>> >>>>> Adding a default value doesn't go to SQL, although there's work in the >>>>> django ticket above. So its inserted via app code and the original >>>>> question might have been a red herring and the actual issue is your >>>>> CreateModel is never applied. >>>>> >>>>> ouch, you have one db per application? that could likely be it, when >>>>> was this routing put in place? Did it exist before the last working >>>>> migration on this project? Reason I ask, >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> *python3 manage.py sqlmigrate ObjPLW2 0037 --database=db_obj_plw2 >>>>> Create model Wartungsarbeit--CREATE TABLE `ObjPLW2_wartungsarbeit` (`id` >>>>> integer AUTO_INCREMENT NOT NULL PRIMARY KEY, `wa_titel` varchar(201) NOT >>>>> NULL, `wa_beschreibung` longtext NOT NULL, `wa_turnus` integer UNSIGNED >>>>> NOT >>>>> NULL CHECK (`wa_turnus` >= 0), `wa_startdatum` date NOT NULL, >>>>> `wa_erstelldatum` datetime(6) NOT NULL, `wa_bearbeitungsdatum` >>>>> datetime(6) >>>>> NOT NULL);* >>>>> >>>>> is vaid SQL and that's what django would send to your db. So
Re: Migration running in shell, but no change in DB
Dear Jason db per project/app: Okay, I will keep that in mind for the future. I just thought that it would be a cleaner way when each db and app would serve a single purpose logging: I am sorry, but I have to ask again, where do I put that what you wrote ( logger.info("db does not match db app name"), or raise Exception("db does not match app name"))? Does this belong in the router.py or migration file or another place? Best regards Martin On Wednesday, April 5, 2023 at 9:40:27 PM UTC+2 Jason wrote: > ahhh, no not at all. One db per project, yes. Application, no. That's > really expanding complexity. If you need that requirement, that's one > thing, but its something you really should have an explicit requirement for > before designing. > > As far as the second question, no not at all. Just add logging there, or > raise an exception > > ie, logger.info("db does not match db app name"), or raise Exception("db > does not match app name") > > On Wednesday, April 5, 2023 at 12:45:01 PM UTC-4 Martin Heitmann wrote: > >> Dear Jason >> >> Thanks for all your effort. >> >> Yes, I have one db per application. Isn't that a way to keep the >> databases clean and strictly focused on one purpose? Thought that that >> would be a good idea. Regarding the router.py: It worked for quite a while, >> but I am not sure if I made changes to it previous to the first occurence >> of the problem. But should it not work when every router has an entry like >> this: >> >> def allow_migrate(self, db, app_label, model_name=None, **hints): >> if app_label == 'app_name': >> return db == 'db_app_name' >> return None >> >> You wrote "What happens when you put some logging there, or raise an >> exception on None/False? ". I would love to do that but I do not know, >> where I must put that. I guess I must find some place in the code that >> calls allow_migrate and check what the return value is, right? >> >> On Wednesday, April 5, 2023 at 12:54:58 PM UTC+2 Jason wrote: >> >>> so, for your original boolean migration, >>> >>> https://code.djangoproject.com/ticket/470 >>> >>> https://stackoverflow.com/questions/32280343/default-value-of-djangos-model-doesnt-appear-in-sql >>> >>> Adding a default value doesn't go to SQL, although there's work in the >>> django ticket above. So its inserted via app code and the original >>> question might have been a red herring and the actual issue is your >>> CreateModel is never applied. >>> >>> ouch, you have one db per application? that could likely be it, when >>> was this routing put in place? Did it exist before the last working >>> migration on this project? Reason I ask, >>> >>> >>> >>> >>> >>> >>> >>> *python3 manage.py sqlmigrate ObjPLW2 0037 --database=db_obj_plw2 >>> Create model Wartungsarbeit--CREATE TABLE `ObjPLW2_wartungsarbeit` (`id` >>> integer AUTO_INCREMENT NOT NULL PRIMARY KEY, `wa_titel` varchar(201) NOT >>> NULL, `wa_beschreibung` longtext NOT NULL, `wa_turnus` integer UNSIGNED NOT >>> NULL CHECK (`wa_turnus` >= 0), `wa_startdatum` date NOT NULL, >>> `wa_erstelldatum` datetime(6) NOT NULL, `wa_bearbeitungsdatum` datetime(6) >>> NOT NULL);* >>> >>> is vaid SQL and that's what django would send to your db. So if its not >>> being applied, the allow_migrate might be at cause here. What happens when >>> you put some logging there, or raise an exception on None/False? The docs >>> at >>> https://docs.djangoproject.com/en/4.1/topics/db/multi-db/#allow_migrate >>> state >>> >>> >>> *makemigrations always creates migrations for model changes, but if >>> allow_migrate() returns False, any migration operations for the model_name >>> will be silently skipped when running migrate on the db. * >>> >>> >>> On Wednesday, April 5, 2023 at 1:52:12 AM UTC-4 Martin Heitmann wrote: >>> >>>> Dear Jason >>>> >>>> Thanks for your reply. I am not absolulety sure what this question >>>> means "What specifically was the changeset occurring and what isn't? ", >>>> but >>>> I try to answer it the best way I can. I worked on the app quite a while >>>> ago and back then everything seemed to work. As far as I can understand my >>>> own steps back then I
Re: Migration running in shell, but no change in DB
Dear Jason Thanks for all your effort. Yes, I have one db per application. Isn't that a way to keep the databases clean and strictly focused on one purpose? Thought that that would be a good idea. Regarding the router.py: It worked for quite a while, but I am not sure if I made changes to it previous to the first occurence of the problem. But should it not work when every router has an entry like this: def allow_migrate(self, db, app_label, model_name=None, **hints): if app_label == 'app_name': return db == 'db_app_name' return None You wrote "What happens when you put some logging there, or raise an exception on None/False? ". I would love to do that but I do not know, where I must put that. I guess I must find some place in the code that calls allow_migrate and check what the return value is, right? On Wednesday, April 5, 2023 at 12:54:58 PM UTC+2 Jason wrote: > so, for your original boolean migration, > > https://code.djangoproject.com/ticket/470 > > https://stackoverflow.com/questions/32280343/default-value-of-djangos-model-doesnt-appear-in-sql > > Adding a default value doesn't go to SQL, although there's work in the > django ticket above. So its inserted via app code and the original > question might have been a red herring and the actual issue is your > CreateModel is never applied. > > ouch, you have one db per application? that could likely be it, when was > this routing put in place? Did it exist before the last working migration > on this project? Reason I ask, > > > > > > > > *python3 manage.py sqlmigrate ObjPLW2 0037 --database=db_obj_plw2 > Create model Wartungsarbeit--CREATE TABLE `ObjPLW2_wartungsarbeit` (`id` > integer AUTO_INCREMENT NOT NULL PRIMARY KEY, `wa_titel` varchar(201) NOT > NULL, `wa_beschreibung` longtext NOT NULL, `wa_turnus` integer UNSIGNED NOT > NULL CHECK (`wa_turnus` >= 0), `wa_startdatum` date NOT NULL, > `wa_erstelldatum` datetime(6) NOT NULL, `wa_bearbeitungsdatum` datetime(6) > NOT NULL);* > > is vaid SQL and that's what django would send to your db. So if its not > being applied, the allow_migrate might be at cause here. What happens when > you put some logging there, or raise an exception on None/False? The docs > at https://docs.djangoproject.com/en/4.1/topics/db/multi-db/#allow_migrate > state > > > *makemigrations always creates migrations for model changes, but if > allow_migrate() returns False, any migration operations for the model_name > will be silently skipped when running migrate on the db. * > > > On Wednesday, April 5, 2023 at 1:52:12 AM UTC-4 Martin Heitmann wrote: > >> Dear Jason >> >> Thanks for your reply. I am not absolulety sure what this question means >> "What specifically was the changeset occurring and what isn't? ", but I try >> to answer it the best way I can. I worked on the app quite a while ago and >> back then everything seemed to work. As far as I can understand my own >> steps back then I tried to alter only one field. >> >> extract from migrations file: >> migrations.AlterField( >> model_name='waeschepaket', >> name='w_bezahlt', >> field=models.BooleanField(choices=[(False, 'Nein'), (True, >> 'Ja')], default=False), >> ), >> >> Here is a small screenshot from phpmyadmin >> [image: field.png] >> I guess that if that field alteration would have worked than the default >> value should be False or something else but not None. >> >> Then I guess that I forgot about it and just worked with app as it was >> for more than a year and now I wanted to add a new model: >> >> operations = [ >> migrations.CreateModel( >> name='Wartungsarbeit', >> fields=[ >> ('id', models.AutoField(auto_created=True, >> primary_key=True, serialize=False, verbose_name='ID')), >> ('wa_titel', models.CharField(max_length=201)), >> ('wa_beschreibung', models.TextField()), >> ('wa_turnus', models.PositiveIntegerField(default=1)), >> ('wa_startdatum', >> models.DateField(default=django.utils.timezone.now)), >> ('wa_erstelldatum', >> models.DateTimeField(auto_now_add=True)), >> ('wa_bearbeitungsdatum', >> models.DateTimeField(auto_now=True)), >> ], >> ), >> >> But this does not show up in any way. During the la
Re: How to get data from another function in view to show it on template ?
On 03/04/2023 18.44, Ravindra Magar wrote: How to get data from another function in view to show it on a template? You call the function like you'd call any other function and pass the data in the context given to the template you want to render. Kind regards. Kasper Laudrup -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b1c48f6f-5a54-796b-2ab0-d51b3da5ea11%40stacktrace.dk. OpenPGP_0xE5D9CAC64AAA55EB.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature
Django Admin does not use `get_FOO_display`
I had a model having a field that uses Choices status = FSMField(default=STATUSES.PENDING, choices=STATUSES, protected=True) I did override the `get_status_display ` and its effect was not applied in the Django admin I looked up Django code and found ``` def display_for_field(value, field, empty_value_display): from django.contrib.admin.templatetags.admin_list import _boolean_icon if getattr(field, "flatchoices", None): return dict(field.flatchoices).get(value, empty_value_display) ``` I changed it to use get_FOO_display and it worked, my question is why does it have this behavior? and how in my application can I make use of this? Thank you. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/7dabd818-4b70-409e-8af3-482deb3an%40googlegroups.com.
Re: Django error while running
That worked for me Thanks! El lunes, 27 de marzo de 2023 a las 20:02:03 UTC+2, Makan Dianka escribió: > Run this command> pip install -r requirements.txt > > Le mercredi 22 mars 2023 à 13:53:15 UTC+1, James Kalu a écrit : > >> I think it ushould be 'rest_framework' in settings.py under installed >> apps. >> >> >> On Wednesday, March 22, 2023 at 4:50:30 AM UTC+3 David Nugent wrote: >> >>> Any traceback with this at the end: >>> >>> _bootstrap._gcd_import(name[level..], package, level) >>> >>> Is almost always is due to a problem with your settings INSTALLED_APPS, >>> particularly if django\apps\registry.py Is further up the trace. >>> >>> A missing comma between items, perhaps? >>> >>> It would indeed be nice if Django would output a more sensible error >>> message for issues like this 😀 >>> Hmm, an idea for a useful PR right there. Seems to be common issue >>> (since the very next message I read in this mail list is exactly the same >>> thing). >>> >>> Regards, >>> David >>> >>> >>> "Chandresh . T" writes >>> >>> Recently I was running a git clone ( >>> https://github.com/divanov11/StudyBud.git) >>> >>> after doing required steps like migrations, etc. I started to run it by >>> (python manage.py runserver) but I got this error. >>> >>> can anyone help me with this, please? >>> >>> >>> >>> -- "Este mensaje está dirigido de manera exclusiva a su destinatario y puede contener información privada y confidencial. No lo reenvíe, copie o distribuya a terceros que no deban conocer su contenido. En caso de haberlo recibido por error, rogamos lo notifique al remitente y proceda a su borrado, así como al de cualquier documento que pudiera adjuntarse. Por favor tenga en cuenta que los correos enviados vía Internet no permiten garantizar la confidencialidad de los mensajes ni su transmisión de forma íntegra. Las opiniones expresadas en el presente correo pertenecen únicamente al remitente y no representan necesariamente la opinión del Grupo BBVA." "This message is intended exclusively for the adressee and may contain privileged and confidential information. Please, do not disseminate, copy or distribute it to third parties who should not receive it. In case you have received it by mistake, please inform the sender and delete the message and attachments from your system. Please keep in mind that e-mails sent by Internet do not allow to guarantee neither the confidentiality or the integrity of the messages sent." -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/2f9f092f-eec3-4606-b4fc-35a0699ac402n%40googlegroups.com.
Re: Migration running in shell, but no change in DB
A little PS: I logged in via phpmyadmin and saw that my user has all privileges. So this should not be the source of the problem. On Saturday, April 1, 2023 at 8:07:57 PM UTC+2 Martin Heitmann wrote: > I have a little update, but not a solution. Adding the database to > sqlmigrate will give me the SQL command, but nothing more: > > python3 manage.py sqlmigrate ObjPLW2 0037 --database=db_obj_plw2 > > -- > -- Create model Wartungsarbeit > -- > CREATE TABLE `ObjPLW2_wartungsarbeit` (`id` integer AUTO_INCREMENT NOT > NULL PRIMARY KEY, `wa_titel` varchar(201) NOT NULL, `wa_beschreibung` > longtext NOT NULL, `wa_turnus` integer UNSIGNED NOT NULL CHECK (`wa_turnus` > >= 0), `wa_startdatum` date NOT NULL, `wa_erstelldatum` datetime(6) NOT > NULL, `wa_bearbeitungsdatum` datetime(6) NOT NULL); > > -- > -- Alter field w_bezahlt on waeschepaket > -- > > And for whatever reason it includes only the table creation and not the > change in the other field. > On Saturday, April 1, 2023 at 7:46:51 PM UTC+2 Martin Heitmann wrote: > >> Dear Jason >> >> I went two migration steps back, then again I did makemigrations and then >> I went for sqlmigrate. This was the output: >> python3 manage.py sqlmigrate ObjPLW2 0037 >> -- >> -- Create model Wartungsarbeit >> -- >> -- >> -- Alter field w_bezahlt on waeschepaket >> -- >> It does not include any SQL. >> >> Does anyone know where this is no SQL in the output? >> >> On Saturday, April 1, 2023 at 3:46:41 PM UTC+2 Martin Heitmann wrote: >> >>> Dear Jason >>> Thanks for your reply. I will gladly do that. This is the latest >>> migration file: >>> >>> # Generated by Django 3.2.10 on 2023-04-01 13:45 >>> >>> from django.db import migrations, models >>> import django.utils.timezone >>> >>> >>> class Migration(migrations.Migration): >>> >>> dependencies = [ >>> ('ObjPLW2', '0037_alter_waeschepaket_w_bezahlt'), >>> ] >>> >>> operations = [ >>> migrations.CreateModel( >>> name='Wartungsarbeit', >>> fields=[ >>> ('id', models.AutoField(auto_created=True, >>> primary_key=True, serialize=False, verbose_name='ID')), >>> ('wa_titel', models.CharField(max_length=201)), >>> ('wa_beschreibung', models.TextField()), >>> ('wa_turnus', models.PositiveIntegerField(default=1)), >>> ('wa_startdatum', >>> models.DateField(default=django.utils.timezone.now)), >>> ('wa_erstelldatum', >>> models.DateTimeField(auto_now_add=True)), >>> ('wa_bearbeitungsdatum', >>> models.DateTimeField(auto_now=True)), >>> ], >>> ), >>> ] >>> >>> Does this help? >>> On Saturday, April 1, 2023 at 1:55:00 PM UTC+2 Jason wrote: >>> >>>> part of getting effective help is sharing how you're doing things and >>>> the code. for example, sharing the migration generated would be helpful. >>>> you do have the context of how and what is being executed, we don't, so >>>> sharing that with your original questions is a big part in getting >>>> effective help >>>> On Saturday, April 1, 2023 at 4:08:06 AM UTC-4 Martin Heitmann wrote: >>>> >>>>> The migrations do not show up in the django_mirations table. The >>>>> problem must occur earlier. >>>>> On Saturday, April 1, 2023 at 8:42:20 AM UTC+2 David Nugent wrote: >>>>> >>>>>> I would check in the django_migrations table to ensure that the >>>>>> migration has successfully been run. >>>>>> >>>>>> >>>>>> >>>>>> From: 'Martin Heitmann' via Django users >>>>>> Reply: django...@googlegroups.com >>>>>> Date: 31 March 2023 at 19:46:02 >>>>>> To: Django users >>>>>> Subject: Migration running in shell, but no change in DB >>>>>> >>>>>> Hello everyone >>>>>>> >>>>>>> I have a project with multiple apps in it. As database I use >>>>>>> MariaDB. Have not touched it for a while, but now I had to add a field >>>>>>> to &g
I am struggling with calling consumer.py function from views to consumer in django here ismy code. Please help me. I am calling Asyncwebsocketconsumer
from channels.generic.websocket import AsyncWebsocketConsumer import json class MyConsumer(AsyncWebsocketConsumer): async def connect(self): self.room_group_name = 'kafka' # Join room group await self.channel_layer.group_add( self.room_group_name, self.channel_name ) await self.accept() async def disconnect(self, close_code): # Leave room group await self.channel_layer.group_discard( self.room_group_name, self.channel_name ) # Receive message from WebSocket async def receive(self, text_data): text_data_json = json.loads(text_data) message = text_data_json['message'] # Send message to room group await self.channel_layer.group_send( self.room_group_name, { 'type': 'kafka_message', 'message': message } ) # Receive message from room group async def kafka_message(self, event): message = event['message'] print('HERE') # Send message to WebSocket await self.send(text_data=json.dumps({ 'message': message })) views.py from channels.layers import get_channel_layer from asgiref.sync import async_to_sync, sync_to_async from django.contrib.auth.decorators import login_required from django.template import loader from .models import artifactInfo from django.shortcuts import render from django.http import HttpResponse, HttpResponseNotFound, JsonResponse import os, mimetypes, json from .logic import send_message import logging logger = logging.getLogger(__name__) def testview(request): channel_layer = get_channel_layer() async_to_sync(channel_layer.group_send( 'kafka', { 'type': 'kafka.message', 'message': 'Test message' } )) return HttpResponse('Done') -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5cf7970c-1823-414e-bf23-f8805626194bn%40googlegroups.com.
Building a modular app?
Hi, I want to make a blogging platform and have a question about organising the project. With my blog, I'll have the blog in one Django app and then have something like a forum in another app, along with additional functions in other apps. Also, I'd like to have a single-user system that uses AbstractUser (or AbstractBaseUser). So how do all apps require my AbstractUser class for authentication, and then the other apps be added or removed based on what is needed for each site? I want to split auth from the rest project. Thanks! -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/Y-FsxPZKXSIkwB9-Hj599nnwPVu5XWMbDlfv0HEnIu9cLNeRU5b-1egUTZv8vUpHVLc4uq6oP8pVEXlxW9PqVDQQMud9BJBdBn6V6EI0hEM%3D%40protonmail.com. signature.asc Description: OpenPGP digital signature
Re: Migration running in shell, but no change in DB
I have a little update, but not a solution. Adding the database to sqlmigrate will give me the SQL command, but nothing more: python3 manage.py sqlmigrate ObjPLW2 0037 --database=db_obj_plw2 -- -- Create model Wartungsarbeit -- CREATE TABLE `ObjPLW2_wartungsarbeit` (`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY, `wa_titel` varchar(201) NOT NULL, `wa_beschreibung` longtext NOT NULL, `wa_turnus` integer UNSIGNED NOT NULL CHECK (`wa_turnus` >= 0), `wa_startdatum` date NOT NULL, `wa_erstelldatum` datetime(6) NOT NULL, `wa_bearbeitungsdatum` datetime(6) NOT NULL); -- -- Alter field w_bezahlt on waeschepaket -- And for whatever reason it includes only the table creation and not the change in the other field. On Saturday, April 1, 2023 at 7:46:51 PM UTC+2 Martin Heitmann wrote: > Dear Jason > > I went two migration steps back, then again I did makemigrations and then > I went for sqlmigrate. This was the output: > python3 manage.py sqlmigrate ObjPLW2 0037 > -- > -- Create model Wartungsarbeit > -- > -- > -- Alter field w_bezahlt on waeschepaket > -- > It does not include any SQL. > > Does anyone know where this is no SQL in the output? > > On Saturday, April 1, 2023 at 3:46:41 PM UTC+2 Martin Heitmann wrote: > >> Dear Jason >> Thanks for your reply. I will gladly do that. This is the latest >> migration file: >> >> # Generated by Django 3.2.10 on 2023-04-01 13:45 >> >> from django.db import migrations, models >> import django.utils.timezone >> >> >> class Migration(migrations.Migration): >> >> dependencies = [ >> ('ObjPLW2', '0037_alter_waeschepaket_w_bezahlt'), >> ] >> >> operations = [ >> migrations.CreateModel( >> name='Wartungsarbeit', >> fields=[ >> ('id', models.AutoField(auto_created=True, >> primary_key=True, serialize=False, verbose_name='ID')), >> ('wa_titel', models.CharField(max_length=201)), >> ('wa_beschreibung', models.TextField()), >> ('wa_turnus', models.PositiveIntegerField(default=1)), >> ('wa_startdatum', >> models.DateField(default=django.utils.timezone.now)), >> ('wa_erstelldatum', >> models.DateTimeField(auto_now_add=True)), >> ('wa_bearbeitungsdatum', >> models.DateTimeField(auto_now=True)), >> ], >> ), >> ] >> >> Does this help? >> On Saturday, April 1, 2023 at 1:55:00 PM UTC+2 Jason wrote: >> >>> part of getting effective help is sharing how you're doing things and >>> the code. for example, sharing the migration generated would be helpful. >>> you do have the context of how and what is being executed, we don't, so >>> sharing that with your original questions is a big part in getting >>> effective help >>> On Saturday, April 1, 2023 at 4:08:06 AM UTC-4 Martin Heitmann wrote: >>> >>>> The migrations do not show up in the django_mirations table. The >>>> problem must occur earlier. >>>> On Saturday, April 1, 2023 at 8:42:20 AM UTC+2 David Nugent wrote: >>>> >>>>> I would check in the django_migrations table to ensure that the >>>>> migration has successfully been run. >>>>> >>>>> >>>>> >>>>> From: 'Martin Heitmann' via Django users >>>>> Reply: django...@googlegroups.com >>>>> Date: 31 March 2023 at 19:46:02 >>>>> To: Django users >>>>> Subject: Migration running in shell, but no change in DB >>>>> >>>>> Hello everyone >>>>>> >>>>>> I have a project with multiple apps in it. As database I use MariaDB. >>>>>> Have not touched it for a while, but now I had to add a field to the >>>>>> models >>>>>> of one app. makemigrations and migrate run without any indication of an >>>>>> error. But no change occurs in the db. Tested it with an altered >>>>>> models.py >>>>>> in another app and the result is the same. Do you have any advice how to >>>>>> narrow this down? >>>>>> >>>>>> Best regards >>>>>> Martin >>>>>> >>>>> -- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "Django users" group. >>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>> send an email to django-users...@googlegroups.com. >>>>>> To view this discussion on the web visit >>>>>> https://groups.google.com/d/msgid/django-users/be9ef414-4b51-4072-a1b7-b7ba036016aan%40googlegroups.com >>>>>> >>>>>> <https://groups.google.com/d/msgid/django-users/be9ef414-4b51-4072-a1b7-b7ba036016aan%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>>> . >>>>>> >>>>> -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/e5b740a8-7af6-48be-9482-099686accce5n%40googlegroups.com.
Re: Migration running in shell, but no change in DB
Dear Muhammad Thanks, but I did that several times. And I also check the INSTALLED_APPS. It is listed there, as it was before. :/ Best regards Martin On Saturday, April 1, 2023 at 2:48:05 PM UTC+2 Muhammad Juwaini Abdul Rahman wrote: > Try running: > ``` > ./manage.py makemigrations > ``` > > If there are no changes detected by makemigrations, something wrong with > your app. Check INSTALLED_APPS in settings.py for any error. > > On Friday, 31 March 2023 at 22:17:06 UTC+8 Martin Heitmann wrote: > >> Hello everyone >> >> I have a project with multiple apps in it. As database I use MariaDB. >> Have not touched it for a while, but now I had to add a field to the models >> of one app. makemigrations and migrate run without any indication of an >> error. But no change occurs in the db. Tested it with an altered models.py >> in another app and the result is the same. Do you have any advice how to >> narrow this down? >> >> Best regards >> Martin >> > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/4c8bbe4c-57d3-4d61-bbe9-23fc8644afb7n%40googlegroups.com.
Re: Migration running in shell, but no change in DB
Dear Jason Thanks for your reply. I will gladly do that. This is the latest migration file: # Generated by Django 3.2.10 on 2023-04-01 13:45 from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('ObjPLW2', '0037_alter_waeschepaket_w_bezahlt'), ] operations = [ migrations.CreateModel( name='Wartungsarbeit', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('wa_titel', models.CharField(max_length=201)), ('wa_beschreibung', models.TextField()), ('wa_turnus', models.PositiveIntegerField(default=1)), ('wa_startdatum', models.DateField(default=django.utils.timezone.now)), ('wa_erstelldatum', models.DateTimeField(auto_now_add=True)), ('wa_bearbeitungsdatum', models.DateTimeField(auto_now=True)), ], ), ] Does this help? On Saturday, April 1, 2023 at 1:55:00 PM UTC+2 Jason wrote: > part of getting effective help is sharing how you're doing things and the > code. for example, sharing the migration generated would be helpful. you > do have the context of how and what is being executed, we don't, so sharing > that with your original questions is a big part in getting effective help > On Saturday, April 1, 2023 at 4:08:06 AM UTC-4 Martin Heitmann wrote: > >> The migrations do not show up in the django_mirations table. The problem >> must occur earlier. >> On Saturday, April 1, 2023 at 8:42:20 AM UTC+2 David Nugent wrote: >> >>> I would check in the django_migrations table to ensure that the >>> migration has successfully been run. >>> >>> >>> >>> From: 'Martin Heitmann' via Django users >>> Reply: django...@googlegroups.com >>> Date: 31 March 2023 at 19:46:02 >>> To: Django users >>> Subject: Migration running in shell, but no change in DB >>> >>> Hello everyone >>>> >>>> I have a project with multiple apps in it. As database I use MariaDB. >>>> Have not touched it for a while, but now I had to add a field to the >>>> models >>>> of one app. makemigrations and migrate run without any indication of an >>>> error. But no change occurs in the db. Tested it with an altered models.py >>>> in another app and the result is the same. Do you have any advice how to >>>> narrow this down? >>>> >>>> Best regards >>>> Martin >>>> >>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Django users" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to django-users...@googlegroups.com. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/django-users/be9ef414-4b51-4072-a1b7-b7ba036016aan%40googlegroups.com >>>> >>>> <https://groups.google.com/d/msgid/django-users/be9ef414-4b51-4072-a1b7-b7ba036016aan%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>> -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/c6d2bbd0-96cd-4f69-90c3-46d082029704n%40googlegroups.com.
Re: Migration running in shell, but no change in DB
The migrations do not show up in the django_mirations table. The problem must occur earlier. On Saturday, April 1, 2023 at 8:42:20 AM UTC+2 David Nugent wrote: > I would check in the django_migrations table to ensure that the migration > has successfully been run. > > > > From: 'Martin Heitmann' via Django users > Reply: django...@googlegroups.com > Date: 31 March 2023 at 19:46:02 > To: Django users > Subject: Migration running in shell, but no change in DB > > Hello everyone >> >> I have a project with multiple apps in it. As database I use MariaDB. >> Have not touched it for a while, but now I had to add a field to the models >> of one app. makemigrations and migrate run without any indication of an >> error. But no change occurs in the db. Tested it with an altered models.py >> in another app and the result is the same. Do you have any advice how to >> narrow this down? >> >> Best regards >> Martin >> > -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to django-users...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-users/be9ef414-4b51-4072-a1b7-b7ba036016aan%40googlegroups.com >> >> <https://groups.google.com/d/msgid/django-users/be9ef414-4b51-4072-a1b7-b7ba036016aan%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/85e72a9e-2bf1-48f8-aa48-059487c172ccn%40googlegroups.com.
Migration running in shell, but no change in DB
Hello everyone I have a project with multiple apps in it. As database I use MariaDB. Have not touched it for a while, but now I had to add a field to the models of one app. makemigrations and migrate run without any indication of an error. But no change occurs in the db. Tested it with an altered models.py in another app and the result is the same. Do you have any advice how to narrow this down? Best regards Martin -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/be9ef414-4b51-4072-a1b7-b7ba036016aan%40googlegroups.com.
Re: User creation
On 28/03/2023 06.16, Prashanth Patelc wrote: Hi all, I'm creating new user fields like email username firstname after creating user I need to send password creation email to end user ? No, you don't have to but you can if you want. Kind regards, Kasper Laudrup -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/e96c22e7-4c95-20e5-c7a8-537067f02fab%40stacktrace.dk. OpenPGP_0xE5D9CAC64AAA55EB.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature
Re: Failed to send Email by Django
On 24/03/2023 05.16, bing wrote: I am using the email module in Django to inform of users with their registration. Sometimes it can send email successfully, but more often, it fails. I searched for many solutions, but did not change this situation. That is not really related to Django but more related to your email provider (or SMTP server). It seems like you're using some Chinese email provider (139.com) and I have no idea what their reputation is, but it is completely up to the receiver of the email (or their email provider) whether they want to accept the email or not. If they don't it will most often just fail silently as you experience. Not much to do about that. That's just how SMTP (email) has been designed (or not) back in the days. You could try using another provider or setting up your own SMTP server (which is far from trivial to do and maintain). Kind regards, Kasper Laudrup -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/848e8e93-b12e-4f7b-ae40-fff34f4e9de6%40stacktrace.dk.
Re: Help on Django + Plotly integration
On 22/03/2023 15.29, Praveen Kumar wrote: Hi Team, I need help in implementing Plotly with Django for interactive dashboards. Please suggest. Try following this: https://googlethatforyou.com?q=plotly%20django Kind regards, Kasper Laudrup -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/93cd0647-cf85-e209-07f0-580c72a84cc2%40stacktrace.dk. OpenPGP_0xE5D9CAC64AAA55EB.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature
Re: Django v3.2 broken admin interface due to malicious JSON value
Thanks for the hint. I indeed used the fuzzer a while ago with an older Python version. I just tried to save this kind of string and I now receive the same `ValueError` when the malicious string would get saved to the DB. On Wednesday, 8 March 2023 at 01:06:41 UTC+1 Mike Dewhirst wrote: > On 8/03/2023 7:49 am, hi via Django users wrote: > > Hello everybody, > > I’ve used a fuzzer on my Django v3.2 project that resulted in a broken > admin interface. I’m not sure whether this is a bug or a rough edge case. > > I’m using Python 3.9.13 with Django 3.2.18 with Postgres. > > I have a Model with a JSONField and also added the model to my admin view > (I don’t use the JSON field on the list view / filter) > > ``` > data = models.JSONField(null=True, blank=True) > ``` > > The fuzzer added (via an API view) a string with 10,000 characters to the > data field. > > Every time I want to open the admin list view (and the malicious object is > part of the page), my Django crashes with the following message: > > > It appears the fix introduced the ValueError in the following version to > the one you are using hence fuzzing is probably finding a different problem. > > Everything I have read in Django docs about collecting external input > warns against letting stuff in unfiltered. > > Perhaps you do have to prevent malicious strings. I think I would. > > > > ValueError > > > > Exceeds the limit (4300) for integer string conversion: value has 1 > digits; use sys.set_int_max_str_digits() to increase the limit > > I have attached my Sentry stack trace as a screenshot. > > If this is an intended behavior, I have to validate the data to prevent > malicious strings. But it feels like the admin interface should be able to > handle those JSON values. > > It looks like the Python releases in Sep 2022 have to do with this > bug/edge case: > https://mail.python.org/archives/list/pytho...@python.org/message/B25APD6FF27NJWKTEGAFRUDNSVVAFIHQ/ > > <https://mail.python.org/archives/list/python-...@python.org/message/B25APD6FF27NJWKTEGAFRUDNSVVAFIHQ/> > > Kind Regards, > > Johannes > > > > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/6172A96F-F5FD-4694-9597-DFA815297945%40jfilter.de > > <https://groups.google.com/d/msgid/django-users/6172A96F-F5FD-4694-9597-DFA815297945%40jfilter.de?utm_medium=email&utm_source=footer> > . > > > > -- > Signed email is an absolute defence against phishing. This email has > been signed with my private key. If you import my public key you can > automatically decrypt my signature and be sure it came from me. Your > email software can handle signing. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/474230e5-ad03-4704-b15d-1b231d549945n%40googlegroups.com.
Django v3.2 broken admin interface due to malicious JSON value
Hello everybody, I’ve used a fuzzer on my Django v3.2 project that resulted in a broken admin interface. I’m not sure whether this is a bug or a rough edge case. I’m using Python 3.9.13 with Django 3.2.18 with Postgres. I have a Model with a JSONField and also added the model to my admin view (I don’t use the JSON field on the list view / filter) ``` data = models.JSONField(null=True, blank=True) ``` The fuzzer added (via an API view) a string with 10,000 characters to the data field. Every time I want to open the admin list view (and the malicious object is part of the page), my Django crashes with the following message: > ValueError > > Exceeds the limit (4300) for integer string conversion: value has 1 > digits; use sys.set_int_max_str_digits() to increase the limit I have attached my Sentry stack trace as a screenshot. If this is an intended behavior, I have to validate the data to prevent malicious strings. But it feels like the admin interface should be able to handle those JSON values. It looks like the Python releases in Sep 2022 have to do with this bug/edge case: https://mail.python.org/archives/list/python-...@python.org/message/B25APD6FF27NJWKTEGAFRUDNSVVAFIHQ/ <https://mail.python.org/archives/list/python-...@python.org/message/B25APD6FF27NJWKTEGAFRUDNSVVAFIHQ/> Kind Regards, Johannes -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/6172A96F-F5FD-4694-9597-DFA815297945%40jfilter.de.
invalit format for join_date when I ran a migration
Hi, I'm trying to run the command *'python manage.py migrate auth' *but im getting this error '*django.db.utils.OperationalError: (1067, "Invalid default value for 'date_joined'")*'. I'm using Django *3.2.9* and MySQL *8.0.32-0ubuntu0.22.04.2*. I changed the sql config altering the sql_mode variable but I'm getting the same error. The declaration of the field *date_joined *is the default of django instalation date_joined = models.DateTimeField(_('date joined'), default=timezone.now) -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/19fa95b0-0e82-49d2-9007-b36bae8f770en%40googlegroups.com.
Re: Heroku error
On 22/02/2023 06.36, Benjamin Telford wrote: I am going to upload my new version into Heroku. But something went wrong. That sucks :-( Maybe you should try again later? Kind regards, Kasper Laudrup -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ee5f3e6c-d7bd-09bd-a22a-782fe3778f0b%40stacktrace.dk. OpenPGP_0xE5D9CAC64AAA55EB.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature
Re: How can i Open binary files with Django?
On 14/02/2023 17.52, Lucas Matos Matos wrote: In my case i want to take the file with a input type file from a form, that is in binary, open it and convert it to a text file, identify its characteristics and return something based in its characteristics to the user. This might be what you're looking for: https://pypi.org/project/python-magic/ Kind regards, Kasper Laudrup -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/4a904182-202d-b909-f9c0-7ecf9b3eee2c%40stacktrace.dk. OpenPGP_0xE5D9CAC64AAA55EB.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature
Re: How to get started with contibution
On 05/02/2023 20.31, Harjot Singh wrote: Respected Sir/Madam, I am a student of computer science engineering at chitkara university .I am new to open source contribution but well aware about python, c/c++, javascript, php, web .I would love to contribute to your organisation and also in GSOK contribution .But could you please tell me how to get started. (edited) You should probably start by reading this: https://docs.djangoproject.com/en/dev/internals/contributing/new-contributors/ Kind regards, Kasper Laudrup -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/17d6d075-745f-7305-9b99-f10b4ce31b81%40stacktrace.dk. OpenPGP_0xE5D9CAC64AAA55EB.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature
Re: Django Froala Editor
Sorry hit send too soon. An alternative is to update your settings.py entry for FROALA_STORAGE_BACKEND to point to a different backend as per their docs https://github.com/froala/django-froala-editor#other-settings On Friday, 3 February 2023 at 14:30:12 UTC Steven Mapes wrote: > Easiest way will be to overload their default upload view. > > If you look in the urls.py for the package it has two entries > > > *path('image_upload/', views.image_upload, > name='froala_editor_image_upload'),path('file_upload/', views.file_upload, > name='froala_editor_file_upload'),* > > Take a look at those view here > https://github.com/froala/django-froala-editor/blob/master/froala_editor/views.py > > Then create your own views doing what you want but serve them from the URL > path that these would be on by default so that they are called instead. > > On Friday, 3 February 2023 at 12:00:32 UTC akino...@gmail.com wrote: > >> Please I need help on how to change the upload path of django froala >> editor. Possiby to Cloudinary >> Please I need help 🙏🙏 > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/39b39288-711b-464a-9f13-e9d3173a62a8n%40googlegroups.com.
Re: Django Froala Editor
Easiest way will be to overload their default upload view. If you look in the urls.py for the package it has two entries *path('image_upload/', views.image_upload, name='froala_editor_image_upload'),path('file_upload/', views.file_upload, name='froala_editor_file_upload'),* Take a look at those view here https://github.com/froala/django-froala-editor/blob/master/froala_editor/views.py Then create your own views doing what you want but serve them from the URL path that these would be on by default so that they are called instead. On Friday, 3 February 2023 at 12:00:32 UTC akino...@gmail.com wrote: > Please I need help on how to change the upload path of django froala > editor. Possiby to Cloudinary > Please I need help 🙏🙏 -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f2a9d21c-1ac6-4bbd-8eb3-c4061ea148f4n%40googlegroups.com.
database design approach
I am designing a database for a django project. I already read this tutorial that I found really useful: https://learndjango.com/tutorials/database-design-tutorial-beginners I have a question regarding the normalization. The normalization is important due that we need to reduce redundant data. But we need to find a balance because increasing the complexity is decreasing the performance. I have a model (Player) that refers to the User Model. I need to add several fields in the Player model. Is it better to put every field in the Player model or I can use three levels of complexity? Approach 1: User Model > Player Model (with many fields) Approach 2: User Model > Player Model > Several Different Models for each different features. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/NNBgIx_--3-9%40tuta.io.
Re: Django microservice authentication problem.
Are you trying to authenticate via Django Rest FrameWork API or via the standard Django authentication system? It shouldn't really matter which it is as both can be scaled horizontally and you'll have no issue with authenticating so in order for us to help we'd need to understand what you are doing better. For example are you trying to share the database across multiple domains? Are you simply placing multiple servers behind a load balancer on the same domain? On Saturday, 28 January 2023 at 06:53:12 UTC mdanar...@gmail.com wrote: > How to communicate and authenticate with multiple Django servers. Is it > possible? > > If possible you can help me, I am trying more than 15 days in this section > but not getting any solution. > > Please share with me any requirements like books, videos, blogs, or code > examples. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/16326b9e-0656-45b4-b975-faf9b676a559n%40googlegroups.com.
Re: Tutorial Django app, part 1
On 24/01/2023 12.14, javier lopez wrote: I'm new with Django. Trying to code te sample of tutorial i got the error that shows in the images. Python version 3.11.1 and 3.9 too. Same error. Anyone can help me? Both errors are mentioned in the tutorial at https://docs.djangoproject.com/en/4.1/intro/tutorial01/ For the page not found: "If you get an error page here, check that you’re going to http://localhost:8000/polls/ and not http://localhost:8000/."; And for the warning on migrations: "Ignore the warning about unapplied database migrations for now; we’ll deal with the database shortly." Unfortunately there's no direct link to these paragraphs on the page, but I hope that will help you move on. Kind regards, Kasper Laudrup -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/02929943-1f3b-5b46-6088-d9f9e96a539a%40stacktrace.dk. OpenPGP_0xE5D9CAC64AAA55EB.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature
Re: how can i solve this error?
On 23/01/2023 18.20, Vanessa kabanyana wrote: ModuleNotFoundError: No module named 'agriApp.apps.agriAppConfig'; 'agriApp.apps' is not a package Since you're the only one who knows what caused that error, you're also the only one who can solve it. If you want someone else to help you consider taking the time to write an actual question instead. Kind regards, Kasper Laudrup -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/96568578-f0de-81ca-3d93-6f829f1e438a%40stacktrace.dk. OpenPGP_0xE5D9CAC64AAA55EB.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature
Upgrading Django from 3.2.16 to 4.1.x
I will be upgrading from Django 3.2.16 to 4.1.x and wanted to know if anyone has any suggestions. I am using oracle as the backend. The release notes do not go into much detail. Do I just need to install the Django 4.1.x software and run the makemigrations to do the upgrade? Thank you, Lance Ellinghausen -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/63c62f61.050a0220.cc9c2.6fc3SMTPIN_ADDED_MISSING%40gmr-mx.google.com.