from excel to postgesql

2021-10-04 Thread Nader Elsisi
. Nader -- 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.

Re: View that displays my ManyToManyField('self'...) relations in a with levels

2021-08-19 Thread Nader Elsisi
I noticed that subassembly 6 has different components in use. Is that what you want. On Wed, Aug 18, 2021, 10:57 AM M. GW wrote: > Hi, > > I am now trying, for days, to get a tree like view from my assembly model > into my template. I think I have read everything what I have found on > StackOver

Help with replicating admin Add New Button Control

2021-01-21 Thread Nader Elsisi
. Rregards, Nader Soliman -- 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 vi

Re: django tables 2 - delete column and delete_item for inherited tables

2020-06-07 Thread Nader Elsisi
Single records but from listview On Sun, Jun 7, 2020, 8:30 AM wongX Ndeso wrote: > So what you mean is bulk delete? Is that what you asking? > > On Sun, Jun 7, 2020, 6:48 PM Nader Elsisi wrote: > >> Thanks I hope you get what I am asking for. I want to be able to delete >

Re: django tables 2 - delete column and delete_item for inherited tables

2020-06-07 Thread Nader Elsisi
orm some delete action, or others like create or > update, please make sure you have csrf_token in your html form file, and > then you should filter if the form is valid or not, then you can process > the data that send from delete page. > > > On Sat, Jun 6, 2020, 3:48 AM Nader

django tables 2 - delete column and delete_item for inherited tables

2020-06-05 Thread Nader Elsisi
I have just posted https://stackoverflow.com/questions/62218886/django-tables-2-delete-column-and-delete-item-for-inherited-tables and didn't get any feedback yet. So I appreciate anyone who can help me about passing data. I want to have one abstract function for all my tablelists (one for ea

Re: no default manager for tables2 object

2020-03-25 Thread Nader Elsisi
utTable' has no attribute '_default_manager' Exception Location: C:\Users\nader\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\views\generic\list.py in get_queryset, line 33 Python Executable: C:\Users\nader\AppData\Local\Programs\Python\Python38-32\python.exe Python Versio

Re: no default manager for tables2 object

2020-03-25 Thread Nader Elsisi
(self) # def render_SN(self, record): pg = getattr(self, 'paginator', None) if pg: v = next(self.counter) # 'Row %d' % next(self.counter) return v + self.paginator.per_page * (self.page.number-1) else:

no default manager for tables2 object

2020-03-25 Thread Nader Elsisi
I have a tables2 table. And I got this error. I searched the net and followed a lot But couldn't fix it. The tables2 object is for a inherited model and linked through onetoone foreign key. The main object table2 is working fine. But this inherited model has more attributes and fewer objects than

How to use django and image to refer to specific records in a model.

2019-05-03 Thread Nader Elsisi
Examples Reserve seats in a plane or movie. Manage land lots On Fri, May 3, 2019, 8:12 AM Mayur Bagul wrote: > Hello community, > > I have stored single value from database inside a variable which is > playing role of context inside views.py function. > > Now I want to use this context(which ho

Problem with admin (urls)

2008-06-09 Thread Nader
r django.template.loaders.filesystem.load_template_source: * Using loader django.template.loaders.app_directories.load_template_source: Would somebody tell me what the problem is ? Regards, Nader --~--~-~--~~~---~--~~ You received this message because you are

Re: selection field in ForeignKey relation

2008-02-11 Thread Nader
" for example. cheers, Nader On Feb 8, 7:53 pm, Daniel Roseman <[EMAIL PROTECTED]> wrote: > Sorry, brain explosion. > It should be: > contactID = models.ForeignKey(Contactinfo, db_column="contactID", > blank=True, null=True) > -- > DR > > On Feb 8,

Re: selection field in ForeignKey relation

2008-02-08 Thread Nader
Thank for your reaction! Do you mean that I have to do the next statement: contactID = models.ForeignKey(Contactinfo, db_column="contactID", required=True) I have done it but I get an error: __init__() got an unexpected keyword argument 'required' cheers, Nad

selection field in ForeignKey relation

2008-02-08 Thread Nader
ot;ForeignKey" do I have to use to skip " - - - -"? Regards, Nader --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@goog

Re: AssertionError on a model

2008-02-06 Thread Nader
the next statement : Class Model(..) datasetID class Meta: . unique_together = (("datasetID", "filename", "fileVersion"),) Cheers, Nader On Feb 6, 2:21 pm, Pete Crosier <[EMAIL PROTECTED]> wrote: > A model can only use one field as its primary key a

AssertionError on a model

2008-02-06 Thread Nader
F6.03/ get() returned more than one Distributequeue -- it returned 763! Lookup parameters were {'pk': 'SCIA/6.03'} What does it mean? would somebody tell me how I can solve this problem? Regards, Nader --~--~-~--~~~---~--~~ You received this mes

CURD in relation with Meta option "unique_together"

2008-01-25 Thread Nader
L, UNIQUE (`processorID`, `datasetID`) ); COMMIT; Then if I want to change the value of table's fields in "Admin Interface", it doesn't change the value of fields! Every suggestion will be appreciated. Regards, Nader --~--~-~--~~~---~--~~ You re

Re: Link to other page in Admin interface

2008-01-24 Thread Nader
e, I don't know which one. But I have tried it for even and it works. Naturally I have to define the page "URL" in "settings.py" file. Only I have to look for an appropriated "CSS" for this link such the feeling of page stays the same. Thanks, Nader On Jan 24, 2:16 p

Link to other page in Admin interface

2008-01-24 Thread Nader
other page directly. So I want to go the page which I want for example with the next statement: Go back to the Production page Where do I have to write this statement such that I can see it in Admin page? Would somebody to tell me how I can so

How get list value of cursor.fetchall() in template

2008-01-17 Thread Nader
%} {{ input[0][0] }} {{ input[0][1] }} {{ input[0][2] }} {{ input[0][3] }} {{ input[0][4] }} {% endfor %} {% endif %} But in template we could not present the value as "input[0][0]". Would

Return type (value) of cursor.fetchall()

2008-01-16 Thread Nader
#x27;), interval 1 hour)) AND status = 'done'; """) We can get the result of this statement in "cursor.fetchall()'. Is this result a integer because of "SELECT count(*)"? Or I have to iterate the "cursor.fetchall()&qu

Re: more than one field as a primary key

2008-01-15 Thread Nader
be to add a (auto-increment) ingestQueueId field as a > primary key, and in the meantime 1) declare your current primary key fields > to be unique, 2) create an index for those fields in MySQL. > > To make multiple fields unique together, use (as an inner class inside your > model clas

more than one field as a primary key

2008-01-15 Thread Nader
ld() status = models.CharField(blank=True, maxlength=240) timeOfLastStatusUpdate = models.DateTimeField() PID = models.IntegerField() class Meta: db_table = 'ingestQueue' Regards, Nader --~--~-~--~~~---~--~~ You received this message because you

Define a model without any primary-key

2008-01-14 Thread Nader
) ENGINE=InnoDB DEFAULT CHARSET=latin1; Regards, Nader --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe fr

Getting checkbox values of a Form in view function

2008-01-13 Thread Nader
rgument. Maybe I can't give a list as an argument to the 'filter' function. If this is the case would you like to tell me how I can solve this problem? Regards, Nader --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goo

The last records of table by using of Pagination

2008-01-11 Thread Nader
t, 'next_page': page + 1, 'message': message,} ) It present the first 20 records of table, but I would like to present the last 20 records from the table (from the bottom of table). Would somebody tell me how I can solve this? Regards, Nader --~--~-

read only in Admin interface

2008-01-08 Thread Nader
n one application I would like only to read the model and could not use Create, Update and Delete capabilities. Would somebody tell me how I can solve this problem by using of Admin interface? Regards, Nader --~--~-~--~~~---~--~~ You received this message because yo

Initializing a selection (choice) field

2007-12-05 Thread Nader
design of data model? I mean to redefine data model based on some relationship as 'Foreignkey' or 'ManytoMany' for example. Cheers, Nader --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "

Out of range value

2007-11-26 Thread Nader
ged the "postMaskID" to int(12). int(16). This was without any result. I have once used 'models.Positive.IntegerField' in place of 'models.IntegerField'. The problem has been stayed the same. Does somebody any idea about this problem? Regards, Nader --~--~-~--~

Re: choices option in input-field

2007-11-21 Thread Nader
ld like to say that on 'pointy-stick.com' site are very interesting articles about different subject. Regards, Nader On Nov 20, 10:47 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Tue, 2007-11-20 at 00:19 -0800,Naderwrote: > > Hallo, > > > I ha

Re: problem with "python manage.py shell"

2007-11-20 Thread Nader
> __builtin__.exit? It's not allowed, so you'll need to find another way > to do whatever it is you're trying to do. > > Perhaps some more code could explain what you're trying to do, and how > best to get around it. > > -Gul > > On Nov 20, 2007

Re: problem with "python manage.py shell"

2007-11-20 Thread Nader
y Alchin" <[EMAIL PROTECTED]> wrote: > On Nov 20, 2007 2:22 PM, Nader <[EMAIL PROTECTED]> wrote: > > > If I use the "python manage.py shell" to go to shell, I got the next > > message: > > > _builtin__.exit += _exit > > TypeError: unsupport

problem with "python manage.py shell"

2007-11-20 Thread Nader
If I use the "python manage.py shell" to go to shell, I got the next message: _builtin__.exit += _exit TypeError: unsupported operand type(s) for +=: 'Quitter' and 'str' It is actually part of error. Some idea what the problem is? Regards, --~--~-~--~~~---~--~~

choices option in input-field

2007-11-20 Thread Nader
sign the elements to the tuple, but tuple is a unmutuable type. I can't use also 'list' or dictionary. Would you like to help me to solve this problem. With regards Nader --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: add/change user via 'Admin'

2007-11-19 Thread Nader
ia 'model API'! On Nov 19, 6:57 pm, RajeshD <[EMAIL PROTECTED]> wrote: > On Nov 19, 11:14 am, Nader <[EMAIL PROTECTED]> wrote: > > > I use the 'Admin' class in my project to do administration of > > applications. For the user I have defined a &#x

add/change user via 'Admin'

2007-11-19 Thread Nader
ions', 'nlscia.eventlisteners', 'nlscia.datasources', 'nlscia.ingestmodules', 'nlscia.datadestinations', 'nlscia.distributemodules', 'nlscia.transfermechanisms', ) Can somebody help me to solve this problem? With re

Change Date presentation in Admin?

2007-10-18 Thread Nader
it was a long string. I have done this by changing of "width" element in "forms.css" file. By this changing the "Time" item does not come precisely under the 'Date' item. How can I arrange this? The other alternative is: Is it possible to present them (Date an

grouping tables in Admin interface

2007-10-12 Thread Nader
are related to each other via giving a color. So my question is where can I change the color of the tables? Do I have to change the color in "forms.css" file? Cheers, Nader --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: Label and input Filed overlap

2007-10-11 Thread Nader
I suppose that I can copy the system 'forms.css' file to local directory (my own project directory) and change the parameter with which the distance will be adjusted. Could you tell me which parameter do I have to change? Cheers, Nader On Oct 11, 1:37 pm, "Phil Davis" <[

Re: How to delete a table?

2007-10-11 Thread Nader
You can drop your table in sqlite session without deleting the other tables. You can do that in sqlite by the next command: sqlite>drop table Orders; On Oct 11, 11:15 am, TopRamen <[EMAIL PROTECTED]> wrote: > Greg, if you do not mind losing any sample data you may have in your > tables, you cou

Label and input Filed overlap

2007-10-11 Thread Nader
label name shorter. Would you give me some information please? With regards, Nader --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users

Re: RegexField and Admin interface

2007-10-10 Thread Nader
> postcode = models.CharField(maxlength=10, > validator_list=[isValidUKPostcode], verbose_name="Post Code", > help_text="Has to be in Capital letters and contain a space.") > > these are the fields in the model. > I am not very good in regex and found this

RegexField and Admin interface

2007-10-09 Thread Nader
; class to use it. class MyModel(...): password = modles.RegexField() I can't do it because we don't have any "RegexField" attribute in "Admin" class. I have been looking for information about this problem and have not found any solution. Could yo

Model field as a password definition

2007-09-20 Thread Nader
The last alternative was : from django import newforms as forms class MyModel(..): password = forms.CharField(widget=forms.PasswordInput) But I don't see any text input field. Could somebody tell me how I can solve this problem? Regards, Nader --~--~-~--~~

Re: Problem with Mysql database

2007-09-07 Thread Nader
Indeed, the problem was that both of the tables were defined in database. It has been solved by deleting of Dataset. Thank! On Sep 6, 4:37 pm, Nis Jørgensen <[EMAIL PROTECTED]> wrote: > Nader skrev: > > > I have used 'inspectdb' to produce the model, because I h

Re: Problem with Mysql database

2007-09-06 Thread Nader
the same name which has been defined in Meta class. BEGIN; CREATE TABLE `Dataset` Yours, Nader On Sep 6, 1:40 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On 9/6/07, Nader <[EMAIL PROTECTED]> wrote: > > > > > I can directly get informat

Problem with Mysql database

2007-09-06 Thread Nader
Level 1b | ++ But if I want to get information of the same dataset I got the empty list: >>> from ipdc.dataset.models import Dataset >>> Dataset.objects.all() [] What is actually here wrong? Have I got for

A question about an interface via a Form

2007-09-04 Thread Nader
.CharField() givenName = models.CharField() surName = models.CharField() email = models.CharField() fax = models.CharField() So it is a very simple class without any relation. Would somebody help me about the next problem? With rega

Re: porting of an application

2007-07-27 Thread Nader
I have got the idea what I have to do. I thought that it can be easier with some option for dump command. However thank you for this information. I will try to copy the stuff which I need. Nader On Jul 27, 1:27 pm, Tim Chase <[EMAIL PROTECTED]> wrote: > > I have two different datab

Re: porting of an application

2007-07-27 Thread Nader
How can I dump not the whole database, but a portion (only the information of one application) of of it? On Jul 27, 12:56 pm, Hodren Naidoo <[EMAIL PROTECTED]> wrote: > Just do a dump, and source the script into a newly created database > instance. > > On Fri, 2007-07-27 at

Re: porting of an application

2007-07-27 Thread Nader
I have two different database file, so I can't copy it. I would like to extract only the data of the app which I would port to other machine. On Jul 27, 1:04 pm, Daniel Ellison <[EMAIL PROTECTED]> wrote: > Nader wrote: > > But how about the content of my database? I > >

porting of an application

2007-07-27 Thread Nader
3' as a database engine. Could somebody tell me how I can do this? With regards, Nader --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send e

Re: object attibute in different lines

2007-01-02 Thread Nader
Thank you, gkelly! I have found what I was looking for. I am a newbie to Django and I have to learn more about this system. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this grou

object attibute in different lines

2007-01-02 Thread Nader
Hello, I have a model field which is defined as a TextField. If I get the object in a view function by using of next statement : object = get_object_or_404(Object, pk=obj_id) Then I can use in template the next statement : {{ object.attrib }} and I get correctly the text get placed in this varai

Re: What does get_object_or_404 return?

2006-12-27 Thread Nader
me confuse. Because I can get the value of object in template by using of object lookup mechanism (object.attribute) and not dict['object'] for example. On Dec 28, 1:10 am, "Adrian Holovaty" <[EMAIL PROTECTED]> wrote: On 12/27/06, Nader <[EMAIL PROTECTED]> wrote: >

What does get_object_or_404 return?

2006-12-27 Thread Nader
ce to the object 'wk-report' in the week_detail.html', I don't get any value. But If I replace it with 'object', then I get the result. Does it mean that the return value (object) of the 'get_object_or_404' is 'object&