Want to show variables

2022-07-04 Thread Rohit Lohar
I want to access the data from the model but specific data like I am writing the code in python below i want it to implement in django template and model used is grade for i in range(1,20): c = "metalc"+str(i) n = "metaln" + str(i) if(grade.c!=0 and grade.n!=0) {

Re: Need some help

2022-06-26 Thread Rohit Lohar
here's a bunch of different ways to do this. > My current favorite is htmx > > https://htmx.org/ > > - Ryan > > > > On June 26, 2022 5:10:19 AM CDT, Rohit Lohar > wrote: >> >> Hi there, >> I am currently making a form where the user will have

Need some help

2022-06-26 Thread Rohit Lohar
Hi there, I am currently making a form where the user will have a option to select from the drop down and an input field next to it. So basically the drop down will have the list of products and the input field will be having an initial value depending upon the choice selected by user. The prod

Need help

2022-06-22 Thread Rohit Lohar
The below image consists of a form layout the main form has it's model defined and the subform has it's own model defined but I am getting problem that how should I implement and also the subform is dynamic so how can I implement it using htmx. Your help is appreciated. Thank you -- You receiv

Need some help

2022-06-20 Thread Rohit Lohar
I want to make a form were user will be asked to fill basic details and below that he will have a option to add food and the user can add how many of them he wants so just want to know how can I get the data from user and store it in database?? -- You received this message because you are subs

Re: Model Related Issue

2020-01-15 Thread ROHIT CHAUHAN
manually change in migrations --> 0001_initial.py On Tue, 14 Jan 2020 at 18:10, Soumen Khatua wrote: > Hi Folks, > > After changing the model name,I'm getting some error, like initially my > model name was some thing like this: > class new_model(models.Model) but now I'm change it to class > New

Re: About extending the django inbuilt user

2020-01-14 Thread ROHIT CHAUHAN
https://www.codingforentrepreneurs.com/tags/django/ On Tue, 14 Jan 2020 at 21:41, sachinbg sachin wrote: > Hii every one I want to add some additional fields in inbuilt django user > model am tried many of the things am not achieved that any reference help > me and any sources > Git repositorie

Re: Help with manage.py help

2019-11-02 Thread Rohit Kurangi
Please install- pip install django On Sat, 2 Nov, 2019, 10:24 PM Jordan Micle, wrote: > That error occur because you didn't install django. > Or you didn't activate the environment > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To uns

Re: Multiple foreign Field

2019-10-12 Thread Rohit Kurangi
1) apply the python manage. py migrate --fake 2) python manage. py makemigrations and after apply the migrate On Sat, 12 Oct, 2019, 7:50 PM Kivai Muinde, wrote: > I have two model classes, *school* and *profile*. > The school model contains a field called school_level which has several > choi

Re: Getting AttributeError: module 'asyncio' has no attribute '_get_running_loop'

2019-07-07 Thread Rohit Chopra
Hi Andrew, Just a small doubt, why same code is working on my local system. Both local and server have same version of requirements mentioned in requirements.txt Rohit On Sun 7 Jul, 2019, 9:36 PM Andrew Godwin, wrote: > Hi Rohit, > > This is my fault - we made a change in the

Getting AttributeError: module 'asyncio' has no attribute '_get_running_loop'

2019-07-07 Thread Rohit Chopra
fine on my local system. I tried removing *async_to_sync *from signals then it is not giving error but it is not transmitting data through web socket. then it is giving: ./check_in/signals.py:47: RuntimeWarning: Coroutine 'RedisChannelLayer.group_send' was never awaited 'message

Call a URLpattern via POST from a Django view through HttpResponseRedirect

2019-06-14 Thread Rohit Thapliyal
Here's the Django view: def get_date(request): if request.method == 'POST': form = DateForm(request.POST) if form.is_valid(): date = form.cleaned_data['date'] print(type(date)) return HttpResponseRedirect('schedule/{date}') else:

Django ORM last 30 days report

2019-06-03 Thread rohit haritash
Hi, I am new to Django and Django ORM. I am using Mongo DB as backed with DJANGO connector which supports Django native ORM. I have to generate a percentage metric for the last 30 days. I using the following function. CAn you please suggest a better way. The function is taking too long to execu

Re: Unable to open http://127.0.0.1:8000

2018-09-23 Thread 'Rohit' via Django users
. http://127.0.0.1:8282 On Sunday, September 23, 2018 at 11:35:56 PM UTC+5:30, SHUBHAM .SINGH. RATHORE wrote: > > Django-admin startaproject and project name > > On Sun 23 Sep, 2018 11:29 pm 'Rohit' via Django users, < > django...@googlegroups.com > wrote: > &

Re: Unable to open http://127.0.0.1:8000

2018-09-23 Thread &#x27;Rohit' via Django users
Django project I already created using PyCharm. The folder structure and basic .py files already there. On Sunday, September 23, 2018 at 11:35:56 PM UTC+5:30, SHUBHAM .SINGH. RATHORE wrote: > > Django-admin startaproject and project name > > On Sun 23 Sep, 2018 11:29 pm '

Re: Unable to open http://127.0.0.1:8000

2018-09-23 Thread &#x27;Rohit' via Django users
I am using PyCharm. Do I still need to execute that code from command prompt? On Sunday, September 23, 2018 at 11:35:56 PM UTC+5:30, SHUBHAM .SINGH. RATHORE wrote: > > Django-admin startaproject and project name > > On Sun 23 Sep, 2018 11:29 pm 'Rohit' via Dj

Unable to open http://127.0.0.1:8000

2018-09-23 Thread &#x27;Rohit' via Django users
Hi, I am new to Django and started my first app. When I try to check the development server using http://127.0.0.1:8000, I am getting: 404 Not Found. How to fix this? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this g

Re: django

2018-07-14 Thread Rohit Keshav
Django doesn't behave like WordPress. There isn't a UI like WordPress. For more refer - https://www.djangoproject.com/start/ On Sat, Jul 14, 2018, 10:27 PM jiten amin wrote: > Does Django provides UI interface like Wordprees do? How we can develop > website in django using UI? > > -- > You recei

Re: write custom decorators in django to authenticate the user

2017-11-01 Thread rohit . autosoft
On Thursday, 2 November 2017 09:53:33 UTC+5:30, rohit.a...@gmail.com wrote: > > def authenticated(f): > def wrap(request, *args, **kwargs): > token = request.META.get('HTTP_AUTHORIZATION') > entry = Person.objects.get(pk=kwargs['entry_id']) > payload = jwt.decode(token, SECRET) > user = Person.ob

write custom decorators in django to authenticate the user

2017-11-01 Thread rohit . autosoft
def authenticated(f): def wrap(request, *args, **kwargs): token = request.META.get('HTTP_AUTHORIZATION') entry = Person.objects.get(pk=kwargs['entry_id']) payload = jwt.decode(token, SECRET) user = Person.objects.get( username=payload.get('username'), pk=payload.get('id')) wrap.__doc__=f.__doc__ w

not able to implement jwt token using django

2017-10-31 Thread rohit . autosoft
class Login(APIView): SECRET =" demo" def post(self, request, *args, **kwargs): import ipdb;ipdb.set_trace() username = request.POST.get('username') password = request.POST.get('password') user = Person.objects.get(username=username, password=password)

How To style a Django formset for fileField

2017-04-13 Thread Rohit Chopra
stackoverflow question down votefavorite I have this formset. instance = get_object_or_404(Post, user = reques

Re: Django 1.7 ORA-01461 Error on inserting session data >=2k characters

2015-07-22 Thread Vuppuluri Rohit
Steps to replicate this issue: Install Django 1.7.7 Install cx_oracle=5.2 Create a django project and a simple model. Go to the shell using python manage.py Run the following: https://dpaste.de/cpcV On Wednesday, July 22, 2015 at 12:20:17 PM UTC-5, Vuppuluri Rohit wrote: > > When try

Django 1.7 ORA-01461 Error on inserting session data >=2k characters

2015-07-22 Thread Vuppuluri Rohit
When trying to insert session data with 2k characters or greater into the database, an error shows up: ORA-01461: can bind a LONG value only for insert into a LONG column T

Regarding Learning Django with collaboration

2015-07-17 Thread Rohit kumar
another to help people learn various things; mostly technology. So kindly connect whoever if interested Regards Rohit -- 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

Rendering 3D models which change based on the interaction from Users. in Django

2013-07-06 Thread Rohit kumar
I am using Django and want to create a page which should render a interactive 3D model for the user. I have the obj file which I can even use as csv or excel sheet. Kindly help how to do an interactive page which renders 3D model -- You received this message because you are subscribed to the G

Rendering 3D model in a Django app

2013-07-06 Thread Rohit kumar
I have a 3D obj model created using VTK and want to render it my Mezzanine page. How to do that. Kindly 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 dja

how can i remove djangos Django filter lookup function" __search" defalt sql attribute "IN BOOLEAN MODE "

2013-05-04 Thread rohit verma
i am using search method in django to fetch data hname_result = models.Hotel.objects.filter(name__search=hname) its sql equivalen is select name from table where MATCH(name)AGAINST ('value' IN BOOLEAN MODE ) but i want select name from table where MATCH(name)AGAINST ('value' ) -

Re: AttributeError for unique field during ModelForm validation

2012-11-11 Thread Rohit Banga
to an abstract model. It does not know which table implementation to look at to verify if the unique constraint is satisfied. Thanks Rohit Banga http://iamrohitbanga.com/ On Sun, Nov 11, 2012 at 9:21 AM, Andrejus wrote: > > Unfortunately I haven't got experience with abstarct models

Re: AttributeError for unique field during ModelForm validation

2012-11-10 Thread Rohit Banga
sure, but there seems to be some restrictions on use of unique > property. > > воскресенье, 11 ноября 2012 г., 0:40:54 UTC+4 пользователь Rohit Banga > написал: >> >> I noticed a strange behavior with Django and filed a bug >> https://code.djangoproject.com/ticket/19

AttributeError for unique field during ModelForm validation

2012-11-10 Thread Rohit Banga
I noticed a strange behavior with Django and filed a bug https://code.djangoproject.com/ticket/19271#ticket It is suggested that I first check on the support group if the bug is valid or not. Fair Enough. I have created a standalone project to demonstrate the problem. In order to run it you may

Problem with URL configuration - cannot use absolute URLs in my case

2012-10-06 Thread Rohit Banga
Hi I have a website at example.com/mywebsite. All URL requests directed to this URL are directed to my app. Now I have the following project structure mywebsiteroot/ -- myapp/ -- manage.py -- myapp/ --templates/ --settings.py

Re: How to separate data having the same model but belonging to different users?

2012-09-23 Thread Rohit Banga
reasonable way to restrict this within the same app or are there problems that I cannot foresee? Thanks Rohit Banga http://iamrohitbanga.com/ On Sun, Sep 23, 2012 at 12:56 PM, Dennis Lee Bieber wrote: > On Sat, 22 Sep 2012 22:04:41 -0700 (PDT), Bill Beal > declaimed

Re: How to separate data having the same model but belonging to different users?

2012-09-22 Thread Rohit Banga
Thats interesting Bill. Are you talking about something like this? http://stackoverflow.com/questions/3276700/django-model-subclass-without-changing-database-name Thanks Rohit Banga http://iamrohitbanga.com/ On Sat, Sep 22, 2012 at 8:15 PM, Bill Beal wrote: > Question for an expert fro

Re: How to separate data having the same model but belonging to different users?

2012-09-21 Thread Rohit Banga
t too ugly looking code is it still a terrible idea? Thanks Rohit Banga http://iamrohitbanga.com/ On Fri, Sep 21, 2012 at 9:34 PM, Dennis Lee Bieber wrote: > On Fri, 21 Sep 2012 17:54:06 -0400, Rohit Banga > declaimed the following in > gmane.comp.python.django.user: > > > Tha

Re: How to separate data having the same model but belonging to different users?

2012-09-21 Thread Rohit Banga
just want to add behavior like PhysicsDepartment.objects.filter() or create(), save() anywhere I want. I want to work with the base class while loading the data from the subclass at runtime. Simple polymorphism but with different database tables in the backend. Thanks Rohit Banga

Re: How to separate data having the same model but belonging to different users?

2012-09-21 Thread Rohit Banga
Sure Nikolas I will reconsider your solution. In case I go for model inheritance then can I use the following solution to load the class dynamically? mod = __import__('mysite.departments', fromlist=[form.getDepartment()]) klass = getattr(mod, 'form.getDepartment()') Tha

Re: How to separate data having the same model but belonging to different users?

2012-09-21 Thread Rohit Banga
cally so I do not have to do Department.objects.filter() PhysicsDepartment.objects.filter() I want to share the same code for all departments. Can I instantiate them dynamically given that I have the string name and the module name available in a dictionary. Thanks Rohit Banga http://iamrohitbang

Re: How to separate data having the same model but belonging to different users?

2012-09-21 Thread Rohit Banga
database for creating the new tables. But what is different is I need to fetch the Place subclass (eg. Restaurant or School page above) at runtime based on the logged in user. Assuming I have a map from id to class name can I just load it dynamically? Thanks Rohit Banga http://iamrohitbanga.com/ On

Re: How to separate data having the same model but belonging to different users?

2012-09-21 Thread Rohit Banga
he filter in the code and there is an unauthorized data access. I will look into dynamic models though I am not sure if it is well supported. What about routing to different databases based on user id? Thanks Rohit Banga http://iamrohitbanga.com/ On Fri, Sep 21, 2012 at 2:34 PM, Joel Goldstick

Re: How to separate data having the same model but belonging to different users?

2012-09-21 Thread Rohit Banga
User2 that you > need different tables? > > > > On Fri, Sep 21, 2012 at 1:35 PM, Rohit Banga wrote: > >> Hi >> >> I am a django #n00b. I came across the django model documentation and >> found it pretty interesting. ( >> https://docs.djangoproject.com/en

How to separate data having the same model but belonging to different users?

2012-09-21 Thread Rohit Banga
s one for each user with the same set of tables. Is it possible to do the same with multiple databases? Thanks Rohit Banga -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.c

implement form for listfield

2012-03-22 Thread rohit jangid
.. since I feel I will be encountering this kind of problems in future as well thanks -- Rohit Jangid Under Graduate Student, Deptt. of Computer Engineering NSIT, Delhi University, India -- You received this message because you are subscribed to the Google Groups "Django users" group. T

Re: Admin - how to get all registeres models in templatetag?

2012-03-22 Thread rohit jangid
t this group at > http://groups.google.com/group/django-users?hl=en. -- Rohit Jangid Under Graduate Student, Deptt. of Computer Engineering NSIT, Delhi University, India -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to

In a view how do I obtain the sessionid which will be part of the Set-Cookie header of following response ?

2010-06-16 Thread Rohit
In case of views that contain login or logout, this sessionid is different from the one submitted in request's Coockie header. I need to retrieve it before returning response for some purpose. I need to retrieve it between 'login(...)' and 'return HttpResponse(...)' How can I do this ? Django ad

Re: Counts

2007-08-23 Thread Rohit
_list %} {{ name.grouper }} ({{ name.list|length }}) {% endfor %} On Aug 22, 9:43 pm, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote: > On 8/22/07, Rohit <[EMAIL PROTECTED]> wrote: > ... > > >

Counts

2007-08-22 Thread Rohit
So I've built this QuerySet of book names from my DB. I'm trying to aggregate them and display them as follows: Django book (45) Python for Dummies (4) O'Reily Python (10) and so on. Each book is it's own entry, so right now it appears as: Django book Django book Django book Django book ... 41

Re: Admin & Models

2007-08-02 Thread Rohit
eturn sub_dept.dept.company > > def dept(self): > return sub_dept.dept > > class Admin: > list_display = ('first_name, 'last_name', 'company', 'dept', > 'sub_dept') > > On Aug 1, 3:16 pm, Rohit <[EMAIL PROTECTED

Admin & Models

2007-08-01 Thread Rohit
Actually my question is two fold, most likely due to brain farts on my end. I'm relatively a newbie to Django, so please bear with me. Here's my scenario. I have this for my relationships: Company->Dept->Sub-Dept->Employees->Roles "->" represents a one-to-many relationship. Problem #1: If I do

implementing user themes using Django templates

2006-12-06 Thread Rohit
setting, right? How can I get those to be searched based on the current theme directory? Is this possible at all, or do I need to extend Django somehow to do this? Thanks, Rohit --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

few topics to refer back

2006-04-08 Thread Rohit
some nice topics to refer. Compilers and Languages Books http://online-books-reference.blogspot.com/2005/11/free-online-compilers-and-languages.html Books and articles on Compilers and Programming Languages lex yacc review Database Books http://online-books-reference.blogspot.com/2005/11/free-on